Domain stays pure
Preferences, rules, product intent, money, time, and state transitions import no NestJS, Playwright, ORM, or model SDK.
The prototype begins as a TypeScript modular monolith with separate Nuxt, API, and worker entrypoints. Clean ports isolate every unstable external dependency.
Preferences, rules, product intent, money, time, and state transitions import no NestJS, Playwright, ORM, or model SDK.
OpenAI, Anthropic, Chrome, Browserbase, Stop & Shop pages, notifications, and secret storage implement internal contracts.
Only Order Orchestration coordinates cart changes. Scheduling triggers work; Intelligence only proposes; Rules decide deterministically.
| Runtime | Owns | May call | Must not do |
|---|---|---|---|
| Nuxt web | SSR, dashboard, settings, review, live status | Application API | Direct database, provider, or retailer access |
| Node API | Authentication, commands, queries, SSE, consent | Application services and Postgres | Start browser sessions or run long jobs inline |
| Node worker | Durable tasks, browser sessions, retailer operations | Module services, adapters, Postgres | Accept public user traffic |
It is the consistency boundary for schedule deduplication, workflow state, approval snapshots, job outbox, and audit history. A separate Redis or broker is unnecessary for the prototype.
trace_id
→ schedule_occurrence_id
→ order_cycle_id
→ job_id
→ browser_session_id
→ retailer_operation_id
→ intelligence_run_id
→ audit_event_id