Files
nick-doc/10 - Services/README.md
Siavash Sameni e52ffce48a 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>
2026-06-12 11:42:18 +04:00

56 lines
2.4 KiB
Markdown

# 10 - Services
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 Directory
| Service | Language / Framework | Status | URL | Doc |
|---|---|---|---|---|
| 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 + Telegram Bot API | Live | `assist.dev.amn.gg` | [[amanat-assist]] |
| Deployment | Docker Compose + Caddy + Watchtower | Live | `arcane.tbs.amn.gg` | [[deployment]] |
---
## Architecture Overview
```
Browser / Telegram Mini App
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]]
├── 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)
│ HTTP webhook on confirmation
└──────────────▶ [[backend]] POST /api/payment/callback
```
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]] — full REST endpoint and WebSocket event reference
- [[08 - Operations]] — runbooks, monitoring, secrets management, backup