Skip to content

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 — ThemeProviderAuthProviderSidebarProviderSubmissionsProvider — 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

RoutePageWhat it is
/dashboardDashboard.jsxgreeting header, streaks, weekly progress chart, Codeforces rating card, today's schedule, quick links
/calendarCalendar.jsxevents + tasks + OA reminders — see Scheduling
/problems, /dsa-technicalbank pagesDSA question bank views over the sharded index — see Question Bank
/cp/:testId/:contestId, /cp-solutionsCP pagesthe 600-problem "God's Will" contest system — see CP System
/oa/build, /oa/exam, /oa/resultOA pagesthe simulator — see OA Simulator
/ideIDE.jsxmulti-file workspace with the Judge0 runner — file explorer, tabbed tests panel, dockable console
/cs, /aptitudepractice runnersAI-graded concept questions; deterministic + AI-coached aptitude
/sql-practiceSQL runnerclient-side SQLite via sql.js
/subjects/:subjectSubjectLayoutthe learning workspace: YouTube player + Docy notes + annotations — see Notes System
/company-wiseCompanyWise.jsxquestions filtered by company tags (D.E. Shaw, Flipkart, …)
/revisionRevision.jsxspaced-repetition queue fed by bookmarks and lecture notes
/submissionsSubmissions.jsxfull submission history from the live Firestore feed
/settingsSettings.jsxprofile, avatar (Cloudinary), theme, Codeforces handle

Routes are lazy-loaded with preload-on-hover so the initial bundle stays small (Performance).

The four contexts

ContextOwns
AuthContextFirebase user, profile doc sync, the email-sync fix the reminder Worker depends on
ThemeContextlight/dark, persisted, drives the CSS-variable token system
SidebarContextcollapse state shared between Navbar toggle and layout
SubmissionsContextone 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

  1. This page, then Folder Structure with the repo open.
  2. Question Bank — the central architectural decision everything else leans on.
  3. Whichever subsystem you're touching. Each page states its known failure modes at the end.

Ediky Workflow — internal engineering documentation.