Files
vmall/docs/code_index/platform.md
T
Chengdong ZhangandCursor a46148adcf Add Chatty landing page with SaaS plan option selection
- /chatty landing with catalog-backed SaaS plans and an independent
  deployment enquiry form (sales_enquiries table, rate-limited
  POST /api/enquiries, admin review page)
- /chatty/buy lets buyers pick term, users and storage from the plan's
  catalog SKUs (plan/term_months/users/storage_gb attributes); the
  selection is kept in the URL and only the chosen SKU goes to the cart
- Recognise Chatty orders by shop on payment and success pages
- Clear the checkout idempotency key after success or a 409
- Demo seed grid of option SKUs, docs and OpenSpec specs

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-30 16:19:55 +08:00

2.5 KiB

Index: Platform (identity, accounts, shops, content, currency, addresses)

Domain design: docs/domains/platform.md. Specs: openspec/specs/auth/, customer-accounts/, wallet/, settlement/, merchant-onboarding/, membership/, messaging/, store-directory/, storefront-content/, currency/, address-book/, rbac/.

Backend (apps/api)

Module Holds
modules/identity/ register/login/me; admin user role assignment
modules/account/ customer_accounts ledger; credit/debit/freeze/release, ensure_monetary_account
modules/wallet/ demo recharge, guarded withdrawal freeze + one-time admin review, paginated own fund entries
modules/settlement/ idempotent per-shop weekly/monthly statements, commission-rate setting, one-time payout confirmation
modules/shop/ shop CRUD/status, profiles, PUT /shop/profile merchant self-write
modules/merchant_onboarding/ merchant applications (personal/enterprise), guarded review, transactional approval provisioning
modules/membership/ member level catalog, growth accrual ledger, one-way level upgrade, derived status
modules/messaging/ event-driven system messages, unread/read state, soft delete, unread count
modules/content/ four home-content kinds, whole-list replacement
modules/currency/ currency registry, rates, convert endpoint
modules/address/ customer address book
modules/enquiry/ public sales-enquiry submission (validation, client-token replay, Redis per-email/per-IP limits), admin list + guarded status transitions
src/http/client_ip.rs ClientIp extractor (socket peer address; used for enquiry rate limits)
src/auth.rs AuthUser, require, own_shop, require_shop
src/error.rs ApiError envelope, unique_conflict
src/money.rs convert_minor

Tests: tests/auth.rs, tests/accounts.rs, tests/wallet.rs, tests/settlement.rs, tests/merchant_applications.rs, tests/membership.rs, tests/messaging.rs, tests/shops.rs, tests/content.rs, tests/addresses.rs, tests/catalog.rs (currency too), tests/enquiries.rs, tests/chatty_purchase.rs (Chatty plans through the standard cart/checkout).

Frontends

  • Mall: pages/login.vue, pages/register.vue, header/footer shell in layouts//app.vue, pages/user/addresses.vue
  • Shop-admin: pages/shop-profile.vue
  • Admin: pages/users.vue, pages/shops.vue, pages/content.vue, pages/brands.vue, pages/currencies.vue, pages/member-levels.vue, pages/enquiries.vue