Deep dive into DesiHub's complete technology stack for building a scalable banking application serving 5,000+ daily users. Learn our architectural decisions, cost breakdowns ($300/month infrastructure), developer hardware specs, and why we chose Go + PostgreSQL + Next.js over alternatives. Includes microservices design, CI/CD pipelines, security implementation, and scaling from MVP to 500K users.
Published: November 20, 2025
We're excited to share DesiHub's complete technology stack as we embark on building a robust, scalable banking application designed to serve 5,000+ daily users with millions of requests. This article outlines our architectural decisions, tooling choices, and the reasoning behind them.
DesiHub is building a modern banking platform with microservices architecture, focusing on security, scalability, and cost-effectiveness. Our stack leverages battle-tested open-source technologies combined with strategic paid services where they provide clear value.
Target Metrics:
We chose Golang as our primary backend language for several critical reasons:
Why Go?
Core Backend Stack:
Framework: Gin (HTTP routing & middleware)
ORM: GORM (PostgreSQL interactions)
Auth: golang-jwt/jwt + go-guardian
Authorization: Casbin (RBAC engine)
Validation: go-playground/validator
Why Gin over alternatives? Gin provides the perfect balance of performance (40x faster than Martini) and developer experience. It's production-proven at companies like Xiaomi and Tencent.
Frontend Stack:
Framework: Next.js 14 (React Server Components)
State Management: Simple Store + TanStack Query (React Query)
Styling: Tailwind CSS + Shadcn/ui
Forms: React Hook Form + Zod validation
Authentication: NextAuth.js
Why This Combination?
Next.js gives us:
TanStack Query eliminates complex state management for server data:
Shadcn/ui provides:
Primary Database: PostgreSQL 16
PostgreSQL is our single source of truth. Why PostgreSQL?
Configuration Strategy:
Caching Layer: Redis
Redis handles:
Alternative Considered: MongoDB
We chose PostgreSQL over MongoDB because:
For asynchronous processing and microservice communication:
Use Cases:
Why RabbitMQ over Kafka?
Primary Gateway: Stripe
Regional Alternatives:
We're implementing a payment gateway abstraction layer to support multiple providers and easy switching.
Our services are organized by domain:
├── auth-service (Authentication & JWT)
├── user-service (User management & KYC)
├── account-service (Bank accounts & balances)
├── transaction-service (Payments & transfers)
├── notification-service (Email, SMS, Push)
├── audit-service (Logging & compliance)
├── analytics-service (Reporting & insights)
└── api-gateway (Routing & rate limiting)
Communication Patterns:
Hosting Provider: Hetzner Cloud
After evaluating AWS, DigitalOcean, Linode, and Hetzner, we chose Hetzner for:
Phase 1 Infrastructure (MVP):
Production Environment:
├── 3x App Servers (4 vCPU, 8GB RAM each) - €46.20/month
├── 1x Database (8 vCPU, 16GB RAM) - €36.26/month
├── 1x Cache/Queue (4 vCPU, 8GB RAM) - €15.40/month
├── 1x Monitoring (2 vCPU, 4GB RAM) - €4.15/month
└── Load Balancer (Nginx on separate VPS) - €4.15/month
Total: ~€110/month (~$120/month)
Staging Environment:
CDN & Security: Cloudflare
Version Control: GitHub
CI/CD: GitHub Actions
Our pipeline:
Pipeline Stages:
1. Lint & Format Check (golangci-lint, ESLint)
2. Unit Tests (Go: testify, Frontend: Vitest)
3. Integration Tests (Testcontainers)
4. Security Scanning (Trivy, Snyk)
5. Build Docker Images
6. Push to Registry (GitHub Container Registry)
7. Deploy to Staging (automatic)
8. Deploy to Production (manual approval)Cost: 2,000 minutes/month free, ~$10-30/month beyond that.
Containerization: Docker + Docker Compose
Each microservice is containerized with:
Phase 1: Docker Compose for orchestration
Phase 2: Migrate to K3s (lightweight Kubernetes) when we exceed 10 services
Self-Hosted Grafana Stack (Free + VPS costs)
Monitoring Components:
├── Prometheus (Metrics collection)
├── Grafana (Dashboards & visualization)
├── Loki (Log aggregation)
├── Tempo (Distributed tracing)
└── AlertManager (Alert routing)
Key Metrics We Track:
Application Metrics:
Business Metrics:
Error Tracking: Sentry
Uptime Monitoring: UptimeRobot
Banking applications demand enterprise-grade security:
Authentication & Authorization:
Data Protection:
Security Tools:
├── Let's Encrypt (Free SSL certificates)
├── Cloudflare WAF (Web Application Firewall)
├── Trivy (Container vulnerability scanning)
├── Snyk (Dependency vulnerability scanning)
├── OWASP ZAP (Security testing)
└── HashiCorp Vault (Secrets management)
Compliance:
Testing Pyramid:
╱╲
╱ ╲
╱ E2E ╲ ~10% (Critical flows)
╱────────╲
╱ ╲
╱ Integration╲ ~30% (API contracts)
╱──────────────╲
╱ ╲
╱ Unit Tests ╲ ~60% (Business logic)
╱────────────────────╲
Backend Testing:
testify package (80%+ coverage target)Frontend Testing:
Performance Testing:
# k6 load test example
k6 run --vus 1000 --duration 5m load-test.jsWe test for:
Cloudflare R2 (S3-compatible)
Use cases:
Alternative evaluated: AWS S3
Why R2 wins: At scale, egress fees on S3 would cost 10x more. R2's free egress is perfect for a customer-facing app.
Email: Resend
SMS: Twilio
Push Notifications: Firebase Cloud Messaging
In-App Notifications:
Code Editors:
API Development:
Database Management:
Collaboration:
(Free for teams <10) - DocumentationWe're investing in powerful workstations to maximize productivity. Here are our recommended specs:
Purpose: Backend development, Docker containers, database work
CPU: AMD Ryzen 9 7950X (16-core, 32-thread)
or Intel i9-13900K (24-core, 32-thread)
RAM: 64GB DDR5 (32GB minimum, 64GB recommended)
- Running Docker containers is RAM-intensive
- Database queries and caching simulations
Storage: 1TB NVMe SSD (Gen 4) - Primary
+ 2TB SSD - Secondary for projects/VMs
GPU: NVIDIA RTX 3060 (12GB) or RTX 4060
- Not for gaming, but for:
* Multiple 4K monitors
* ML/AI experimentation
* Video encoding for demos
Motherboard: Compatible with CPU (B650 for AMD, B760 for Intel)
PSU: 750W 80+ Gold certified
Cooling: AIO Liquid Cooler (240mm minimum)
Case: Mid-tower with good airflow
Cost: $1,800 - $2,500
Performance Benefits:
Purpose: Frontend development, general backend work
CPU: AMD Ryzen 7 7700X (8-core, 16-thread)
or Intel i7-13700K (16-core, 24-thread)
RAM: 32GB DDR5 (minimum for comfortable development)
Storage: 512GB NVMe SSD (Gen 4) - Primary
+ 1TB SSD - Secondary
GPU: NVIDIA GTX 1660 Super or RTX 3050
- Dual monitor support
- Basic GPU tasks
Motherboard: B650 (AMD) or B660 (Intel)
PSU: 650W 80+ Gold
Cooling: Tower Air Cooler (Noctua NH-D15 or similar)
Cost: $1,200 - $1,600
For team members who need portability:
Recommended Models:
MacBook Pro 16" M3 Pro:
- M3 Pro chip (12-core CPU)
- 36GB unified memory
- 512GB SSD
- Cost: ~$2,900
- Best for: Mac-preferring developers
Dell XPS 15 or Lenovo ThinkPad P16:
- Intel i9-13900H or AMD Ryzen 9 7945HX
- 64GB RAM
- 1TB NVMe SSD
- NVIDIA RTX 4060 Mobile
- Cost: ~$2,500 - $3,200
- Best for: Windows/Linux developers
Framework Laptop 16:
- AMD Ryzen 9 7940HS
- 64GB RAM
- Modular/repairable design
- Cost: ~$2,000 - $2,500
- Best for: Linux enthusiasts, right-to-repair advocates
Monitor Setup:
├── Primary: 32" 4K monitor (Dell U3223QE) - $650
├── Secondary: 27" 1440p monitor - $300
└── Total: Dual monitor setup - ~$950
Keyboard: Mechanical keyboard
├── Keychron K8 Pro - $110
├── Ducky One 3 - $150
└── Leopold FC900R - $130
Mouse: Logitech MX Master 3S - $100
Headset: Sony WH-1000XM5 or Bose 700 - $350
Desk: Standing desk (Flexispot E7) - $450
Chair: Herman Miller Aeron or Steelcase Leap - $1,200
Total Investment Per Developer:
For a team of 10: $50,000 - $57,000 one-time investment
Why This Investment Matters:
Monthly Recurring Costs (Phase 1):
Infrastructure:
├── Hetzner VPS (5 servers) €110.16/month ($120)
├── Cloudflare Pro $20.00/month
├── Domain name $1.00/month ($12/year)
├── File Storage (R2 - 100GB) $1.50/month
├── Email (Resend) $0.00/month (free tier)
├── Monitoring (self-hosted) $0.00/month
└── Backups (Backblaze B2) $2.00/month
────────────────────────────────────────────────
Infrastructure Total: ~$145/month
Team Tools:
├── Linear (10 users) $80/month
├── Slack (free tier) $0/month
├── GitHub (free tier) $0/month
├── Notion (free tier) $0/month
└── GoLand licenses (optional) $74/month ($890/year)
────────────────────────────────────────────────
Tools Total: ~$80-154/month
Variable Costs:
├── SMS (Twilio) $20-100/month
├── Payment processing (Stripe) 2.9% + $0.30/transaction
└── CI/CD overage $10-30/month
────────────────────────────────────────────────
Variable Total: ~$30-130/month
────────────────────────────────────────────────
TOTAL MONTHLY: $255-429/month ($3,000-5,000/year)
One-Time Costs:
Development Hardware:
├── 10x Developer Workstations $50,000-57,000
├── 2x Testing Devices (mobile) $2,000
└── Network Equipment $1,000
────────────────────────────────────────────────
Hardware Total: ~$53,000-60,000
Optional Tools:
├── TablePlus licenses (10) $890
└── Design tools (Figma) $180/year
────────────────────────────────────────────────
Optional Total: ~$1,070
Annual Cost Projection:
Year 1:
├── Infrastructure & Tools $3,000-5,000
├── Hardware (one-time) $53,000-60,000
├── Variable costs $5,000-15,000
────────────────────────────────────────────────
Total Year 1: $61,000-80,000
Year 2+ (no hardware):
├── Infrastructure & Tools $5,000-8,000
├── Variable costs $10,000-30,000
────────────────────────────────────────────────
Total Year 2+: $15,000-38,000/year
Phase 1: MVP (0-5K users) - Current Plan
Phase 2: Growth (5K-50K users) - Months 6-18
Phase 3: Scale (50K-500K users) - Year 2+
1. Battle-Tested Technologies Every tool in our stack is production-proven by companies at our scale and beyond:
2. Right-Sized for Our Scale We're not over-engineering for problems we don't have yet:
3. Cost-Effective
4. Developer Experience
5. Security-First
We believe in giving back to the community. We'll be open-sourcing:
Follow our GitHub: github.com/desishub (example)
Our 10-person team structure:
├── Backend Team (4 developers)
│ ├── Microservices architecture
│ ├── API development
│ ├── Database optimization
│ └── Integration with external services
│
├── Frontend Team (2 developers)
│ ├── Next.js application
│ ├── UI component library
│ ├── Mobile-responsive design
│ └── Performance optimization
│
├── DevOps Engineer (1)
│ ├── Infrastructure management
│ ├── CI/CD pipelines
│ ├── Monitoring & alerting
│ └── Security hardening
│
├── QA Engineer (1)
│ ├── Test automation
│ ├── Load testing
│ ├── Security testing
│ └── Regression testing
│
├── Full-Stack Developer (1)
│ ├── Cross-team support
│ ├── Proof of concepts
│ ├── Integration work
│ └── Performance optimization
│
└── Product Manager (1)
├── Roadmap planning
├── Requirements gathering
├── Stakeholder management
└── Release coordination
Q4 2024 (Current):
Q1 2025:
Q2 2025:
Q3 2025:
Q4 2025:
We'll measure our success by:
Technical Metrics:
<200ms (p95)<0.1%<5 minutesBusiness Metrics:
We're building in public and want your feedback:
Follow our journey:
@DesiHubTechblog.desishub.comdiscord.gg/desishubOpen positions:
We're hiring! Check careers.desishub.com for:
Building a banking platform is ambitious, but with the right tools, team, and mindset, we're confident in our approach. This stack gives us:
✅ Performance: Handle millions of requests efficiently
✅ Security: Bank-grade protection for user data
✅ Scalability: Grow from 5K to 500K+ users
✅ Cost-efficiency: $300/month instead of $3,000+
✅ Developer experience: Modern tools that developers love
We're excited to build DesiHub and share our learnings with the community. Stay tuned for deep-dive technical articles on each component of our stack.
Questions? Drop them in the comments or reach out on Twitter @DesiHubTech
Want to contribute? We're hiring and welcoming open-source contributors!
Written by the DesiHub Engineering Team
Last updated: November 20, 2025
Documentation:
Learning Resources:
Contact:
engineering@desishub.comgithub.com/desishublinkedin.com/company/desishub# Application
APP_ENV=production
APP_PORT=8080
APP_SECRET_KEY=your-secret-key-here
# Database
DB_HOST=localhost
DB_PORT=5432
DB_USER=desishub
DB_PASSWORD=secure-password
DB_NAME=desishub_prod
# Redis
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=secure-password
# JWT
JWT_SECRET=your-jwt-secret
JWT_EXPIRY=15m
REFRESH_TOKEN_EXPIRY=7d
# Stripe
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Cloudflare R2
R2_ACCOUNT_ID=your-account-id
R2_ACCESS_KEY_ID=your-access-key
R2_SECRET_ACCESS_KEY=your-secret-key
R2_BUCKET_NAME=desishub-files
# Email
RESEND_API_KEY=re_...
# SMS
TWILIO_ACCOUNT_SID=AC...
TWILIO_AUTH_TOKEN=...
TWILIO_PHONE_NUMBER=+1234567890version: "3.8"
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: desishub_dev
POSTGRES_USER: desishub
POSTGRES_PASSWORD: devpassword
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
ports:
- "6379:6379"
command: redis-server --requirepass devpassword
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: desishub
RABBITMQ_DEFAULT_PASS: devpassword
volumes:
postgres_data:import http from "k6/http";
import { check, sleep } from "k6";
export const options = {
stages: [
{ duration: "2m", target: 100 },
{ duration: "5m", target: 1000 },
{ duration: "2m", target: 0 },
],
thresholds: {
http_req_duration: ["p(95)<200"],
http_req_failed: ["rate<0.01"],
},
};
export default function () {
const res = http.get("https://api.desishub.com/health");
check(res, {
"status is 200": (r) => r.status === 200,
"response time < 200ms": (r) => r.timings.duration < 200,
});
sleep(1);
}Thank you for reading! We're excited to build DesiHub and revolutionize banking together. 🚀