Add NATS account-balance SoT and statement review for customers, CS, and sales
Some checks are pending
offline / test (push) Waiting to run

Internal billing now uses verae.billing.* request-reply and pubs. zappier-account-balance tracks prepaid, credits, usage, and payments. Portal, admin, CS, and sales all review the same statement. Independent Forgejo repos stay split via push-module-repos.
This commit is contained in:
George Lambert 2026-09-11 15:35:37 -04:00
parent a1a5b957fd
commit ac38676645
135 changed files with 3078 additions and 130 deletions

View file

@ -11,7 +11,8 @@ This is the **top document** for install, first-up, and monitoring. Platform-spe
| Piece | Job | Default |
|-------|-----|---------|
| **zappier-edge** | Billing, API keys, customer portal, admin, Stripe; meters then **proxies** to middleware | `:3000` public HTTPS |
| **customer-service** | CS credit additions | `:3011` |
| **account-balance** | NATS prepaid balances (SoT) | `:3010` |
| **customer-service** | CS credit additions + review | `:3011` |
| **sales-pricing** | Per-customer sales quotes | `:3012` |
| **accounting-export** | QuickBooks IIF / CSV | `:3013` |
| **verae-middleware** | Zapier `/zapier/v1`, chain, NATS | `:3100` |
@ -37,13 +38,19 @@ Check:
```bash
curl -fsS http://127.0.0.1:3000/health # zappier-edge (billing + users)
curl -fsS http://127.0.0.1:3010/health # account-balance (NATS SoT)
curl -fsS http://127.0.0.1:3011/health # customer-service
curl -fsS http://127.0.0.1:3012/health # sales-pricing
curl -fsS http://127.0.0.1:3100/health # middleware
```
Open:
- Customer portal: http://127.0.0.1:3000/portal — sign up, copy `x-api-key`
- Admin: http://127.0.0.1:3000/admin
- Customer portal: http://127.0.0.1:3000/portal — sign up, copy `x-api-key`, **Statement** tab
- Admin: http://127.0.0.1:3000/admin — **Statement** per customer
- CS review: http://127.0.0.1:3011/
- Sales review: http://127.0.0.1:3012/
- Accounting review/export: http://127.0.0.1:3013/
- API docs: http://127.0.0.1:3000/docs
Do **not** publish NATS `4222`.

View file

@ -50,8 +50,24 @@ services:
environment:
PORT: "3000"
ZAPPIER_UPSTREAM: http://middleware:3100
NATS_URL: nats://nats1:4222
ports:
- "3000:3000"
depends_on: [nats1, account-balance]
account-balance:
<<: *node
image: node:22-alpine
working_dir: /app
volumes:
- ${MONOREPO:-..}/packages/zappier-account-balance:/app
command: ["node", "src/server.js"]
environment:
PORT: "3010"
NATS_URL: nats://nats1:4222
ports:
- "3010:3010"
depends_on: [nats1]
customer-service:
<<: *node
@ -63,9 +79,11 @@ services:
environment:
PORT: "3011"
ZAPPIER_ADMIN_URL: http://zappier-edge:3000
ACCOUNT_BALANCE_URL: http://account-balance:3010
NATS_URL: nats://nats1:4222
ports:
- "3011:3011"
depends_on: [zappier-edge]
depends_on: [zappier-edge, account-balance, nats1]
sales-pricing:
<<: *node
@ -77,9 +95,11 @@ services:
environment:
PORT: "3012"
ZAPPIER_ADMIN_URL: http://zappier-edge:3000
ACCOUNT_BALANCE_URL: http://account-balance:3010
NATS_URL: nats://nats1:4222
ports:
- "3012:3012"
depends_on: [zappier-edge]
depends_on: [zappier-edge, account-balance, nats1]
accounting-export:
<<: *node
@ -91,9 +111,11 @@ services:
environment:
PORT: "3013"
ZAPPIER_ADMIN_URL: http://zappier-edge:3000
ACCOUNT_BALANCE_URL: http://account-balance:3010
NATS_URL: nats://nats1:4222
ports:
- "3013:3013"
depends_on: [zappier-edge]
depends_on: [zappier-edge, account-balance, nats1]
middleware:
<<: *node