1.5 KiB
1.5 KiB
ADR 0005: Frontend and Backend in Separate Repositories
Date: 2026-04-26 Status: Accepted
Context
The frontend (Angular SPA) and backend (Express API) are distinct deployment units with different runtimes, dependencies, and release cycles. Two organisational options exist:
- Monorepo — single repository containing both applications, possibly managed with Nx or Turborepo.
- Separate repositories — each application in its own repository with independent versioning.
Decision
Maintain two separate repositories: adastra_app (frontend) and adastra_api (backend). Both are treated as a single product during development — tasks that span both (e.g. adding a new API endpoint and its frontend consumer) are handled in a single working session across both repos.
Consequences
- Positive: Independent dependency management. Frontend and backend
package.jsonfiles don't interfere with each other. - Positive: Simpler CI/CD pipeline per repo when production deployment is set up.
- Positive: Each repo's git history reflects only its own changes.
- Negative: No shared type definitions between frontend and backend. API contract changes must be coordinated manually.
- Negative: Cross-repo changes require two separate commits/PRs. A monorepo would allow atomic cross-boundary commits.
- Tooling note: The Angular frontend's
CLAUDE.mddeclaresadastra_apias an additional working directory so that cross-repo tasks can be handled in a single session.