Service Architecture
Peak Gateway is composed of six Kotlin/Spring Boot microservices deployed on Google Cloud Run.
Services
| Service | Purpose | Key Endpoints |
|---|---|---|
| auth | Authentication, OAuth2 clients, SAML providers, API key management | /v1/auth/*, /v1/oauth-clients/* |
| management | Merchant CRUD, user management, dashboard, audit log, reports | /v1/merchants/*, /v1/users/* |
| processing | Transaction processing, settlements, subscriptions via TransIT | /v1/transactions/*, /v1/settlements/* |
| online-txn | Hosted payments, checkout sessions, webhooks, wallet, tokens | /v1/checkout/*, /v1/webhooks/* |
| device-provisioning | Terminal provisioning, device credentials, activation | /v1/devices/*, /v1/provisioning/* |
| status | Health monitoring, readiness probes | /health |
Infrastructure
- Runtime: Google Cloud Run (auto-scaling, per-request billing)
- Database: Cloud Spanner (via PGAdapter — PostgreSQL wire protocol)
- Auth: Firebase Auth with multi-tenant identity platform
- Build: Bazel monorepo with Kotlin JVM targets
- CI/CD: GitHub Actions → Cloud Build → Cloud Run
- Observability: Structured ECS logging, OpenTelemetry tracing → Cloud Trace
- Notifications: Pub/Sub →
peak-shared-services(SendGrid email, Twilio SMS)
Request Flow
Client → Cloud Run (auth) → Firebase Auth validation
→ Cloud Run (management|processing|online-txn)
→ Cloud Spanner (via PGAdapter)
→ TransIT (for payment processing)
Environments
| Environment | API Domain | Portal |
|---|---|---|
| Production | api.peakgateway.co | admin.peakgateway.co |
| Staging | staging-api.peakgateway.co | staging-admin.peakgateway.co |