ADR-003: Single Next.js Monolith for MVP
Status: Accepted Date: 2026-02
Context
Envara has several distinct surfaces: marketing site, creator dashboard, respondent questionnaire, report viewer, and API. These could be deployed as separate services or as a single application.
Decision
Build a single Next.js application using the App Router. All surfaces share one codebase, one deployment, and one database connection. Clear directory structure separates concerns for future decomposition if needed.
Alternatives Considered
| Option | Pros | Cons |
|---|---|---|
| Single Next.js app | One deployment, shared code, fast iteration | Monolith risks (coupling, deploy frequency) |
| Separate frontend + API | Clear separation, independent scaling | Two deployments, API contract overhead, slower iteration |
| Micro-frontends | Independent team scaling | Massive overkill for a solo founder |
Consequences
Positive:
- One
git pushdeploys everything. - Shared types, components, and utilities across all surfaces.
- Vercel handles the infrastructure — no ops overhead.
- Developer velocity is maximised during the critical first 8 weeks.
Negative:
- All surfaces share a deploy cycle (mitigated by Vercel preview deployments).
- A bug in the dashboard could theoretically affect the respondent questionnaire (mitigated by route-level error boundaries).
Exit strategy: If scale demands it, the respondent questionnaire (/r/[token]) is the most likely candidate for extraction — it's the highest-traffic, lowest-complexity surface with no auth dependency. The directory structure supports this.