React + TypeScript single-page app for the Ed-Tech Platform: a course marketplace and learning experience where instructors publish video/document courses and students enroll and track their progress.
This is the frontend only. It talks to the Ed-Tech Platform backend (Express + Prisma + PostgreSQL) over a JSON API.
Live demo: on the sign-in page, click Demo student or Demo instructor, or sign in manually:
| Role | Password | |
|---|---|---|
| Student | [email protected] |
Demo@1234 |
| Instructor | [email protected] |
Demo@1234 |
Demo data is reset on every backend deploy.
- React 18 + TypeScript + Vite
- React Router v6 for routing (
src/routes) - TanStack Query for all server state (
src/hooks/queries) - Zustand (with
persist) for auth state (src/hooks/use-auth.ts) - Tailwind CSS v4 + shadcn/ui + Radix primitives
- framer-motion for animation
Hosted on Vercel and auto-deployed from main. vercel.json rewrites /api/* to the production API (https://ed-tech-platform-backend-ten.vercel.app), so the app calls the API same-origin and the httpOnly session cookies are first-party. It also sets the security headers, including the Content-Security-Policy.
- Public course catalog with search, level/price filters, and pagination
- Course detail pages with curriculum preview
- Email/password signup and login (JWT, stored in
localStorage) - Free-course enrollment
- Course player with a curriculum sidebar, video/document lessons, and per-lesson progress tracking
- Instructor flow: create course → add sections & lessons → publish
- Student & instructor dashboards (overview + my courses)
Paid courses, quizzes, assignments, certificates, notifications, discussions, and the parent dashboard are out of scope for v1 (the backend schema reserves models for them, but they are not wired up).
- Node.js 18+
- The backend running locally (see
Ed-Tech-Platform-backend) — it needs PostgreSQL 14+
npm install
npm run dev # Vite dev server at http://localhost:5173The app calls the API same-origin at /api; the Vite dev and preview servers proxy
that to http://localhost:3000. To proxy somewhere else:
VITE_DEV_API_TARGET="http://localhost:3000"The backend's CLIENT_URL must include the origin the app runs on
(e.g. http://localhost:5173), or state-changing requests are rejected by its CSRF check.
npm run build # type-check (tsc -b) + production build to dist/
npm run preview # preview the production build
npm run lint # ESLint
npm test # Vitest unit tests (media URL safety, API client, session expiry)
npm run e2e # Playwright browser tests (see below)/coaching is the landing page for coaching-centre owners (see docs/memos/coaching-centre-pitch-kit.md). Its screenshots show the real app running a demo centre, and are recorded by a script:
- In the backend, create the demo centre:
DEMO_CENTRE_PASSWORD=… APP_URL=<this app's URL> npm run demo:centre. - Start the app against that database, for example the e2e servers or
npm run buildplusnode e2e/support/prodlike-server.mjs. - Here, run
DEMO_CENTRE_PASSWORD=… npm run record:walkthrough. It needs ffmpeg.
The script writes public/coaching/*.webp. Re-run it whenever the screens change. It also writes a captioned screen recording (walkthrough.mp4 and its poster), which the page no longer uses.
The page's video is a 90-second overview film made with Remotion in video/, a separate project with its own dependencies (see video/README.md). Copy its render to public/coaching/overview.mp4 and its poster to overview-poster.webp.
The "Book a free pilot" button reads site.pilot in src/config/site.ts. It's set to the maintainer's WhatsApp number, and opens WhatsApp with a prefilled pilot request. With no number or email set, it falls back to "Create a free account" (/signup).
e2e/ holds Playwright tests for the critical journeys: sign-up and instructor approval,
cookie sessions and silent refresh, password change and reset, email verification,
organisations and tenant isolation, invitations, and the course editor. Every spec also
fails on any uncaught page error or Content-Security-Policy violation.
They run against the production build served with vercel.json's exact headers and
/api rewrite (e2e/support/prodlike-server.mjs), a real backend and a real PostgreSQL
database. Playwright starts both servers itself.
Prerequisites: the backend checked out next to this repo (../Ed-Tech-Platform-backend,
or set BACKEND_DIR) with npm install done, and a disposable PostgreSQL database.
createdb edtech_e2e
DATABASE_URL="postgresql://localhost:5432/edtech_e2e" npm run e2eEmails (verification, reset, invitations) are never sent: the backend's development mailer prints them to its log, and the tests follow the links from there. CI runs the suite on every pull request in both repositories, so a backend change that breaks the UI fails too; a failed run uploads the HTML report and traces as an artifact.
See docs/SETUP.md for full backend + frontend setup, and docs/ARCHITECTURE.md,
docs/FLOW.md, docs/PRD.md for design details.
Current status, audit findings and roadmap: PROJECT_STATUS.md, docs/audit/, docs/ENTERPRISE_ROADMAP.md.
Bug reports, feature ideas, docs fixes and pull requests are welcome. Start with CONTRIBUTING.md and the Code of Conduct; bugs and feature requests use the issue forms in this repository.
The landing page (/) is built from real product data: screenshots of the running app and
live repository numbers from the public GitHub API. Repository links live in one place:
src/config/site.ts.
No licence has been chosen for the project yet.
