docs: sync vault with codebase state (2026-06-12)
- Update backend, frontend, scanner, deployment, amanat-assist service docs - Update System Overview, Scanner Architecture, Telegram Mini App flow - Update 10 - Services/README.md - Add Tenant data model, Tenant API reference, Tenant Storefront Flow - Add Multi-Shop Branch Project Scan (2026-06-10) - Add tenant.md service doc - Append activity log entry - Reflects archived/search/stats route fix and new E2E test suite Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
# 10 - Services
|
||||
|
||||
This section documents each deployable service (sub-project) in the Amanat/Escrow platform. Each article covers the service's purpose, configuration, build process, and operational notes.
|
||||
|
||||
See also: [[01 - Architecture]] · [[08 - Operations]] · [[03 - API Reference]]
|
||||
This section documents every deployable service (sub-project) in the Amanat / Escrow platform. Each page covers the service's purpose, tech stack, configuration, and operational notes.
|
||||
|
||||
---
|
||||
|
||||
## Service Inventory
|
||||
## Service Directory
|
||||
|
||||
| Service | Language / Framework | Status | URL | Doc |
|
||||
|---|---|---|---|---|
|
||||
| Backend | Node.js / TypeScript (Express) | Live | `api.dev.amn.gg` | [[backend]] |
|
||||
| Frontend | Next.js / React / TypeScript | Live | `dev.amn.gg` | [[frontend]] |
|
||||
| Backend API | Node.js / TypeScript (Express) | Live | `dev.amn.gg/api`, `multi.amn.gg/api` | [[backend]] |
|
||||
| Frontend | Next.js 14 / React / TypeScript | Live | `dev.amn.gg`, `multi.amn.gg` | [[frontend]] |
|
||||
| Scanner | Go | Live | internal | [[scanner]] |
|
||||
| Amanat Assist | Node.js / TypeScript + LLM proxy | Live | `assist.dev.amn.gg` | [[amanat-assist]] |
|
||||
| Deployment | Docker Compose + Caddy + Watchtower | Live | — | [[deployment]] |
|
||||
| Amanat Assist | Node.js / TypeScript + Telegram Bot API | Live | `assist.dev.amn.gg` | [[amanat-assist]] |
|
||||
| Deployment | Docker Compose + Caddy + Watchtower | Live | `arcane.tbs.amn.gg` | [[deployment]] |
|
||||
|
||||
---
|
||||
|
||||
@@ -24,30 +22,34 @@ See also: [[01 - Architecture]] · [[08 - Operations]] · [[03 - API Reference]]
|
||||
Browser / Telegram Mini App
|
||||
│
|
||||
▼
|
||||
infra-caddy (reverse proxy, TLS)
|
||||
├── dev.amn.gg → [[frontend]] (Next.js SSR)
|
||||
├── api.dev.amn.gg → [[backend]] (Express REST + WebSocket)
|
||||
└── assist.dev.amn.gg → [[amanat-assist]] (LLM proxy / Telegram bot)
|
||||
infra-caddy (reverse proxy, TLS, ports 80/443)
|
||||
├── dev.amn.gg / multi.amn.gg → [[frontend]] (Next.js SSR)
|
||||
├── */api → [[backend]] (Express REST + WebSocket)
|
||||
└── assist.dev.amn.gg → [[amanat-assist]] (LLM proxy + Telegram mini-app)
|
||||
|
||||
[[backend]]
|
||||
├── MongoDB / PostgreSQL (dual-write seam, PG cutover in progress)
|
||||
├── Redis (sessions, rate-limit, pub-sub)
|
||||
├── PostgreSQL (Drizzle ORM — primary store)
|
||||
├── MongoDB (legacy read path, being retired)
|
||||
├── Redis (sessions, rate-limit, pub-sub)
|
||||
└── emits payment events
|
||||
│
|
||||
▼
|
||||
[[scanner]] (Go — watches EVM chains for on-chain payments)
|
||||
│ webhook callback
|
||||
└──────────────────▶ [[backend]] /api/payment/callback
|
||||
│ HTTP webhook on confirmation
|
||||
└──────────────▶ [[backend]] POST /api/payment/callback
|
||||
```
|
||||
|
||||
- All containers share the `shared-web` Docker network managed by [[deployment]].
|
||||
- [[amanat-assist]] is a separate Telegram Mini App; it calls [[backend]] APIs on behalf of users.
|
||||
- [[scanner]] is stateless; it probes RPC endpoints and forwards confirmations to the backend.
|
||||
Integration points:
|
||||
- **[[frontend]] → [[backend]]**: REST `/api/*` and WebSocket via infra-caddy
|
||||
- **[[scanner]] → [[backend]]**: webhook POST on each confirmed on-chain payment
|
||||
- **[[amanat-assist]] → [[backend]]**: reads offers/requests; sends AI-generated replies via Telegram Bot API
|
||||
- **[[backend]] → Telegram**: step notifications for buyer/seller workflow
|
||||
- All services run as Docker containers in Arcane-managed projects on `89.58.32.32`; see [[deployment]] for compose files, env vars, and the `shared-web` network.
|
||||
|
||||
---
|
||||
|
||||
## Related Sections
|
||||
|
||||
- [[01 - Architecture]] — system-wide design decisions, data model, and sequence diagrams
|
||||
- [[03 - API Reference]] — REST endpoints, WebSocket events, auth headers
|
||||
- [[08 - Operations]] — deployment runbooks, monitoring, secrets management
|
||||
- [[03 - API Reference]] — full REST endpoint and WebSocket event reference
|
||||
- [[08 - Operations]] — runbooks, monitoring, secrets management, backup
|
||||
|
||||
Reference in New Issue
Block a user