vivekananda0010/Progeni_Atlus
0
PrepApp — Interview Prep Platform
Working, deployable MVP: 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.
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
Get an API key from console.anthropic.com. (Question generation still works without this — 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_KEYANTHROPIC_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.
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) · Anthropic API (question/solution generation) · Piston API (code execution) · Tailwind CSS
