π PaySettle - Enterprise Payment Settlement Platform
π¦ Core Settlement Engine
Multi-Merchant Support - Onboard and manage multiple merchants
T+0/T+1/T+2 Settlement Cycles - Configurable per merchant
Double-Entry Ledger - Append-only accounting for all financial events
Batch Processing - Handle high-volume transaction settlement
π Reconciliation Engine
Exact Matching - 100% field match
Fuzzy Matching - Configurable tolerance for amounts
Partial Matching - Match on subset of fields
Manual Resolution - Admin override for edge cases
Dashboard KPIs - Transaction volume, match rate, settlement status
7-Day Trends - Volume and count charts
Alert System - Threshold-based notifications
Audit Trail - Immutable action logging
JWT Authentication - Secure token-based auth
Role-Based Access Control - Admin, Finance Ops, Merchant roles
Rate Limiting - Protect against abuse
Idempotent Operations - Prevent duplicate transactions
The platform features a Violet/Emerald gradient theme with:
π Mesh gradient backgrounds with animated floating elements
π Glassmorphism cards with violet glow effects
β¨ Gradient accents throughout the interface
π― Responsive design for all screen sizes
Node.js 18+
PostgreSQL 14+
npm or yarn
# Clone repository
git clone https://github.com/yourusername/payment-settlement.git
cd payment-settlement
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install
Create .env file in /backend:
# Environment
NODE_ENV = development
PORT = 3001
# Database
DATABASE_URL = " postgresql://postgres:YOUR_PASSWORD@localhost:5432/payment_settlement?schema=public"
# JWT
JWT_SECRET = your-secure-secret-key
JWT_EXPIRES_IN = 24h
# Settlement
SETTLEMENT_CUTOFF_HOUR = 23
SETTLEMENT_CUTOFF_MINUTE = 59
DEFAULT_MERCHANT_FEE_PERCENT = 2.5
# Rate Limiting
RATE_LIMIT_MAX_REQUESTS = 1000
cd backend
# Generate Prisma client
npx prisma generate
# Push schema to database
npx prisma db push
# Seed sample data
npm run db:seed
4. Start Development Servers
# Terminal 1: Backend (port 3001)
cd backend
npm run dev
# Terminal 2: Frontend (port 5173)
cd frontend
npm run dev
payment-settlement/
βββ backend/
β βββ prisma/
β β βββ schema.prisma # Database schema (14 models)
β β βββ seed.js # Sample data seeder
β βββ src/
β βββ config/ # Configuration & database
β βββ middleware/ # Auth, RBAC, validation
β βββ routes/ # API endpoints
β βββ services/ # Business logic
β βββ jobs/ # Cron jobs
β
βββ frontend/
β βββ src/
β βββ components/ # Layout, UI components
β βββ context/ # Auth context
β βββ pages/ # 10 main pages
β βββ services/ # API client
β
βββ README.md
Method
Endpoint
Description
POST
/api/auth/login
User login
GET
/api/auth/me
Current user info
Method
Endpoint
Description
GET
/api/transactions
List transactions
POST
/api/transactions/ingest
Ingest single
POST
/api/transactions/batch
Batch ingest
Method
Endpoint
Description
GET
/api/reconciliation/results
Get results
POST
/api/reconciliation/run
Run reconciliation
Method
Endpoint
Description
GET
/api/settlements
List settlements
POST
/api/settlements/:id/process
Process batch
Method
Endpoint
Description
GET
/api/metrics
Dashboard KPIs
GET
/api/metrics/trends
Trend data
GET
/api/metrics/alerts
System alerts
Job
Schedule
Description
Reconciliation
Every 15 min
Match pending transactions
Daily Settlement
23:59 IST
Create settlement batches
Settlement Processing
Every 30 min
Process pending settlements
Threshold Monitor
Hourly
Check and create alerts
Layer
Technology
Backend
Node.js, Express.js
Database
PostgreSQL, Prisma ORM
Frontend
React 18, Vite
Styling
Tailwind CSS
Charts
Recharts
Auth
JWT, bcryptjs
Logging
Winston
Scheduling
node-cron
MIT License - See LICENSE for details.
Built with π for Enterprise Fintech