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 …