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