Search Stack Overflow without leaving your browser tab.
A lightweight Django web app that turns any plain-English question into the most relevant Stack Overflow results — complete with smart caching and abuse protection baked in.
QuestionOverflow lets you type a question, hit search, and instantly browse the top matching Stack Overflow posts as clickable links. Under the hood it talks to the Stack Exchange API, caches results to stay fast, and throttles requests per IP to play nicely with API limits — the kind of production-minded details that separate a toy project from a real one.
| Feature | Description |
|---|---|
| 🔎 Live Stack Overflow search | Query the Stack Exchange API and get the 10 most relevant questions, sorted by recent activity. |
| 🔗 Clickable results | Every result links straight to the original Stack Overflow post. |
| 📄 Pagination | Browse up to 25 pages of results with Previous / Next navigation. |
| ⚡ Response caching | Search pages are cached for 10 minutes — fewer API calls, faster repeat searches. |
| 🛡️ Rate limiting | Throttled to 5 requests/min and 100 requests/day per IP to prevent abuse. |
| 🔧 Admin panel | Standard Django admin available at /admin/. |
| Layer | Technology |
|---|---|
| Language | Python 3.10.10 |
| Framework | Django 4.1.6 |
| HTTP Client | requests |
| Rate Limiting | django-ratelimit |
| External API | Stack Exchange API v2.3 (search/advanced) |
| Database | SQLite |
| Caching | Django LocMemCache |
| Frontend | HTML + Django Templates |
# 1. Clone the repository
git clone https://github.com/HarshTanwar1/QuestionOverflow.git
cd QuestionOverflow
# 2. (Recommended) Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 3. Install dependencies
pip install django==4.1.6 requests django-ratelimit
# 4. Apply database migrations
python manage.py migrate
# 5. Start the development server
python manage.py runserverThen open http://127.0.0.1:8000/ in your browser, type a question, and search away! 🎉
- 🌐 Consuming a third-party REST API from a Django view with
requests— building query payloads and parsing JSON responses. - 🛡️ Request throttling using
django-ratelimitdecorators with IP-based keys across multiple time windows (per-minute and per-day). - ⚡ View caching via Django's
cache_pagedecorator and a configured cache backend. - 🧩 Template rendering — passing dynamic context (titles, links, pagination state) into Django templates.
- 🔀 URL routing with path converters (
<int:no>) to drive pagination through the URL.
- 🚢 Production readiness —
DEBUG = False, configuredALLOWED_HOSTS, PostgreSQL + Redis/Memcached. - 🧯 Robust error handling — gracefully handle API failures, timeouts, empty results, and HTTP 429 responses.
- 🏷️ Richer results — show tags, scores, answer counts, and "is answered" status, not just titles.
- 🎨 Improved UI/UX — add styling (Bootstrap/Tailwind), loading states, and a friendly "no results" message.
- 🔑 API key support — register a Stack Exchange key to raise the request quota and surface remaining quota.
⭐ If you found this project useful, consider giving it a star!