Commit 62ffcb0
committed
refactor(api): ✨ Centralize services, middleware, and schemas
- Restructure API services into domain-specific folders (auth, agencies, documents, requests, security, operations, templates).
- Centralize shared utilities (lib, utils, validators) and barrel export them using `@/` aliases.
- Migrate legacy `api/src/routes/` structure to use OpenAPI pattern exclusively, removing legacy route files.
- Introduce `middleware/shared.middleware.ts` for centralized cache control and error handling utilities.
- Update all imports across the API to use the new `@/` alias structure.
- Add `middleware.ts` to Astro app for setting standard security headers (CSP, X-Frame-Options, etc.).
- Add mock for `bun:sqlite` to enable Vitest (Node.js) testing environment.1 parent 5ed0dc6 commit 62ffcb0
106 files changed
Lines changed: 5488 additions & 7253 deletions
File tree
- apps
- api
- data
- drizzle
- meta
- src
- config
- db
- lib
- middleware
- routes
- agencies
- auth
- documents
- redaction
- requests
- templates
- services
- agencies
- auth
- documents
- operations
- requests
- security
- templates
- types
- utils
- validators
- tests
- __mocks__
- security
- astro
- cypress
- e2e
- support
- src
- components/react
- lib
- tests/lib
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
1 | 23 | | |
2 | 24 | | |
3 | 25 | | |
| |||
Binary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
1 | 21 | | |
2 | 22 | | |
3 | 23 | | |
| |||
0 commit comments