This commit is contained in:
2026-03-03 15:23:00 +00:00
parent 5e3726de39
commit 8e223bfbec
3689 changed files with 955330 additions and 1011 deletions

View File

@@ -10,7 +10,7 @@ This folder contains a standalone mock API for a multi-organization task manager
- task, project, user, and org summary endpoints
- write endpoints for creating tasks and updating task state
- a small test suite covering seeded reads and task mutations
- OpenAPI 3.0.3 document endpoints generated from the route registry
- OpenAPI 3.0.0 document generated by tsoa controllers
- standalone Docker and Compose files for running the mock API by itself
## Domain Model
@@ -132,6 +132,12 @@ Run tests:
bun test
```
Regenerate tsoa routes and OpenAPI spec:
```bash
bun run generate:api
```
Run with Docker Compose from this folder:
```bash
@@ -141,13 +147,16 @@ docker compose up --build
## Files That Matter
- `src/index.ts`: server startup and route dispatch
- `src/routes.ts`: shared route registry, handlers, and request contracts
- `src/openapi.ts`: OpenAPI document generated from the route registry
- `src/controllers/*Controller.ts`: all business endpoint contracts and handlers (tsoa decorators)
- `src/generated/routes.ts`: tsoa-generated Express route registration
- `src/generated/swagger.json`: tsoa-generated OpenAPI document
- `src/openapi.ts`: OpenAPI export used by the `/openapi.json` and `/swagger.json` endpoints
- `src/database.ts`: schema creation and seed data
- `src/repository.ts`: query and mutation helpers
- `scripts/seed.ts`: resets and reseeds the SQLite file
- `tests/repository.test.ts`: repository-level smoke coverage
- `tests/api.test.ts`: HTTP contract and OpenAPI coverage
- `tests/routes.test.ts`: verifies runtime business routes match the generated OpenAPI operations
## What This Mock API Needs To Be Useful