A cloud-native, full-stack e-commerce application that demonstrates production-grade development, DevOps automation, and scalable deployment strategies. Built using React.js, Node.js, and a complete modern DevOps toolchain.
- π Frontend: Mobile-first, responsive, modern UI
- π API: Secure, RESTful backend with full CRUD
- π± Performance: Optimized load, fast interactions
- Product Catalog - Browse, search, and filter products
- Shopping Cart - Add/remove items with persistent storage
- User Authentication - JWT-based login/register system
- Order Management - Complete order processing workflow
- Admin Dashboard - Product and user management
- Wishlist - Save favorite products
- Professional Design - Clean, modern interface with gradients
- Responsive Layout - Mobile-first design with CSS Grid/Flexbox
- Interactive Elements - Smooth animations and hover effects
- Typography - Premium fonts (Inter & Poppins)
- Accessibility - WCAG compliant with proper focus states
- Secure REST API with Express.js
- MongoDB schemas designed for performance & relationships
- Best practices: CORS, Helmet, bcrypt, JWT
- Optimized with compression, caching, and validations
- Structured for unit and integration testing
- π HashiCorp Vault - Centralized secret management
- π Secret Rotation - Automated credential updates
- π‘οΈ Zero Hardcoded Secrets - All credentials vault-managed
- π Multi-Environment - Secure config per environment
- π Audit Logging - Complete security compliance
- π¨ Real-time Monitoring - Security event tracking
graph TB
subgraph "π Frontend Layer"
A[π€ User] --> B[βοΈ React App]
B --> B1[π HomePage]
B --> B2[ποΈ ProductsPage]
B --> B3[π Shopping Cart]
B --> B4[π€ User Profile]
B5[π¨ Components] --> B
B6[π± React Router] --> B
end
subgraph "π API Gateway Layer"
B --> C[π Express.js API]
C --> C1[π Auth Middleware]
C --> C2[β
Validation]
C --> C3[π‘οΈ Security Headers]
C --> C4[π Rate Limiting]
end
subgraph "π― Business Logic Layer"
C --> D1[π¦ Product Service]
C --> D2[π₯ User Service]
C --> D3[π Order Service]
C --> D4[π Auth Service]
D1 --> D5[π CRUD Operations]
D2 --> D5
D3 --> D5
end
subgraph "πΎ Data Layer"
D5 --> E[π MongoDB]
E --> E1[π₯ Users Collection]
E --> E2[π¦ Products Collection]
E --> E3[π Orders Collection]
E --> E4[π Indexes & Relations]
end
subgraph "π Security Layer"
F1[π JWT Tokens] --> C1
F2[π bcrypt Hashing] --> D2
F3[π‘οΈ Helmet Security] --> C3
F4[π CORS Policy] --> C
end
subgraph "π DevOps Pipeline"
G[π± GitHub Repo] --> H[π GitHub Actions]
H --> H1[π§ͺ CI Testing]
H --> H2[ποΈ Build Process]
H2 --> I[π³ Docker Images]
I --> J[π¦ Docker Hub]
J --> K[βοΈ DigitalOcean]
end
subgraph "ποΈ Infrastructure"
L[π Terraform] --> M[π Load Balancer]
L --> N[π₯οΈ Droplets]
L --> O[π§ Networking]
P[βοΈ Ansible] --> N
M --> N
N --> K
end
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
style E fill:#fff3e0
style G fill:#fce4ec
sequenceDiagram
participant U as π€ User
participant F as βοΈ Frontend
participant A as π API
participant M as π‘οΈ Middleware
participant S as π― Service
participant D as πΎ Database
U->>F: Interact with UI
F->>A: HTTP Request
A->>M: Security Check
M->>M: Validate & Authenticate
M->>S: Process Business Logic
S->>D: Database Operation
D->>S: Return Data
S->>A: Formatted Response
A->>F: JSON Response
F->>U: Updated UI
graph LR
subgraph "π― Core Services"
A1[π₯ User Service]
A2[π¦ Product Service]
A3[π Order Service]
A4[π³ Payment Service]
end
subgraph "π§ Support Services"
B1[π Auth Service]
B2[π§ Email Service]
B3[π Analytics Service]
B4[π Search Service]
end
subgraph "π API Gateway"
C[πͺ Gateway]
end
C --> A1
C --> A2
C --> A3
C --> A4
C --> B1
C --> B2
C --> B3
C --> B4
- React.js + Axios + TailwindCSS
- JWT-based auth
- CI/CD via GitHub Actions
- Node.js (Express.js)
- MongoDB (Mongoose)
- Redis (Caching sessions)
- REST APIs with Swagger Docs
- Middleware (Helmet, CORS, express-validator)
- GitHub Actions (CI/CD)
- Terraform (Infra provisioning)
- Ansible (Server configuration)
- Docker + Docker Compose (Containerization)
- DigitalOcean (Deployment)
ExampleCorp/
βββ .github/
β βββ workflows/
β βββ ci.yaml # Continuous Integration workflow
β βββ cd.yaml # Continuous Deployment workflow
β
βββ frontend/ # Frontend (React) Application
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Individual pages/views
β β βββ styles/ # CSS / styling assets
β βββ package.json # Frontend dependencies and scripts
β
βββ backend/ # Backend (Node.js + Express)
β βββ src/
β β βββ models/ # MongoDB schemas
β β βββ routes/ # API endpoints
β β βββ middleware/ # Security, auth, etc.
β β βββ config/ # DB connection and configs
β βββ package.json # Backend dependencies and scripts
β
βββ infra/ # Infrastructure as Code (Terraform)
β βββ main.tf # Main configuration
β βββ variables.tf # Input variables
β βββ terraform.tfvars.example # Sample configuration file
β
βββ docs/ # Project documentation
- Node.js 18+ and npm
- MongoDB (local or Atlas)
- Git
git clone https://github.com/Shakeelkhuhro/ExampleCorp-Ecommerce.git
cd ExampleCorp-Ecommerce
# Install backend dependencies
cd backend
npm install
# Install frontend dependencies
cd ../frontend
npm install# Backend environment
cd backend
cp .env.example .env
# Edit .env with your MongoDB URI and JWT secret
# Seed sample data (optional)
npm run seed# Terminal 1 - Start backend (Port 5000)
cd backend
npm run dev
# Terminal 2 - Start frontend (Port 3000)
cd frontend
npm start- π Frontend: http://localhost:3000
- π API: http://localhost:5000/api
- π API Docs: http://localhost:5000/api/docs
POST /api/users/register # User registration
POST /api/users/login # User login
GET /api/users/profile # Get user profile
PUT /api/users/profile # Update profileGET /api/products # Get all products (with filtering)
GET /api/products/:id # Get single product
POST /api/products # Create product (Admin)
PUT /api/products/:id # Update product (Admin)
DELETE /api/products/:id # Delete product (Admin)GET /api/orders/myorders # Get user orders
GET /api/orders/:id # Get single order
POST /api/orders # Create new order
PUT /api/orders/:id/pay # Mark as paid- π± Mobile First - Optimized for all devices
- π― Interactive - Hover effects and animations
- π¨ Modern - Gradient themes and glassmorphism
- βΏ Accessible - WCAG compliant
- Header - Navigation with cart and user icons
- ProductCard - Interactive product display
- Footer - Links and social media
- HomePage - Hero section with features
- ProductsPage - Search and filter functionality
npm start # Production server
npm run dev # Development with nodemon
npm run seed # Populate database with sample data
npm test # Run tests (when implemented)npm start # Development server
npm run build # Production build
npm test # Run tests
npm run eject # Eject Create React App (use carefully)# Backend (.env)
NODE_ENV=development
PORT=5000
MONGO_URI=mongodb://localhost:27017/examplecorp
JWT_SECRET=your-super-secret-jwt-key
JWT_EXPIRE=30d
FRONTEND_URL=http://localhost:3000cd infra
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars with your cloud provider tokens
terraform init
terraform plan
terraform applycd ansible
# Configure your inventory and playbooks
ansible-playbook -i inventory deploy.yml- Automatic testing on pull requests
- Build and deploy on main branch
- Environment-specific deployments
- β‘ Load Time: < 2s initial page load
- π± Mobile Score: 95+ Lighthouse score
- π Security: A+ SSL rating
- π Uptime: 99.9% availability target
- π API Response: < 100ms average
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
- β Full-Stack Development - React + Node.js + MongoDB
- β Modern UI/UX - Responsive design principles
- β API Design - RESTful architecture
- β Authentication - JWT implementation
- β Database Design - MongoDB relationships
- β DevOps Practices - CI/CD, IaC, automation
- β Security - Input validation, CORS, Helmet
- β Testing - Unit and integration testing setup
MIT License Β© 2025 Shakeel Khuhro
- Create React App - Frontend bootstrapping
- Express.js - Backend framework
- MongoDB - Database solution
- Font Awesome - Icon library
- Unsplash - Placeholder images
β Star this repository if you found it helpful!