Billing docs improvement + build opt

This commit is contained in:
Stephan D
2026-03-06 16:20:01 +01:00
parent 6633a1d807
commit 54bbe41f7a
79 changed files with 597 additions and 503 deletions

View File

@@ -16,7 +16,7 @@
- [x] Payments Orchestrator Service
- [x] Chain Gateway Service
- [x] MNTX Gateway Service
- [x] TGSettle Gateway Service
- [x] ChimeraSettle Gateway Service
- [x] Notification Service
- [x] BFF (Server) Service
- [x] Frontend (Flutter Web)
@@ -36,7 +36,7 @@
- [x] ci/dev/payments-orchestrator.dockerfile
- [x] ci/dev/chain-gateway.dockerfile
- [x] ci/dev/mntx-gateway.dockerfile
- [x] ci/dev/tgsettle-gateway.dockerfile
- [x] ci/dev/chsettle-gateway.dockerfile
- [x] ci/dev/notification.dockerfile
- [x] ci/dev/bff.dockerfile
- [x] ci/dev/frontend.dockerfile
@@ -93,7 +93,7 @@ Service Layer:
├─ dev-payments-orchestrator → [mongo, nats, ledger, billing-fees]
├─ dev-chain-gateway → [mongo, nats, discovery, vault]
├─ dev-mntx-gateway → [nats, discovery, vault]
├─ dev-tgsettle-gateway → [mongo, nats, discovery, vault]
├─ dev-chsettle-gateway → [mongo, nats, discovery, vault]
├─ dev-notification → [nats]
├─ dev-bff → [mongo, nats, ledger, payments, chain-gateway]
└─ dev-frontend → [bff]
@@ -120,7 +120,7 @@ Service Layer:
### 4. Gateways
- [ ] Chain gateway connects to Vault for keys
- [ ] MNTX gateway is reachable
- [ ] TGSettle gateway connects to Telegram
- [ ] ChimeraSettle gateway is reachable and scenario routing works
### 5. Frontend
- [ ] BFF serves API endpoints
@@ -129,8 +129,8 @@ Service Layer:
## 🐛 Known Considerations
1. **Vault Secrets**: Services using Vault (chain, mntx, tgsettle) need secrets populated
2. **External APIs**: MNTX and TGSettle need API credentials from Vault
1. **Vault Secrets**: Services using Vault (chain, mntx, chsettle) need secrets populated
2. **External APIs**: MNTX needs API credentials from Vault
3. **Blockchain**: Chain gateway needs blockchain node URLs and private keys
4. **Build Time**: Frontend build takes ~5-10 minutes (Flutter compile)
@@ -138,7 +138,7 @@ Service Layer:
- [ ] Populate Vault with blockchain keys for Chain Gateway
- [ ] Add MNTX API credentials to Vault
- [ ] Add TGSettle (Telegram) credentials to Vault
- [ ] Validate ChimeraSettle scenario overrides in test flows
- [ ] Seed test data into MongoDB
- [ ] Configure blockchain RPC endpoints
- [ ] Test full payment flow end-to-end

View File

@@ -11,7 +11,7 @@ Docker Compose + Makefile build system for local development.
**Services:**
- Discovery, Ledger, Billing Fees, Billing Documents, FX Oracle, Payments Orchestrator
- Chain Gateway, MNTX Gateway, TGSettle Gateway
- Chain Gateway, MNTX Gateway, ChimeraSettle Gateway
- FX Ingestor, Notification, BFF (Server), Callbacks, Frontend
## Quick Start
@@ -59,7 +59,7 @@ make status # Check service status
Examples:
- Blockchain private keys (Chain Gateway)
- External API keys (MNTX, TGSettle)
- External API keys (MNTX)
- Webhook signing secrets (Callbacks)
- Production-like secrets

View File

@@ -0,0 +1,36 @@
# Development Dockerfile for chsettle-gateway Service with Air hot reload
FROM golang:alpine AS builder
RUN apk add --no-cache bash git build-base protoc protobuf-dev && \
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest && \
go install github.com/air-verse/air@latest
WORKDIR /src
COPY api/proto ./api/proto
COPY api/pkg ./api/pkg
COPY api/gateway/common ./api/gateway/common
COPY ci/scripts/proto/generate.sh ./ci/scripts/proto/
RUN bash ci/scripts/proto/generate.sh
# Runtime stage for development with Air
FROM golang:alpine
RUN apk add --no-cache bash git build-base && \
go install github.com/air-verse/air@latest
WORKDIR /src
# Copy generated proto and pkg from builder
COPY --from=builder /src/api/proto ./api/proto
COPY --from=builder /src/api/pkg ./api/pkg
COPY --from=builder /src/api/gateway/common ./api/gateway/common
# Source code will be mounted at runtime
WORKDIR /src/api/gateway/chsettle
EXPOSE 50080 9406
CMD ["air", "-c", ".air.toml", "--", "-config.file", "/app/config.yml", "-debug"]