Skip to content

Wajd27/Classera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Classera Educational Platform

Multi-tenant educational platform for managing small educational institutes.

Project structure

Classera/
├── README.md                 # This file (only doc at repo root)
├── docs/                     # All other documentation
│   ├── design/               # UI / design system
│   ├── project/              # Structure, recovery notes
│   ├── archive/              # Milestone / historical notes
│   └── database/             # DB reference (schema notes, API docs, security)
├── web/                      # Next.js app (UI + API routes, Prisma)
├── database/                 # SQL schema, policies, seeds, diagrams
└── scripts/                  # Helper scripts (e.g. git push helpers)

Quick start

1. Database

cd database
psql -U postgres -d classera -f schema/01_core_tables.sql
# … run remaining schema files as in database/README.md

2. Web app

cd web
npm install
copy .env.local.example .env.local
# Edit .env.local with your database URL and secrets
npx prisma generate
npm run dev

The dev script runs Next.js on port 3001 (see web/package.json). Open http://localhost:3001 and set NEXTAUTH_URL in web/.env.local to the same origin.

For a database schema that matches the Prisma models (typical local dev), run cd web && npx prisma db push after PostgreSQL is up, or apply the SQL under database/ as described in database/README.md.

Testing

Kind Command Notes
Unit + API routes cd web && npm test Vitest: lib/**/*.test.ts (pure helpers) and tests/api/**/*.test.ts (HTTP handlers with mocked session/DB; no database)
Integration From web/: npm run test:integration Vitest, tests/integration/**/*.test.ts, uses DATABASE_URL (.env.local is loaded when not in CI). Run npx prisma db push first so the schema matches.
E2E smoke From web/: npm run test:e2e (starts npm run dev on 3001 when CI is unset). In CI, run after npm run build; Playwright starts next start -p 3001. Playwright: e2e/smoke.spec.ts (login page, /api/health liveness, /api/health/ready). Readiness needs a working DATABASE_URL.

GitHub Actions (.github/workflows/web-ci.yml) runs unit tests, integration tests, Playwright smoke, lint, typecheck, and build on every web/** change. Step-by-step CI behavior, env vars, and troubleshooting: docs/project/CI_AND_TESTING.md.

Documentation

Topic Location
Index docs/README.md
CI & testing docs/project/CI_AND_TESTING.md
Design system docs/design/DESIGN_SYSTEM.md
Database schema & API reference docs/database/
Web app (Next.js) web/README.md
Production deploy docs/project/DEPLOYMENT.md
Migrations / Prisma vs SQL docs/project/MIGRATIONS.md
Database setup (SQL) database/README.md

Features

  • PostgreSQL schema with RLS-oriented design
  • Multi-tenant institute model
  • Next.js 14 (App Router) with Prisma and NextAuth
  • Session, course, user, payment, and exam APIs; exams also have a dashboard list/create flow (see docs/project/EXAMS_SCOPE.md)

Tech stack

  • App: Next.js 14, React, TypeScript, Tailwind, Prisma, NextAuth
  • Database: PostgreSQL

Security

  • Row Level Security policies in SQL (see database/policies/)
  • JWT / session handling via NextAuth (see web/lib/auth.ts)

License

Private — educational platform.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors