43 lines
1.9 KiB
Markdown
43 lines
1.9 KiB
Markdown
# turborepo-pipeline Specification
|
|
|
|
## Purpose
|
|
TBD - created by archiving change migrate-to-turborepo. Update Purpose after archive.
|
|
## Requirements
|
|
### Requirement: Turbo pipeline configuration
|
|
The project SHALL define a `turbo.json` at the repository root that configures build, dev, lint, test, format, and typecheck pipelines with appropriate caching and dependency ordering.
|
|
|
|
#### Scenario: Build pipeline with caching
|
|
- **WHEN** `turbo run build` is executed twice without source changes
|
|
- **THEN** the second run uses cached outputs and completes with "FULL TURBO" status
|
|
|
|
#### Scenario: Topological build ordering
|
|
- **WHEN** `turbo run build` is executed
|
|
- **THEN** packages (shared configs, types) build before apps that depend on them
|
|
|
|
#### Scenario: Parallel execution
|
|
- **WHEN** `turbo run lint` is executed
|
|
- **THEN** server and admin linting run in parallel where dependency graph allows
|
|
|
|
### Requirement: Unified root scripts
|
|
The root `package.json` SHALL provide top-level scripts (`dev`, `build`, `lint`, `format`, `test`, `typecheck`) that delegate to Turborepo or workspace-level commands.
|
|
|
|
#### Scenario: Dev mode starts all apps
|
|
- **WHEN** `npm run dev` is executed at root
|
|
- **THEN** both server (NestJS on port 3003) and admin (Vite on port 3002) start in dev mode
|
|
|
|
#### Scenario: Build produces all outputs
|
|
- **WHEN** `npm run build` is executed at root
|
|
- **THEN** server `dist/` and admin `dist/` are produced
|
|
|
|
### Requirement: Independent workspace scripts
|
|
Each workspace SHALL retain the ability to run its own scripts independently (e.g., `npm run test` inside `apps/server/`).
|
|
|
|
#### Scenario: Server tests run independently
|
|
- **WHEN** `npm run test` is executed inside `apps/server/`
|
|
- **THEN** the NestJS Jest test suite runs and reports results
|
|
|
|
#### Scenario: Admin dev runs independently
|
|
- **WHEN** `npm run dev` is executed inside `apps/admin/`
|
|
- **THEN** the Vite dev server starts on port 3002 with API proxy configured
|
|
|