Scalable payment gateway platform for Namibia - Microservices architecture
# Payment Gateway Platform
A highly scalable, microservices-based payment gateway for Namibia.
## π Quick Start
### Prerequisites
- Node.js 20+
- pnpm 8+
- Docker & Docker Compose
### Setup
```bash
# Install dependencies
pnpm install
# Copy environment file
cp .env.example .env
# Start infrastructure (PostgreSQL, Redis)
pnpm docker:up
# Run database migrations
pnpm migrate
# Seed test data
pnpm seed
# Start all services in development mode
pnpm dev
```
## π Project Structure
```
βββ docs/ # Architecture & API documentation
βββ config/ # Environment-specific configs
βββ libs/ # Shared libraries
βββ services/ # Microservices
βββ frontend/ # React apps
βββ scripts/ # Migrations & utilities
βββ logs/ # Centralized logs
βββ monitoring/ # Prometheus/Grafana
```
## π§ Services
| Service | Port | Description |
|---------|------|-------------|
| API Gateway | 3000 | Entry point, routing, rate limiting |
| Auth Service | 3001 | Authentication & authorization |
| Payment Orchestrator | 3003 | Payment flow coordination |
| Wallet Service | 3004 | Wallet management |
| Ledger Service | 3005 | Double-entry accounting |
| Transaction Service | 3006 | Transaction processing |
| Bank Integration | 3007 | Bank API integration (simulated) |
| Payment Rail | 3008 | Card/Mobile money (simulated) |
| Risk & Fraud | 3009 | Fraud detection |
| Notification | 3010 | SMS/Email/Push |
| Reconciliation | 3011 | Settlement & reconciliation |
| Admin Service | 3012 | Admin operations |
## π οΈ Development
```bash
# Run specific service
pnpm --filter auth-service dev
# Run tests
pnpm test
# Lint code
pnpm lint
# Format code
pnpm format
```
## π Admin UIs
- **pgAdmin**:
localhost (admin@payment-gateway.local / admin123)
- **Redis Commander**:
localhost
## ποΈ Technology Stack
- **Backend**: Node.js, TypeScript, Express
- **Database**: PostgreSQL, Redis
- **Mobile**: React β¦