A full-stack refresher app for competitive programming practice. The backend samples either a curated DSA topic or one of your solved problems, asks an LLM for concise JSON, validates it, and the frontend renders a clean daily revision card.
- Python 3.11+
- Node.js 18+
- A Groq or Gemini API key
cd backend
pip install -r requirements.txt
cp .env.example .envThen edit .env and fill in one provider key. For example, keep LLM_PROVIDER=groq and set GROQ_API_KEY.
uvicorn main:app --reloadThe API runs at http://localhost:8000.
cd frontend
npm installnpm run devThe Vite app runs at http://localhost:5173.
Edit backend/data/problems.txt and add one supported problem URL per line:
https://leetcode.com/problems/trapping-rain-water/
https://codeforces.com/problemset/problem/1000/CLines starting with # are ignored. Supported platforms are LeetCode, Codeforces, CodeChef, and AtCoder. You can also add problems with:
curl -X POST http://localhost:8000/api/problems/add \
-H "Content-Type: application/json" \
-d '{"url":"https://leetcode.com/problems/two-sum/"}'When using Supabase, apply backend/supabase_daily_bite_pointer.sql once. The daily My Problem bite is selected by created_at order, shows the current pointer row, immediately advances the pointer to the next row, and wraps back to the oldest row after the latest row.
The /api/random-topic and /api/my-problems endpoints are already WhatsApp-webhook-ready: they accept simple HTTP requests and return structured refresher content. To add WhatsApp delivery, create a Twilio or WhatsApp Business webhook that calls one of these endpoints, formats the JSON into a compact message, and sends it back to the user.