readme updated key design decisions
This commit is contained in:
parent
bf989e6b82
commit
5e6a770737
@ -12,15 +12,13 @@ Backend (Fastify) → OpenAPI Spec → Generated API Client → Frontend (SolidJ
|
||||
|
||||
### Key Design Decisions
|
||||
|
||||
1. **OpenAPI-First API Design**: The backend uses Fastify with `@fastify/swagger` to automatically generate OpenAPI specifications from TypeScript schemas.
|
||||
1. **Schema-First API Design**: Backend schemas (TypeBox/JSONSchema) are the single source of truth. The OpenAPI specification is automatically generated from these schemas and actual route definitions using Fastify's `@fastify/swagger`, ensuring the API contract always reflects the actual backend implementation.
|
||||
|
||||
2. **Automatic Client Generation**: The `api-client-backend` package uses `@hey-api/openapi-ts` to generate a fully typed API client from the OpenAPI spec, ensuring type safety across the stack.
|
||||
|
||||
3. **Turborepo Watch Mode**: Development workflow uses Turborepo's watch feature to orchestrate the entire pipeline automatically - when you change an API schema, the OpenAPI spec is regenerated, the client is regenerated, and the frontend picks up changes via HMR.
|
||||
|
||||
4. **PNPM Workspace**: All packages are managed in a monorepo with workspace protocol for instant local dependency updates.
|
||||
|
||||
5. **Environment-Based Configuration**: Frontend uses Vite's environment variable system (`VITE_*` prefix) for runtime configuration.
|
||||
4. **Bare Metal Development**: Apps and packages run directly on the host machine (not containerized) for faster iteration, better debugging, and native tool integration. Only external dependencies like PostgreSQL run in Docker containers via `docker-compose`.
|
||||
|
||||
## What's inside?
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user