A microservices-based e-commerce platform built with Docker, Node.js, SvelteKit, and CouchDB. Designed for scalability, independent service deployment, and production-ready containerization with Docker Swarm.
Features • Architecture • Quick Start • Documentation
ElastiCart is a full-stack e-commerce application demonstrating modern microservices architecture with:
- 8 independent backend microservices (Auth, Products, Carts, Orders, Reviews, Recommendations, Images, Logs)
- API Gateway for centralized routing and authentication
- SvelteKit frontend with TypeScript and TailwindCSS
- Docker Swarm orchestration with elastic auto-scaling
- CouchDB for NoSQL data persistence
- Azure Blob Storage for image management
- Redis for job queue and caching
- 🔐 JWT Authentication with HTTP-only cookies
- 🛒 Shopping Cart with real-time total calculations
- 📦 Order Management with checkout and history
- ⭐ Product Reviews with rating system
- 🤖 Smart Recommendations with personalized suggestions and trending products
- 🖼️ Image Upload with Azure Blob Storage integration
- 📊 Centralized Logging for monitoring and analytics
- 🚀 Auto-Scaling policies for high-traffic services
- 🧪 Comprehensive Testing (unit, integration, load tests)
- 🐳 Containerized deployment with Docker Compose and Swarm
├── assets/ # Images and visual assets for README
├── src/ # Source code (see src/README.md)
│ ├── api-gateway/ # API Gateway service
│ ├── back-end/ # Backend microservices
│ ├── front-end/ # SvelteKit web application
│ └── scalability/ # Scaling policies and monitoring
├── config/ # Shared configuration files
├── tutorials/ # Project tutorials and guides
├── scripts/ # Deployment and utility scripts
├── .env # Environment configuration for deployment
├── .env.example # Example Environment configuration for deployment
├── .gitignore # Git ignore file
├── docker-compose.yml # Local development deployment
├── scapp.yml # Docker Swarm stack definition
├── Makefile # All deployment and testing commands
├── Grading.md # Grading criteria and instructions
├── Report-LINFO2145-... # Final project report
└── package.json # Monorepo workspace configuration
Shared development configuration for code quality and testing:
- ESLint configuration for JavaScript/TypeScript linting
- Prettier configuration for code formatting
- Jest configurations (unit and integration tests)
Deployment scripts and utilities for local and production environments:
- Deployment automation (
deploy-local.sh,deploy-swarm.shanddeploy-azure.sh) - Test data setup (
create-admin-user.sh,create-sample-products.shandsetup-test-data.sh) - Local management helpers (Display URLs, propagate .env, etc.)
- Swarm management helpers (VM setup, build and push images, stack deployment, etc.)
- Azure management helpers (Azure VM setup, etc.)
See scripts/README.md for detailed documentation.
Application source code organized by service type:
- api-gateway/: Central routing and authentication verification
- back-end/: 8 independent microservices + shared utilities
- front-end/: SvelteKit web application
- scalability/: Auto-scaling policies (horizontal and vertical) and monitoring tools
See src/README.md for architecture overview and service details.
The project includes a comprehensive Makefile with all commands needed to deploy, test, monitor, and manage the application.
Run make or make help to see the complete list of available commands.
Backend:
- Node.js + Express.js
- CouchDB (NoSQL database)
- JWT authentication
- Docker + Docker Compose + Docker Swarm
Frontend:
- SvelteKit 2.x
- TypeScript 5.x
- TailwindCSS 3.x
- Axios for HTTP
Infrastructure:
- Docker Swarm orchestration
- Azure Blob Storage and Azure Queue Storage
- Redis for caching and job queuing
- Multipass for local VM management
- Azure Virtual Machines for cloud deployment
- Azure Container Registry (ACR) for image storage
ElastiCart consists of 10 containerized services. Each service has its own README with complete API documentation.
| Service | Role | Technologies | Port | Documentation |
|---|---|---|---|---|
| Auth | User authentication and JWT management | Express.js, CouchDB, bcrypt, JWT | 3003 | src/back-end/auth/README.md |
| Products | Product catalog management (CRUD) | Express.js, CouchDB | 3002 | src/back-end/products/README.md |
| Carts | Shopping cart operations | Express.js, CouchDB | 3005 | src/back-end/carts/README.md |
| Orders | Order creation and history | Express.js, CouchDB | 3004 | src/back-end/orders/README.md |
| Reviews | Product reviews and ratings | Express.js, CouchDB, Axios | 3007 | src/back-end/reviews/README.md |
| Recommendations | Intelligent product recommendations using MapReduce | Express.js, CouchDB, Nano | 3009 | src/back-end/recommendations/README.md |
| Images | Image upload and processing | Express.js, Azure Blob, Azure Queue, Redis, Sharp, Multer | 3008 | src/back-end/images/README.md |
| Logs | Centralized logging and monitoring | Express.js, CouchDB | 3006 | src/back-end/logs/README.md |
| Service | Role | Technologies | Port | Documentation |
|---|---|---|---|---|
| API Gateway | Request routing, authentication, rate limiting | Express.js, express-http-proxy, JWT | 3000 | src/api-gateway/README.md |
| Front-End | User interface web application | SvelteKit, TypeScript, TailwindCSS, Axios | 3001 | src/front-end/README.md |
- Independent Scalability: Each service can scale independently based on load
- Technology Flexibility: Services can use different tech stacks if needed
- Fault Isolation: Service failures don't cascade to the entire system
- Development Velocity: Teams can work on different services in parallel
- Performance: Non-blocking I/O ideal for microservices
- JavaScript Ecosystem: Vast npm package ecosystem
- Developer Productivity: Same language for frontend and backend
- Easy Containerization: Lightweight Docker images
- Schema Flexibility: Easy to evolve data models without migrations
- Horizontal Scalability: Built-in clustering and sharding
- HTTP REST API: Natural fit for microservices
- Conflict Resolution: Multi-master replication support
- Document Model: Perfect for JSON-based microservices communication
- Built-in Orchestration: No external orchestrator needed
- Ease of Use: Simpler than Kubernetes for small-to-medium deployments
- Native Docker Integration: Uses standard Docker Compose files
- Auto-scaling: Built-in service scaling and load balancing
- Rolling Updates: Zero-downtime deployments
- Performance: Compiled to vanilla JavaScript, smaller bundle sizes
- Developer Experience: Reactive programming, less boilerplate
- SSR Support: Server-side rendering for better SEO
- TypeScript: Type safety and better IDE support
- Scalability: Unlimited storage capacity
- Cost-Effective: Pay-per-use pricing model
- CDN Integration: Fast global image delivery
- SDK Support: Official Node.js SDK with good documentation
- Asynchronous Processing: Decouples image processing from upload requests
- Reliability: Guaranteed message delivery with retry mechanisms
- Scalability: Handles millions of messages efficiently
- Integration: Native integration with Azure Blob Storage
- Virtual Machines: Flexible compute resources with various VM sizes
- Global Availability: Multiple regions for low-latency deployment
- Resource Management: Centralized resource group management
- Network Security: Built-in Network Security Groups (NSG) and firewall rules
- Cost Control: Pay-as-you-go pricing with resource tagging
- Integration: Seamless integration with other Azure services
- Lightweight: Fast VM creation and management on local machines
- Development Parity: Simulates production Swarm environment locally
- Easy Cleanup: Simple VM lifecycle management
- Cross-Platform: Works on macOS, Linux, and Windows
- In-Memory Speed: Fast job queue processing
- Pub/Sub: Real-time communication between services
- TTL Support: Automatic job status expiration
- Reliability: Persistence options for durability
- Stateless: No server-side session storage needed
- XSS Protection: HTTP-only cookies prevent JavaScript access
- Scalability: No shared session store required
- Standard: Industry-standard authentication method
All deployment automation is in the scripts/ directory:
| Script | Purpose | Usage |
|---|---|---|
deploy-local.sh |
Docker Compose deployment | make deploy-local |
deploy-swarm.sh |
Multipass VM-based Swarm deployment | make deploy-swarm |
deploy-azure.sh |
Azure VM-based Swarm deployment | make deploy-azure |
Create products with images uploaded from local files or external URLs. The image service handles processing and storage via Azure Blob Storage.
The recommendation engine provides personalized suggestions using MapReduce algorithms:
- User-based: Recommendations based on user purchase history
- Cart-based: Suggestions based on current cart contents
- Product-based: Similar products based on category and co-purchases
- Trending: Popular products across all users
Full review system with star ratings, feeding into the recommendation engine for better suggestions.
This project is developed for academic purposes as part of university coursework.
Built for LINFO2145 - Cloud Computing @ UCLouvain (Université catholique de Louvain).
A modern e-commerce platform demonstrating cloud-native microservices architecture, containerization, and scalable deployment strategies.











