vivekananda0010/MY_ASSISTANCE
PrepApp — Interview Prep Platform
Working, deployable MVP, built entirely on free tiers — $0 to run: auth, DSA (static + AI-generated questions, brute/good/optimal solutions, sandboxed code execution), Aptitude (topic-wise/mixed tests, dual solutions), and a profile/progress page. Build verified clean (npx next build — 0 type errors, 0 compile errors) before handoff.
Free stack: Supabase free tier (Postgres + Auth) · Groq free API (real Llama models, no card required) · Piston public API (code execution, no key needed) · Vercel free tier (hosting). No paid service is required to run this app.
1. Deploy in ~15 minutes
Step 1 — Supabase (database + auth)
- Create a project at supabase.com (free tier is enough to start).
- Open SQL Editor → paste and run
supabase/schema.sql. - Then paste and run
supabase/seed.sql(gives you a few real questions on day one). - Authentication → Providers: enable Email, and enable Google if you want Google sign-in (needs a Google OAuth client ID/secret — Supabase's docs walk through this).
- Authentication → URL Configuration: add your deployed URL (and
http://localhost:3000for local dev) to Redirect URLs. - Copy from Project Settings → API: Project URL,
anonpublic key, andservice_rolesecret key.
Step 2 — LLM key (free)
- Go to console.groq.com/keys, sign up (no card), create an API key.
- That's it — Groq's free tier hosts open-weight models at no cost. The app defaults to
openai/gpt-oss-120b(Groq's current recommended free workhorse model). Note: Groq deprecated its Llama chat models in June 2026 (fully shut off by August 2026) — if you specifically want Meta Llama weights, check console.groq.com/docs/models for whichever Llama variant is current and setLLM_MODELto it. Free-tier limits are per-minute/per-day; check current numbers at console.groq.com/settings/limits — the app's own rate limiting (lib/rateLimit.ts) is already tuned to stay well under typical free-tier caps. (Question generation still works without this key — the static seed bank is always available — but AI-generated questions/solutions need it.)
Step 3 — Deploy to Vercel
- Push this folder to a GitHub repo.
- Import it in vercel.com.
- Add environment variables (copy from
.env.example): NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYGROQ_API_KEY- Deploy. Done — you have a live URL.
Local development
npm install
cp .env.example .env.local # fill in real values
npm run dev2. What's genuinely ready vs. what's next
Ready today:
- Email + Google auth, protected routes via middleware
- DSA: static bank, AI generation, three-level solutions, code execution against test cases (via the public Piston API), attempt/submission logging
- Aptitude: topic-wise/mixed test generation, scoring, per-question correctness
- Profile: solved count, accuracy, average aptitude score
- Full RLS on every table — every user can only read/write their own rows; questions/solutions are shared read-only content written only by the server
- Rate limiting on every LLM-calling endpoint — per-user daily caps (20 question generations, 30 solution generations, 5 AI-assisted test builds), enforced atomically in Postgres so it can't be raced. Tune the numbers in
lib/rateLimit.tsonce you see real usage/cost.
Deliberately deferred (flagged, not hidden):
- System Design / SQL / NoSQL / ML / DL / CV / RAG — DB schema already supports these topics (
topicenum includes them), UI shows them as "coming soon." Wiring up content generation for each is the same pattern as DSA — copyapp/dsaand the two question/solution API routes, change thetopicvalue and prompt. - Production code sandbox — currently uses the free public Piston API (rate-limited, fine for early users/testing). Before real traffic, self-host Piston (one
docker run, see their repo) and pointPISTON_URLat it. - RAG / vector DB — not wired up. Needed for the "conceptual Q&A" module; add pgvector to Supabase (it's a one-click extension) when you build that module.
- AI code review (beyond pass/fail) — the schema has an
ai_feedbackcolumn onsubmissionsready for it; not called yet. - Scaling past Groq's free tier — fine for an MVP/early users. If you outgrow it, either move to Groq's paid tier or point
lib/llm.tsat a self-hosted Llama (Ollama/vLLM) — no other code changes needed, samegenerateJSONinterface.
3. Security notes
SUPABASE_SERVICE_ROLE_KEYbypasses Row Level Security — it's used only in server-side API routes, never sent to the browser. Keep it out of anyNEXT_PUBLIC_*variable.- User code submissions never execute on your server — they're forwarded to the Piston sandbox API. Your server only sends/receives text.
- All protected pages check auth server-side (middleware + per-page checks), so there's no client-only gate that could be bypassed by disabling JS.
4. Tech stack
Next.js 14 (App Router, TypeScript) · Supabase (Postgres + Auth, free tier) · Groq API (question/solution generation, free tier, open-weight models) · Piston API (code execution, free, no key) · Tailwind CSS · Vercel (hosting, free tier)
