NumeriCode is a frontend MVP for an online school where students learn Mathematics and Programming through structured courses, live classes, assignments, and learning resources.
Tagline: Where Mathematics Meets Code.
- Responsive landing page with hero, learning tracks, how-it-works flow, and featured courses.
- Course catalogue with search, subject filtering, empty state, course cards, and course detail preview.
- Course detail sections for outcomes, curriculum, instructor profile, resources, and live class schedule.
- Functional browser authentication for Student, Trainer, and Admin roles.
- Database-backed registration, login, logout, forgot-password, and password reset.
- HTTP-only secure cookie sessions.
- Protected role routes with server-side role-check endpoints.
- Student dashboard preview with progress, live classes, assignments, resources, announcements, and profile.
- Trainer workspace for live classes, grading queue, learning resources, and trainer profile.
- Admin workspace for students, trainers, courses, platform tasks, and deployment readiness.
- Persistent dark mode controlled from the header and dashboard profile.
- Lightweight hash-based SPA navigation with a not-found state.
- Production build through Vite.
- React 19
- TypeScript
- Vite
- Vercel Serverless Functions
- Vercel Postgres / Neon-compatible Postgres
- CSS modules through the app stylesheet
- Local mock learning data
The original product plan mentions React Router, TanStack Query, React Hook Form, Zod, Axios, Framer Motion, and MSW. Those are intentionally not installed yet because this MVP currently runs fully from local mock data.
Authentication now runs through Vercel API routes. Passwords are hashed with Node scrypt, session tokens are stored hashed in Postgres, and the browser receives an HTTP-only cookie.
Install dependencies:
npm installRun the local development server:
npm run devRun quality checks:
npm run lint
npm run buildPreview the production build locally:
npm run previewFor local full-stack API testing, use Vercel CLI:
vercel devThe MVP uses hash routes so it deploys cleanly on static hosting without rewrite configuration:
#/- Landing, About, FAQ, and Contact#/about- About, FAQ, and Contact information#/contact- Contact, About, and FAQ information#/courses- Course catalogue and details#/auth- Role-based authentication#/dashboard- Student dashboard preview#/trainer- Trainer workspace#/admin- Admin workspace
API routes:
POST /api/auth/register- creates Student accounts onlyPOST /api/auth/login- logs in Student, Trainer, or AdminGET /api/auth/me- returns the current cookie session userPOST /api/auth/logout- deletes the server sessionPOST /api/auth/forgot-password- creates a short-lived reset tokenPOST /api/auth/reset-password- verifies reset token and changes passwordGET /api/admin/overview- server-side Admin role checkGET /api/trainer/overview- server-side Trainer role check
Public registration is limited to Students. Trainer and Admin accounts are provisioned through the protected setup endpoint.
Create a Vercel Postgres/Neon database from the Vercel dashboard and add these environment variables from .env.example:
POSTGRES_URLSETUP_SECRETFIRST_ADMIN_EMAILFIRST_ADMIN_PASSWORDFIRST_TRAINER_EMAILFIRST_TRAINER_PASSWORDAPP_URL
After deployment, initialize the database and first privileged accounts:
curl -X POST https://YOUR-VERCEL-URL.vercel.app/api/setup \
-H "Content-Type: application/json" \
-H "x-setup-secret: YOUR_SETUP_SECRET"Use long unique passwords for FIRST_ADMIN_PASSWORD, FIRST_TRAINER_PASSWORD, and SETUP_SECRET.
For launch, configure a transactional email provider. The app supports Resend through:
RESEND_API_KEYAUTH_EMAIL_FROM
Without these variables, reset tokens are still generated, but production users will not receive reset emails.
Set these Vercel environment variables after creating your Google Ads conversion action:
VITE_GOOGLE_ADS_ID, for exampleAW-XXXXXXXXXXVITE_GOOGLE_ADS_SIGNUP_LABEL
The Google tag loads automatically when VITE_GOOGLE_ADS_ID is present. Student signup fires the configured conversion event.
There are no hardcoded launch credentials. Use /api/setup with your environment variables to create the first Admin and Trainer. Students can register from the app.
src/
components/
auth/
courses/
dashboard/
landing/
layout/
public/
ui/
data/
pages/
types/
The project is ready for Vercel as a static Vite app.
Recommended Vercel settings:
- Framework Preset: Vite
- Build Command:
npm run build - Output Directory:
dist - Install Command:
npm install
Required before launch:
- Connect the Vercel Postgres/Neon database.
- Add all auth setup environment variables.
- Run
/api/setup. - Configure
APP_URL. - Configure Resend for password reset email.
- Add Google Ads variables when your Ads account is ready.
This project demonstrates:
- Component composition and typed props.
- Responsive UI implementation from a product plan.
- Mocked frontend workflows without pretending a backend exists.
- Role-based product thinking for Student, Trainer, and Admin users.
- Search/filter state management.
- Accessible forms, semantic landmarks, and keyboard-friendly native controls.
- Deployment-ready build and documentation.