From f5052f6cf8650110342dc528bba2c3baed53be53 Mon Sep 17 00:00:00 2001 From: Stephan D Date: Wed, 11 Feb 2026 10:31:17 +0100 Subject: [PATCH] Readme --- Makefile | 51 ++++++++++++++++++++++++++++- README.md | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/Makefile b/Makefile index 236f48b6..fae8663b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Sendico Development Environment - Makefile # Docker Compose + Makefile build system -.PHONY: help init build up down restart logs rebuild clean vault-init proto +.PHONY: help init build up down restart logs rebuild clean vault-init proto update update-api update-frontend test test-api test-frontend COMPOSE := docker compose -f docker-compose.dev.yml --env-file .env.dev SERVICE ?= @@ -43,6 +43,12 @@ help: @echo "" @echo "$(YELLOW)Development:$(NC)" @echo " make proto Generate protobuf code" + @echo " make update Update all dependencies (Go + Flutter)" + @echo " make update-api Update Go dependencies only" + @echo " make update-frontend Update Flutter dependencies only" + @echo " make test Run all tests (API + frontend)" + @echo " make test-api Run Go API tests only" + @echo " make test-frontend Run Flutter tests only" @echo " make health Check service health" @echo "" @echo "Examples:" @@ -264,3 +270,46 @@ build-api: build-frontend: @echo "$(GREEN)Building frontend...$(NC)" @$(COMPOSE) build dev-frontend + +# Update all dependencies +update: update-api update-frontend + +# Update Go API dependencies +update-api: + @echo "$(GREEN)Updating Go dependencies...$(NC)" + @for dir in $$(find api -name go.mod -exec dirname {} \;); do \ + echo "Updating $$dir..."; \ + (cd "$$dir" && go get -u ./... && go mod tidy); \ + done + @echo "$(GREEN)✅ Go dependencies updated$(NC)" + +# Update Flutter dependencies +update-frontend: + @echo "$(GREEN)Updating Flutter dependencies...$(NC)" + @cd frontend/pshared && flutter pub upgrade --major-versions + @cd frontend/pweb && flutter pub upgrade --major-versions + @echo "$(GREEN)✅ Flutter dependencies updated$(NC)" + +# Run all tests +test: test-api test-frontend + +# Run Go API tests +test-api: + @echo "$(GREEN)Running API tests...$(NC)" + @failed=""; \ + for dir in $$(find api -name go.mod -exec dirname {} \;); do \ + echo "Testing $$dir..."; \ + (cd "$$dir" && go test ./...) || failed="$$failed $$dir"; \ + done; \ + if [ -n "$$failed" ]; then \ + echo "$(YELLOW)Failed:$$failed$(NC)"; \ + exit 1; \ + fi + @echo "$(GREEN)✅ All API tests passed$(NC)" + +# Run Flutter tests +test-frontend: + @echo "$(GREEN)Running frontend tests...$(NC)" + @cd frontend/pshared && flutter test + @cd frontend/pweb && flutter test + @echo "$(GREEN)✅ All frontend tests passed$(NC)" diff --git a/README.md b/README.md new file mode 100644 index 00000000..b0e514d8 --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +# Sendico + +[![Build Status](https://ci.sendico.io/api/badges/1/status.svg)](https://ci.sendico.io) + +Financial services platform providing payment orchestration, ledger accounting, FX conversion, and multi-rail payment processing. + +## Architecture + +- **Backend**: Go microservices with gRPC inter-service communication +- **Frontend**: Flutter/Dart web application +- **Infrastructure**: Woodpecker CI/CD, Docker, MongoDB, NATS, Vault + +## Services + +| Service | Path | Description | +|---------|------|-------------| +| Discovery | `api/discovery/` | Service registry | +| Ledger | `api/ledger/` | Double-entry accounting | +| Orchestrator | `api/payments/orchestrator/` | Payment orchestration | +| Quotation | `api/payments/quotation/` | Payment quotation | +| Billing Fees | `api/billing/fees/` | Fee calculation | +| Billing Documents | `api/billing/documents/` | Billing documents | +| FX Oracle | `api/fx/oracle/` | FX quote provider | +| FX Ingestor | `api/fx/ingestor/` | FX rate ingestion | +| Gateway Chain | `api/gateway/chain/` | EVM blockchain gateway | +| Gateway TRON | `api/gateway/tron/` | TRON blockchain gateway | +| Gateway MNTX | `api/gateway/mntx/` | Card payouts | +| Gateway TGSettle | `api/gateway/tgsettle/` | Settlements | +| Notification | `api/notification/` | Notifications | +| BFF | `api/server/` | Backend for frontend | +| Frontend | `frontend/pweb/` | Flutter web UI | + +## Development + +Development uses Docker Compose via the Makefile. Run `make help` for all available commands. + +### Quick Start + +```bash +make init # First-time setup (generates keys, .env.dev, builds images) +make up # Start all services +make vault-init # Initialize Vault (if needed) +``` + +### Common Commands + +```bash +make build # Build all service images +make up # Start all services +make down # Stop all services +make restart # Restart all services +make status # Show service status +make logs # View all logs +make logs SERVICE=dev-ledger # View logs for a specific service +make rebuild SERVICE=dev-ledger # Rebuild and restart a specific service +make clean # Remove all containers and volumes +``` + +### Selective Start + +```bash +make infra-up # Start infrastructure only (MongoDB, NATS, Vault) +make services-up # Start application services only (assumes infra is running) +``` + +### Build Groups + +```bash +make build-core # discovery, ledger, fees, documents +make build-fx # oracle, ingestor +make build-payments # orchestrator +make build-gateways # chain, tron, mntx, tgsettle +make build-api # notification, bff +make build-frontend # Flutter web UI +``` + +### Protobuf Generation + +```bash +make proto +``` + +### Testing + +```bash +make test # Run all tests (API + frontend) +make test-api # Run Go API tests only +make test-frontend # Run Flutter tests only +``` + +### Update Dependencies + +```bash +make update # Update all Go and Flutter dependencies +make update-api # Update Go dependencies only +make update-frontend # Update Flutter dependencies only +``` -- 2.49.1