🎉 init: 小龙的工作空间
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
# 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
|
||||
|
||||
```bash
|
||||
# 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
|
||||
|
||||
```bash
|
||||
# Build everything
|
||||
npm run build
|
||||
|
||||
# Or individually
|
||||
npm run build:web
|
||||
npm run build:api
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
```bash
|
||||
# Run API tests
|
||||
npm test
|
||||
```
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Auth
|
||||
- `POST /api/auth/register`
|
||||
- `POST /api/auth/login`
|
||||
- `GET /api/auth/me`
|
||||
|
||||
### Resources
|
||||
#### users
|
||||
- `GET /api/users` — List
|
||||
- `GET /api/users/:id` — Get
|
||||
- `POST /api/users` — Create
|
||||
- `PUT /api/users/:id` — Update
|
||||
- `DELETE /api/users/:id` — Delete
|
||||
|
||||
#### courses
|
||||
- `GET /api/courses` — List
|
||||
- `GET /api/courses/:id` — Get
|
||||
- `POST /api/courses` — Create
|
||||
- `PUT /api/courses/:id` — Update
|
||||
- `DELETE /api/courses/:id` — Delete
|
||||
|
||||
#### chapters
|
||||
- `GET /api/chapters` — List
|
||||
- `GET /api/chapters/:id` — Get
|
||||
- `POST /api/chapters` — Create
|
||||
- `PUT /api/chapters/:id` — Update
|
||||
- `DELETE /api/chapters/:id` — Delete
|
||||
|
||||
#### students
|
||||
- `GET /api/students` — List
|
||||
- `GET /api/students/:id` — Get
|
||||
- `POST /api/students` — Create
|
||||
- `PUT /api/students/:id` — Update
|
||||
- `DELETE /api/students/:id` — Delete
|
||||
|
||||
#### assignments
|
||||
- `GET /api/assignments` — List
|
||||
- `GET /api/assignments/:id` — Get
|
||||
- `POST /api/assignments` — Create
|
||||
- `PUT /api/assignments/:id` — Update
|
||||
- `DELETE /api/assignments/:id` — Delete
|
||||
|
||||
### System
|
||||
- `GET /api/health` — Health check
|
||||
|
||||
## Environment Variables
|
||||
|
||||
See `.env.example` for all available configuration.
|
||||
Reference in New Issue
Block a user