Files
adastra_app/docs/decisions/0001-migration-from-nextjs-to-angular.md
julien c8e2fba13e docs(adr): convert all ADRs to MADR 2.1.2 format
Rewrites all 12 frontend ADRs from a custom structure to the MADR 2.1.2
template required by the VS Code ADR Manager extension: bullet metadata
(Status/Date), standardised section headings, "Chosen option: X, because Y"
wording, and explicit Pros/Cons blocks per option.
2026-04-26 16:50:34 +02:00

48 lines
1.8 KiB
Markdown

# Migrate frontend from Next.js to Angular
- Status: accepted
- Date: 2026-04-26
## Context and Problem Statement
The project was initially built with Next.js (React). The development team already maintained an existing Angular stack for other projects, creating a knowledge split between two frontend frameworks. Server-side rendering — Next.js's main differentiator — was not required: all data is user-specific and served via authenticated API calls.
## Considered Options
- Keep Next.js/React
- Migrate to Angular
- Migrate to Vue or Svelte
## Decision Outcome
Chosen option: "Migrate to Angular", because the team already maintained an Angular stack for other projects, making it the path of least resistance with no additional knowledge split.
### Positive Consequences
- Single frontend framework across projects — reuse of existing expertise, libraries, and patterns.
- No SSR complexity; the app is a pure SPA, which fits Angular's model naturally.
### Negative Consequences
- Complete rewrite — no incremental migration path exists between React and Angular.
- Next.js artifacts (`.next/`, `src/modules/`, `src/middleware.ts`, etc.) required a dedicated cleanup pass after the migration.
## Pros and Cons of the Options
### Keep Next.js/React
- Good, because no rewrite cost.
- Bad, because maintaining two frontend frameworks in parallel increases overhead.
- Bad, because SSR provides no benefit for this authenticated, user-specific application.
### Migrate to Angular
- Good, because leverages existing team expertise.
- Good, because consistent toolchain across projects.
- Bad, because full rewrite required.
### Migrate to Vue or Svelte
- Good, because smaller bundle size.
- Bad, because no existing team expertise — introduces a third framework.