A modern, scalable e-commerce platform built with cutting-edge web technologies
Event Horizon is a polyglot microservices e-commerce platform showcasing advanced distributed systems architecture. Built with Python, Java, and TypeScript, it demonstrates enterprise-level patterns including SAGA distributed transactions, event-driven architecture, and multi-language service communication. The platform features real-time updates, secure payment processing, and comprehensive observability.
- Intuitive Product Catalog - Browse products with advanced filtering and search
- Smart Shopping Cart - Persistent cart with real-time updates
- Secure Checkout - Multiple payment options with Stripe integration
- User Authentication - JWT-based secure login/registration
- Order Tracking - Real-time order status updates
- Wishlist & Reviews - Save favorites and share product experiences
- Responsive Design - Seamless experience across all devices
- Inventory Management - Add, edit, and track product inventory
- Order Management - Process orders and update fulfillment status
- Analytics Dashboard - Sales metrics and customer insights
- User Management - Customer account administration
- Content Management - Manage product categories and content
- Polyglot Microservices - 6 Python services + 1 Java service demonstrating inter-language communication
- Advanced Python Stack - FastAPI, SQLAlchemy, Kafka-Python, Celery for high-performance async APIs
- Enterprise Java - Spring Boot 3.2, Spring Kafka, Spring Data JPA for robust notification service
- SAGA Pattern Implementation - Python-based distributed transaction orchestration
- Event-Driven Architecture - Apache Kafka for inter-service communication
- API Gateway Pattern - FastAPI-based centralized routing and authentication
- Database Per Service - PostgreSQL, MongoDB, Redis per domain expertise
- Service Discovery - Consul for dynamic service registration
- Distributed Monitoring - Prometheus + Grafana + Jaeger observability stack
┌─────────────────────────────────────────────────────────────────────────────┐
│ Frontend (Next.js + TypeScript) │
├─────────────────────────────────────────────────────────────────────────────┤
│ • Next.js 14 App Router • Redux Toolkit + RTK Query │
│ • Tailwind CSS + Headless UI • React Hook Form + Zod │
└─────────────────────────────────────────────────────────────────────────────┘
│ HTTPS/REST
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ API Gateway (Python/FastAPI) │
├─────────────────────────────────────────────────────────────────────────────┤
│ • Request Routing • Authentication & Authorization │
│ • Rate Limiting • Request/Response Transformation │
│ • Circuit Breaker • API Versioning │
└─────────────────────────────────────────────────────────────────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Auth Service │ │ Product Service │ │ Cart Service │ │ Order Service │
│ (Python) │ │ (Python) │ │ (Python) │ │ (Python) │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ • JWT Tokens │ │ • Catalog Mgmt │ │ • Session Cart │ │ • Order Process │
│ • User Auth │ │ • Search/Filter │ │ • Persistence │ │ • SAGA Orchestr │
│ • Role Mgmt │ │ • Inventory │ │ • Real-time │ │ • Status Track │
│ │ │ │ │ │ │ │
│ PostgreSQL │ │ MongoDB │ │ Redis │ │ PostgreSQL │
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
│
┌───────────────┼───────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Payment Service │ │Notification Svc │ │ Event Bus │
│ (Python) │ │ (Java) │ │ Apache Kafka │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ • Stripe API │ │ • Email Service │ │ • Event Streaming│
│ • Webhook Proc │ │ • SMS Notify │ │ • Message Queue │
│ • Transaction │ │ • Push Notify │ │ • Event Store │
│ │ │ │ │ │
│ PostgreSQL │ │ PostgreSQL │ │ Distributed │
└─────────────────┘ └─────────────────┘ └─────────────────┘
┌─────────────────────────────────────────────────────────────────────────────┐
│ Infrastructure & Monitoring │
├─────────────────────────────────────────────────────────────────────────────┤
│ • Service Discovery (Consul) • Container Orchestration (Docker) │
│ • Monitoring (Prometheus) • Observability (Grafana + Jaeger) │
│ • Load Balancing (Nginx) • Configuration (Vault) │
└─────────────────────────────────────────────────────────────────────────────┘
- 🐍 Python 3.11 - Primary backend language for 6 microservices
- FastAPI for high-performance async APIs
- SQLAlchemy for database ORM
- Kafka-Python for event streaming
- Celery for background tasks
- ☕ Java 17 - Notification microservice
- Spring Boot 3.2 for enterprise features
- Spring Kafka for event consumption
- Spring Data JPA for data persistence
- 📱 TypeScript - Frontend and type safety
- Next.js 14 with App Router
- React 18 with modern hooks
- Redux Toolkit for state management
- Framework: Next.js 14 with App Router
- Language: TypeScript with strict type checking
- Styling: Tailwind CSS + Headless UI components
- State Management: Redux Toolkit + RTK Query
- Forms: React Hook Form + Zod validation
- Animations: Framer Motion for smooth UX
- Icons: Lucide React icon library
- API Gateway: Python 3.11 + FastAPI + Uvicorn
- Auth Service: Python + FastAPI + PostgreSQL + JWT
- Product Service: Python + FastAPI + MongoDB + ElasticSearch
- Cart Service: Python + FastAPI + Redis + WebSockets
- Order Service: Python + FastAPI + PostgreSQL + SAGA Pattern
- Payment Service: Python + FastAPI + PostgreSQL + Stripe API
- Notification Service: Java 17 + Spring Boot + PostgreSQL + Kafka
- Event Bus: Apache Kafka + Zookeeper
- Service Discovery: Consul + Health Checks
- Containerization: Docker + Docker Compose
- Orchestration: Kubernetes (production) + Helm Charts
- Service Mesh: Istio for traffic management
- API Documentation: FastAPI auto-docs + Swagger UI
- Monitoring: Prometheus + Grafana + Jaeger tracing
- Logging: ELK Stack (Elasticsearch + Logstash + Kibana)
- CI/CD: GitHub Actions + ArgoCD
- Security: Vault for secrets + OAuth2/OIDC
event-horizon-e-commerce/
├── frontend/ # Next.js React application
│ ├── src/app/ # App Router pages
│ ├── src/components/ # UI components
│ ├── src/store/ # Redux store
│ └── package.json
├── services/ # Microservices
│ ├── api-gateway/ # Python FastAPI Gateway
│ │ ├── app/
│ │ │ ├── routers/ # Route definitions
│ │ │ ├── middleware/ # Auth, CORS, Rate limiting
│ │ │ ├── services/ # Service discovery
│ │ │ └── main.py # FastAPI app
│ │ ├── requirements.txt
│ │ └── Dockerfile
│ ├── auth-service/ # Python FastAPI Auth
│ │ ├── app/
│ │ │ ├── models/ # SQLAlchemy models
│ │ │ ├── services/ # Auth logic
│ │ │ ├── routers/ # Auth endpoints
│ │ │ └── main.py
│ │ └── requirements.txt
│ ├── product-service/ # Python FastAPI Products
│ │ ├── app/
│ │ │ ├── models/ # MongoDB models
│ │ │ ├── services/ # Product logic
│ │ │ ├── search/ # ElasticSearch
│ │ │ └── main.py
│ │ └── requirements.txt
│ ├── cart-service/ # Python FastAPI Cart
│ │ ├── app/
│ │ │ ├── services/ # Redis operations
│ │ │ ├── websockets/ # Real-time updates
│ │ │ └── main.py
│ │ └── requirements.txt
│ ├── order-service/ # Python FastAPI Orders + SAGA
│ │ ├── app/
│ │ │ ├── models/ # Order models
│ │ │ ├── saga/ # SAGA orchestrator
│ │ │ ├── services/ # Order logic
│ │ │ └── main.py
│ │ └── requirements.txt
│ ├── payment-service/ # Python FastAPI Payments
│ │ ├── app/
│ │ │ ├── stripe/ # Stripe integration
│ │ │ ├── webhooks/ # Payment webhooks
│ │ │ └── main.py
│ │ └── requirements.txt
│ └── notification-service/ # Java Spring Boot
│ ├── src/main/java/com/eventhorizon/notification/
│ │ ├── controller/ # REST controllers
│ │ ├── service/ # Email/SMS services
│ │ ├── kafka/ # Kafka consumers
│ │ └── NotificationApplication.java
│ ├── pom.xml
│ └── Dockerfile
├── infrastructure/ # Infrastructure components
│ ├── kafka/ # Kafka configuration
│ ├── consul/ # Service discovery
│ ├── prometheus/ # Monitoring
│ ├── grafana/ # Dashboards
│ └── vault/ # Secret management
├── shared/ # Shared libraries
│ ├── python/ # Python shared code
│ └── proto/ # Protocol Buffers
├── docs/ # Documentation
│ ├── api/ # API documentation
│ ├── architecture/ # Architecture docs
│ └── deployment/ # Deployment guides
├── docker-compose.yml # Multi-service development
├── docker-compose.prod.yml # Production configuration
└── kubernetes/ # K8s manifests
├── services/ # Service definitions
├── ingress/ # Ingress configuration
└── monitoring/ # Monitoring stack
- Node.js 18+ and npm/yarn
- MongoDB 6.0+
- Git
-
Clone the repository
git clone https://github.com/yourusername/event-horizon-e-commerce.git cd event-horizon-e-commerce -
Install dependencies
# Install backend dependencies cd backend && npm install # Install frontend dependencies cd ../frontend && npm install
-
Environment setup
# Copy environment templates cp backend/.env.example backend/.env cp frontend/.env.example frontend/.env.local # Configure your environment variables
-
Start development servers
# Terminal 1: Start backend cd backend && npm run dev # Terminal 2: Start frontend cd frontend && npm run dev
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- API Documentation: http://localhost:5000/api-docs
# Start all services with Docker Compose
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Product catalog and search
- Shopping cart functionality
- User authentication
- Basic checkout process
- Payment integration (Stripe)
- Order management system
- Admin dashboard
- Email notifications
- Real-time inventory updates
- Advanced analytics
- Multi-vendor support
- Mobile app (React Native)
# Run frontend tests
cd frontend && npm test
# Run backend tests
cd backend && npm test
# Run integration tests
npm run test:integration
# Generate coverage reports
npm run test:coverage- Lighthouse Score: 95+ across all metrics
- Core Web Vitals: Excellent ratings
- Bundle Size: < 200KB gzipped
- API Response Time: < 100ms average
- Database Queries: Optimized with indexing
- JWT token-based authentication
- Password hashing with bcrypt
- Input validation and sanitization
- CORS protection
- Rate limiting
- SQL injection prevention
- XSS protection
Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
This project showcases proficiency across multiple programming languages and modern technologies:
- 🐍 Python 3.11 - 6 microservices (83% of backend codebase)
- ☕ Java 17 - 1 microservice (notification service)
- 📱 TypeScript - Frontend application and type definitions
- 🗄️ SQL - Database schemas and complex queries
- 🔧 YAML - Infrastructure as Code (Docker Compose, Kubernetes)
- Event Sourcing & CQRS - Event-driven data architecture
- SAGA Pattern - Distributed transaction orchestration
- Microservices Communication - Inter-language service coordination
- Asynchronous Programming - Python asyncio and FastAPI
- Reactive Programming - Java Spring reactive streams
- Domain-Driven Design - Service boundaries and data modeling
Ankan - Senior Full Stack Developer | Microservices Architect
- Languages: Python, Java, TypeScript, Go, SQL
- Specialties: Distributed Systems, Event-Driven Architecture, Cloud-Native Development
- GitHub: @ankan
- LinkedIn: Your LinkedIn
- Event-driven architecture patterns from industry best practices
- Microservices design patterns from Martin Fowler and Chris Richardson
- Open source community for amazing tools and frameworks
- Spring Boot and FastAPI communities for excellent documentation
Built with ❤️ by Ankan