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:
Siavash Sameni
2026-06-12 11:42:18 +04:00
parent 18073afb52
commit e52ffce48a
18 changed files with 2619 additions and 1102 deletions

View File

@@ -4,13 +4,13 @@ tags: [moc, index]
created: 2026-05-23
---
vase in app mikham
# Amn Marketplace — Documentation Vault
Complete technical & operational documentation for the **Amn** (a.k.a. "nick app") crypto-escrow marketplace platform. This vault is exhaustive enough to **re-implement the system from scratch** with no access to the source code.
> [!info]
> **Repos:** `git@git.manko.yoga:222/nick/{backend,frontend}.git` · **Active backend integration branch:** `integrate-main-into-development` · **Current backend baseline:** `2.6.79` at `3a50dc4` · **Vault generated:** 2026-05-23
> **Repos:** `backend/`, `frontend/`, `deployment/`, `scanner/`, `amanat-assist/`, `nick-doc/` under `git@git.tbs.amn.gg:escrow/*` · **Current multi-shop branch:** `feature/white-label-shops` · **Frontend/backend baseline:** `2.11.49` · **Latest full repo scan:** [[Multi-Shop Branch Project Scan - 2026-06-10]]
---
@@ -44,8 +44,8 @@ Project context, the cast of characters, and shared vocabulary.
How the system is composed at every layer.
- [[System Architecture]] — end-to-end topology + request lifecycle
- [[Backend Architecture]] — Express 5 + Mongoose + Socket.IO module map, plus current Postgres migration layer status
- [[Database Strategy - Mongo vs Postgres Assessment]] — current Mongo primary posture and Postgres cutover assessment
- [[Backend Architecture]] — Express 5 + Socket.IO module map, plus current Postgres/Drizzle runtime status
- [[Database Strategy - Mongo vs Postgres Assessment]] — migration context and historical assessment
- [[Frontend Architecture]] — Next.js 16 App Router + provider tree
- [[Request Network Integration Constraints]] — current RN integration constraints and rollout gates
- [[PRD - Decentralized Custody and Smart-Contract Escrow Roadmap]] — custody decentralization and smart-contract decision roadmap
@@ -58,7 +58,8 @@ How the system is composed at every layer.
Per-entity Mongoose schemas — fields, relationships, state machines.
- [[Data Model Overview]] — ER-style map + reading order
- [[Postgres Runtime Cutover Status]] — what is actually using Postgres vs still Mongo-backed on `integrate-main-into-development`
- [[Postgres Runtime Cutover Status]] — what is actually using Postgres vs legacy migration context
- [[Tenant]] — white-label tenant tables, domains, bots, integrations, payment policies, roles
- Core entities: [[User]] · [[PurchaseRequest]] · [[SellerOffer]] · [[Payment]] · [[Chat]] · [[Notification]] · [[Dispute]]
- Marketplace extras: [[RequestTemplate]] · [[ShopSettings]] · [[Category]] · [[Review]]
- User extras: [[Address]] · [[TempVerification]]
@@ -76,7 +77,7 @@ Every endpoint, grouped by service. Auth, request/response shapes, errors, socke
- Real-time / messaging: [[Chat API]] · [[Notification API]] · [[Socket Events]]
- Disputes & ratings: [[Dispute API]]
- Content: [[Blog API]]
- Admin & ops: [[Admin API]]
- Admin & ops: [[Admin API]] · [[Tenant API]]
- Loyalty: [[Points API]]
- Utility: [[File API]] · [[AI API]]
- Errors: [[Error Codes]]
@@ -89,7 +90,7 @@ End-to-end narratives for every user-visible interaction, with Mermaid sequence/
- [[Authentication Flow]] · [[Registration Flow]] · [[Google OAuth Flow]] · [[Passkey (WebAuthn) Flow]] · [[Password Reset Flow]]
**Marketplace**
- [[Purchase Request Flow]] · [[Seller Offer Flow]] · [[Negotiation Flow]]
- [[Purchase Request Flow]] · [[Seller Offer Flow]] · [[Negotiation Flow]] · [[Tenant Storefront Flow]]
**Money**
- [[PRD - Request Network In-House Checkout]] · [[Payment Flow - DePay & Web3]] · [[Escrow Flow]] · [[Payout Flow]] · [[PRD - Decentralized Custody and Smart-Contract Escrow Roadmap]]