EduPlatform — Fullstack Project
一个支持在线课程学习、直播授课、题库练习和学情追踪的教育平台。
Architecture
apps/
├── web/ # Next.js 15 + TypeScript + Tailwind CSS
└── api/ # Fastify 5 + TypeScript + SQLite (sql.js)
packages/
├── shared-types/ # @shared/types — shared TypeScript interfaces
└── shared-config/ # @shared/config — shared configuration
Quick Start
# Install all dependencies (root + workspaces)
npm install
# Start both frontend and backend in dev mode
npm run dev
# Or start individually
npm run dev:web # http://localhost:3000
npm run dev:api # http://localhost:3001
Build
# Build everything
npm run build
# Or individually
npm run build:web
npm run build:api
Testing
# Run API tests
npm test
API Endpoints
Auth
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/me
Resources
users
GET /api/users— ListGET /api/users/:id— GetPOST /api/users— CreatePUT /api/users/:id— UpdateDELETE /api/users/:id— Delete
courses
GET /api/courses— ListGET /api/courses/:id— GetPOST /api/courses— CreatePUT /api/courses/:id— UpdateDELETE /api/courses/:id— Delete
chapters
GET /api/chapters— ListGET /api/chapters/:id— GetPOST /api/chapters— CreatePUT /api/chapters/:id— UpdateDELETE /api/chapters/:id— Delete
students
GET /api/students— ListGET /api/students/:id— GetPOST /api/students— CreatePUT /api/students/:id— UpdateDELETE /api/students/:id— Delete
assignments
GET /api/assignments— ListGET /api/assignments/:id— GetPOST /api/assignments— CreatePUT /api/assignments/:id— UpdateDELETE /api/assignments/:id— Delete
System
GET /api/health— Health check
Environment Variables
See .env.example for all available configuration.