System design for Lexora — a consolidated Next.js platform with durable async workers, database-level tenant isolation and first-class AI observability.
Layered request + async flow across the platform.
Edge / Client
Browser, OAuth, public API surface
Next.js Monolith (App Router)
Single deployable: UI + API + Server Actions
Async Processing
Durable workers decoupled from request lifecycle
Data & Security
Single source of truth with row-level isolation
External Providers
AI, legal data, publishing, billing & observability
Strangler-fig migration off N8N/ECS with zero production downtime.
Foundations
Migrate critical pipelines
Security, billing & observability
Decommission legacy
Condensed ADRs documenting the key trade-offs.
Decision
Adopt a single Next.js App Router deployable for UI, API and server actions.
Rationale
A small team ships faster with one codebase, one deploy and shared types end-to-end. Workers run as separate processes against the same repo, so we keep operational simplicity without sacrificing async scalability. We can extract services later behind stable job contracts.