abhyas docsStorybook

Frontend

Code: app.abhyas.frontend.dev. Live: abhyas.dev.nishko.co (dev) and abhyas.nishko.co (prd, from app.abhyas.frontend.prd).

How it works

Routes

RouteWhat it is
/Dashboard: a practice calendar (minutes practised each day, all disciplines or one), streaks, a card per discipline with its sources and last 14 days, adding a discipline, and recent papers
/sources/<discipline>Sources workspace: Overview, Concept (lessons), Practice, Test; manage chapters, topics, tags, book sources and questions. Saved straight to Supabase
/math/...Maths practice: build a paper, take it, grade it, track progress (see Mathematics practice)

Code layout

PathWhat it does
web/app/The page, the 404 page (the same app) and the layout, which loads the design system's styles
web/components/App.jsSign-in, routing (with web/lib/nav.js), the page shell
web/components/Header.jsThe design system's header and drawer, with the site's places, sign-out and version
web/components/SignIn.jsThe design system's sign-in screen, with Supabase sign-in
web/components/dashboard/Dashboard.tsxThe home page: loads the data and lays out the design system's dashboard components
web/lib/dashboard/data.tsWhat the dashboard loads
web/lib/store.tsThe shared Zustand store (see State Management)
web/lib/auth.jsSupabase client, sign-in, session, saved records
web/lib/sources.jsThe sources workspace (draws its own HTML)
web/lib/question-bank.jsA discipline's chapters, topics, sources and questions
web/lib/math/Maths practice: templates, engine (grading, papers), UI
web/lib/latex.jsLaTeX to HTML; maths typeset by MathJax
tests/node --test tests; tests/fixtures/outline.json is a snapshot of the outline

Components, styles and colours come from the design system (@nishkodotco/abhyas-design-system, from app.abhyas.design). The site keeps no stylesheets of its own, and npm run check enforces the design system's standards.

Run it locally

scripts/serve.sh                 # http://localhost:8010 (dev database)
cd web && npm test               # tests
cd web && npm run build          # static site in web/out/
cd web && npm run check          # the design system's checks
cd web && npm update @nishkodotco/abhyas-design-system   # take the design system's newest release

Node 22 is needed (the dev container has it).