🎉 init: 小龙的工作空间
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
# OAFlow — 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
|
||||
|
||||
#### contracts
|
||||
- `GET /api/contracts` — List
|
||||
- `GET /api/contracts/:id` — Get
|
||||
- `POST /api/contracts` — Create
|
||||
- `PUT /api/contracts/:id` — Update
|
||||
- `DELETE /api/contracts/:id` — Delete
|
||||
|
||||
#### approvals
|
||||
- `GET /api/approvals` — List
|
||||
- `GET /api/approvals/:id` — Get
|
||||
- `POST /api/approvals` — Create
|
||||
- `PUT /api/approvals/:id` — Update
|
||||
- `DELETE /api/approvals/:id` — Delete
|
||||
|
||||
#### customers
|
||||
- `GET /api/customers` — List
|
||||
- `GET /api/customers/:id` — Get
|
||||
- `POST /api/customers` — Create
|
||||
- `PUT /api/customers/:id` — Update
|
||||
- `DELETE /api/customers/:id` — Delete
|
||||
|
||||
#### reminders
|
||||
- `GET /api/reminders` — List
|
||||
- `GET /api/reminders/:id` — Get
|
||||
- `POST /api/reminders` — Create
|
||||
- `PUT /api/reminders/:id` — Update
|
||||
- `DELETE /api/reminders/:id` — Delete
|
||||
|
||||
#### employees
|
||||
- `GET /api/employees` — List
|
||||
- `GET /api/employees/:id` — Get
|
||||
- `POST /api/employees` — Create
|
||||
- `PUT /api/employees/:id` — Update
|
||||
- `DELETE /api/employees/:id` — Delete
|
||||
|
||||
#### attendance
|
||||
- `GET /api/attendance` — List
|
||||
- `GET /api/attendance/:id` — Get
|
||||
- `POST /api/attendance` — Create
|
||||
- `PUT /api/attendance/:id` — Update
|
||||
- `DELETE /api/attendance/:id` — Delete
|
||||
|
||||
#### items
|
||||
- `GET /api/items` — List
|
||||
- `GET /api/items/:id` — Get
|
||||
- `POST /api/items` — Create
|
||||
- `PUT /api/items/:id` — Update
|
||||
- `DELETE /api/items/:id` — Delete
|
||||
|
||||
#### performance
|
||||
- `GET /api/performance` — List
|
||||
- `GET /api/performance/:id` — Get
|
||||
- `POST /api/performance` — Create
|
||||
- `PUT /api/performance/:id` — Update
|
||||
- `DELETE /api/performance/:id` — Delete
|
||||
|
||||
### System
|
||||
- `GET /api/health` — Health check
|
||||
|
||||
## Environment Variables
|
||||
|
||||
See `.env.example` for all available configuration.
|
||||
Reference in New Issue
Block a user