A banking application built with a microservices architecture demonstrating modern development practices including containerization, orchestration, and observability.
This system consists of:
Frontend: Next.js application with TypeScript Backend: Java Spring Boot microservices Database: PostgreSQL with service-specific schemas Orchestration: Kubernetes deployment Observability: OpenTelemetry with Jaeger, Prometheus, and Grafana
├── backend/
│ ├── user-service/ # User authentication and profile management
│ ├── accounts-service/ # Bank account and balance management
│ ├── transactions-service/ # Financial transaction processing
│ └── api-gateway/ # Request routing and authentication
├── frontend/ # Next.js web application
├── infrastructure/ # Kubernetes manifests and configs
├── docker/ # Dockerfiles for all services
└── plan.md # Detailed implementation plan with phases
Authentication Flow: JWT tokens generated by user-service, validated by all other services Database Design: Single PostgreSQL instance with separate schemas per service (user_service, accounts_service, transactions_service) Service Communication: REST APIs with JSON, all routed through API Gateway Transaction Safety: Atomic operations with rollback mechanisms in transactions-service Observability: OpenTelemetry instrumentation across all Java services
# Start all services in development mode
docker-compose up -d
# Build individual service (from service directory)
./mvnw clean package
# Run individual service locally
./mvnw spring-boot:runLocal Development:
# Deploy with localhost configuration
kubectl apply -k kubernetes/base/Production Deployment:
# Deploy with production configuration
kubectl apply -k kubernetes/overlays/speedscale/Note: For production, edit kubernetes/overlays/speedscale/frontend-config-patch.yaml to set your actual API domain instead of https://your-api-domain.com.
# Start Next.js development server
cd frontend && npm run dev
# Build for production
npm run build
# Run tests
npm test# Connect to PostgreSQL
psql -h localhost -U postgres -d banking_app
# Run migrations (from service directory)
./mvnw flyway:migrate# Run backend unit tests
./mvnw test
# Run integration tests
./mvnw verify -P integration-tests
# Run frontend tests
cd frontend && npm test
# Run E2E tests
npm run test:e2eCurrently in Phase 1.1 (Repository Structure) - see plan.md for detailed phase breakdown and testing criteria. Each phase has specific implementation tasks and testing requirements that must be completed before proceeding to the next phase.
- All services must implement JWT validation middleware except user-service (which generates tokens)
- Transaction operations require account ownership validation and sufficient balance checks
- Each service needs OpenTelemetry instrumentation for distributed tracing
- Database schemas are logically separated but physically in the same PostgreSQL instance
- API Gateway handles routing, rate limiting, and global authentication checks
- All services should include comprehensive unit and integration tests with >80% coverage
- JWT tokens stored in HttpOnly cookies on frontend
- Database connections use connection pooling with proper credentials
- All services run as non-root users in containers
- API endpoints require authentication except for user registration/login
- Input validation required on all endpoints to prevent injection attacks
- Prerequisites: Docker, Docker Compose, Node.js, Java 11+, Maven
- Clone the repository
- Review the implementation plan: See
plan.mdfor detailed phases - Set up local environment: Follow Phase 1 tasks in the plan
- Start development: Use the development commands above
This is a monorepo containing all microservices and the frontend application. Each service is designed to be independently deployable while maintaining consistency in tooling and patterns.