Appearance
Website Overview
ediky-website/ediky/ is the product: a React 19 SPA on Cloudflare Pages, with Pages Functions for the handful of things that need a server. This page maps the whole user-facing surface; each subsystem then gets its own deep-dive page.
The app shell
src/App.jsx mounts providers in order — ThemeProvider → AuthProvider → SidebarProvider → SubmissionsProvider — then a router where every authenticated route renders inside MainLayout (Navbar + collapsible Sidebar + content outlet). The Navbar's right edge is UserMenu: avatar → dropdown with the profile header, Settings, Docs (opens this portal — added as part of the Ediky Workflow rollout, wired to VITE_DOCS_URL), and Logout.
Unauthenticated users only ever see /login; AuthContext gates everything else and mirrors the Firebase user into a users/{uid} profile document on first sign-in.
Route map
| Route | Page | What it is |
|---|---|---|
/dashboard | Dashboard.jsx | greeting header, streaks, weekly progress chart, Codeforces rating card, today's schedule, quick links |
/calendar | Calendar.jsx | events + tasks + OA reminders — see Scheduling |
/problems, /dsa-technical | bank pages | DSA question bank views over the sharded index — see Question Bank |
/cp/:testId/:contestId, /cp-solutions | CP pages | the 600-problem "God's Will" contest system — see CP System |
/oa/build, /oa/exam, /oa/result | OA pages | the simulator — see OA Simulator |
/ide | IDE.jsx | multi-file workspace with the Judge0 runner — file explorer, tabbed tests panel, dockable console |
/cs, /aptitude | practice runners | AI-graded concept questions; deterministic + AI-coached aptitude |
/sql-practice | SQL runner | client-side SQLite via sql.js |
/subjects/:subject | SubjectLayout | the learning workspace: YouTube player + Docy notes + annotations — see Notes System |
/company-wise | CompanyWise.jsx | questions filtered by company tags (D.E. Shaw, Flipkart, …) |
/revision | Revision.jsx | spaced-repetition queue fed by bookmarks and lecture notes |
/submissions | Submissions.jsx | full submission history from the live Firestore feed |
/settings | Settings.jsx | profile, avatar (Cloudinary), theme, Codeforces handle |
Routes are lazy-loaded with preload-on-hover so the initial bundle stays small (Performance).
The four contexts
| Context | Owns |
|---|---|
AuthContext | Firebase user, profile doc sync, the email-sync fix the reminder Worker depends on |
ThemeContext | light/dark, persisted, drives the CSS-variable token system |
SidebarContext | collapse state shared between Navbar toggle and layout |
SubmissionsContext | one app-wide onSnapshot over users/{uid}/submissions so every page sees verdicts live without its own listener |
Where the logic lives
UI components stay thin; src/lib/ holds the behavior: questionBank.js (shard/body/sidecar loading + caches), judgeRunner.js + judge0.js (verdicts), oaEngine.js (scoring) + oaJobs.js (attempt bookkeeping), aiService.js (all AI calls), aptitudeEval.js / conceptEval.js / sqlGrading.js (per-section grading), revision.js (spaced repetition), codeforces.js (CF proxy client), contentParse.js (the one markdown parser), complexityEstimate.js (empirical big-O regression — the only lib with its own unit tests, deservedly).
Twenty use* hooks bridge lib ↔ UI — useOAAttempt, useCodeDraft, useAnnotations, useAntiCheat, useIdeWorkspace, useWindowedRows-style virtualization, etc. If a behavior exists in two pages, it's a hook, not copied JSX.
The server-side surface
Ten Pages Functions under functions/ (AI grading, code running, Docy notes proxy, Codeforces proxy) plus two standalone Workers (background OA judging; reminder emails). Full request/response reference in API Reference; the Workers' claim semantics in Cloudflare Workers.
Reading order for a new developer
- This page, then Folder Structure with the repo open.
- Question Bank — the central architectural decision everything else leans on.
- Whichever subsystem you're touching. Each page states its known failure modes at the end.