docs: integrate approved Next Go architecture
This commit is contained in:
1 parent
4485899654
commit
064e155b2f
11 files changed
+287
-5
No files matched your search
@@ -4,6 +4,22 @@
|
||||
|
||||
The Next.js application runs as a Web workload with a separate HTTP-polling Worker. Production server state is stored directly in PostgreSQL through a shared server-only adapter; development and tests can explicitly use local JSON. ACK deploys database migration, Web, Worker, Service, and Ingress resources separately.
|
||||
|
||||
This remains the implemented and deployable architecture. No Go backend code or Go deployment resources have been integrated.
|
||||
|
||||
## Approved Target Architecture
|
||||
|
||||
The accepted target in ADR-003 is a same-origin Next.js frontend plus Go modular-monolith backend:
|
||||
|
||||
| Target component | Responsibility | Constraint |
|
||||
|---|---|---|
|
||||
| Next.js frontend | Pages, static assets, SSR, browser UI | Calls Go over HTTP; no RDS/provider/OSS/business Secret. |
|
||||
| Go backend | Existing HTTP/file contracts, identity, administration, assets, jobs, billing, usage, providers, storage, Webhooks, readiness | Owns relational access and initially embeds WorkerLoop. |
|
||||
| RDS PostgreSQL | Relational state and cross-instance concurrency | Retains versioned migrations and both concurrency-sensitive database functions. |
|
||||
| Migration Job | Schema and application-role grants | Remains one-shot and separate from long-lived workloads. |
|
||||
| Alibaba Cloud OSS | Shared generated/uploaded assets | Must be production-ready before horizontal workload scaling. |
|
||||
|
||||
Ingress will eventually route page/static paths to Next.js and `/api`, `/uploads`, and `/generated-results` to Go. The initial target remains two long-lived Pods (`Next x1 + Go x1`). This target is not yet implemented.
|
||||
|
||||
## Main Components
|
||||
|
||||
| Component | Responsibility | Notes |
|
||||
@@ -24,7 +40,8 @@ The Next.js application runs as a Web workload with a separate HTTP-polling Work
|
||||
|
||||
## Related Decisions
|
||||
|
||||
- `RDS-001`, `RDS-002`, `ACK-001` in the decision index.
|
||||
- Current implementation: `RDS-001`, `RDS-002`, and `ACK-001`.
|
||||
- Accepted target: `ADR-003`; it supersedes ACK-001 only after verified implementation and cutover.
|
||||
|
||||
## Last Updated
|
||||
|
||||
|
||||
Reference in new issue
Block a user