Bazaary is an enterprise-grade, full-stack e-commerce platform designed for buyers, sellers, and admins. Built with production-ready architecture, premium UI/UX design, and comprehensive security features, it showcases modern web development best practices.
- β Backend: Robust API with health monitoring, security hardening, and event processing
- β Frontend: Premium UI/UX with modern design system and responsive layouts
- β Testing: Comprehensive coverage including build validation and API testing
- β Security: Production-grade security headers, JWT authentication, and rate limiting
- π Advanced Authentication & Authorization (JWT with refresh tokens)
- π Intelligent Product Search (Meilisearch with instant results)
- π₯ Multi-Role Dashboard System (Buyer, Seller, Admin interfaces)
- π Complete E-commerce Flow (Cart, checkout, order management)
- π³ Integrated Payment Processing (Stripe with webhook handling)
- π° Real-time Wallet System (Locked/available funds mechanism)
- π Admin Analytics Dashboard (Platform management and monitoring)
- π Real-time Notifications (WebSocket-powered updates)
- π₯ Health Monitoring System (Production-ready monitoring endpoints)
- Framework: Next.js 16+ (React 19, TypeScript)
- Styling: Tailwind CSS v4, Custom Design System
- Animation: Framer Motion, CSS Transitions
- UI Components: Custom Component Library (TypeScript-safe)
- State Management: React Context, Custom Hooks
- Design System: Glass morphism, Premium animations, Mesh gradients
- Framework: NestJS 11+ (Event-Driven Architecture)
- Security: Helmet, JWT, Rate Limiting, CORS Protection
- Monitoring: Custom Health Check System (@nestjs/terminus)
- Documentation: Auto-generated API specs
- Error Handling: Global exception filters with logging
- Processing: Event bus with error recovery mechanisms
- Primary Database: PostgreSQL (TypeORM with migrations)
- Document Store: MongoDB (Mongoose for catalog data)
- Cache/Queue: Redis (ioredis), BullMQ for job processing
- Search Engine: Meilisearch (instant search-as-you-type)
- File Storage: MinIO (S3-compatible) / Cloudinary
- Containerization: Docker Compose for local development
- Environment: Production-grade environment validation
- Testing: Comprehensive build and API testing
- Monitoring: Health endpoints for Kubernetes readiness/liveness probes
- Real-time: Socket.io (WebSockets for live updates)
- Event-Driven Architecture: Decoupled microservice-style modules with internal event bus
- Production Security: Helmet security headers, JWT authentication, rate limiting, CORS protection
- Health Monitoring: Comprehensive health check system with PostgreSQL, MongoDB, Redis monitoring
- Graceful Error Handling: Global exception filters, logging interceptors, and recovery mechanisms
- Modern Design System: Glass morphism effects, premium animations, and mesh gradient backgrounds
- Component Library: TypeScript-safe, reusable UI components with consistent design patterns
- Responsive Dashboards: Professional buyer, seller, and admin interfaces with real-time updates
- Loading States: Skeleton screens, shimmer effects, and comprehensive empty state management
- Type Safety: Full TypeScript coverage with proper interfaces and error handling
- Build Validation: Comprehensive testing including frontend/backend builds and API validation
- Environment Validation: Production-grade environment variable validation with detailed error messages
- Health Endpoints: Kubernetes-ready
/health,/health/ready, and/health/liveendpoints
- Real-Time Ledger System: Locked/available fund mechanism similar to major platforms (Upwork/Amazon)
- Instant Search: Meilisearch-powered search-as-you-type with millisecond response times
- Event Processing: Background job processing with error recovery and consecutive error limits
- WebSocket Sync: Real-time order status and wallet balance updates
βββ backend/ # NestJS API server (business logic, REST APIs)
β βββ src/
β β βββ app.module.ts # Main NestJS module
β β βββ main.ts # Entry point
β β βββ modules/ # Feature modules (auth, products, orders, etc.)
β β βββ config/ # Configuration files (DB, Redis, etc.)
β β βββ database/ # Entities, migrations, seeds
β β βββ common/ # Shared decorators, guards, filters, etc.
β β βββ lib/ # Library code (e.g., Meilisearch client)
β βββ scripts/ # Shell/TS scripts for seeding, testing, admin
β βββ .env # Backend environment variables
β βββ package.json # Backend dependencies and scripts
β βββ ... # Other config files (tsconfig, eslint, etc.)
β
βββ frontend/ # Next.js web app (UI, SSR, API routes)
β βββ app/ # App directory (routing, pages, layouts)
β βββ components/ # Reusable React components
β βββ lib/ # API clients, auth, cart logic, etc.
β βββ public/ # Static assets (images, manifest)
β βββ .env.local # Frontend environment variables
β βββ package.json # Frontend dependencies and scripts
β βββ ... # Other config files (tsconfig, postcss, etc.)
β
βββ docker-compose.yml # Orchestrates all services (DBs, Redis, MinIO, Meilisearch)
βββ docs/ # API contracts, project overview, documentation
βββ README.md # Project documentation (this file)
βββ ... # Other root-level files (project details, scripts)
- backend/src/modules/: Each subfolder is a feature module (e.g., auth, products, orders, users, sellers, payments, wallets, analytics, etc.).
- backend/src/database/entities/: TypeORM entities for all main data models.
- backend/scripts/: Scripts for seeding, admin registration, manual tests, etc.
- frontend/app/: Next.js app directory with routes for buyers, sellers, admin, and public pages.
- frontend/components/: UI components like Navbar, ProductCard, AddToCartButton, etc.
- frontend/lib/api/: API client code for interacting with backend endpoints.
- docs/: API contracts, project overview, and other documentation.
- Docker Desktop (for services orchestration)
- Node.js v18+ (recommended: v20+)
- npm (comes with Node.js)
git clone <your-repo-url>
cd bazaarydocker-compose up -d postgres mongodb redis minio meilisearchThis starts all required services in detached mode.
cd backend
npm install
# Test backend build
npm run build
# Start development server
npm run start:dev
# Verify health endpoints
curl http://localhost:3001/api/health
curl http://localhost:3001/api/health/ready
curl http://localhost:3001/api/health/livecd frontend
npm install
# Test frontend build (production-ready)
npm run build
# Start development server
npm run dev- Frontend UI: http://localhost:3000 (Premium design interface)
- Backend API: http://localhost:3001 (Robust API with monitoring)
- Health Monitoring: http://localhost:3001/api/health
- API Documentation: Available via
/apiendpoints
- Buyer Dashboard: http://localhost:3000/dashboard
- Seller Dashboard: http://localhost:3000/seller
- Admin Dashboard: http://localhost:3000/admin
# Comprehensive health check with service status
GET /api/health
# Returns: PostgreSQL, MongoDB, Redis, MeiliSearch status with response times
# Kubernetes readiness probe
GET /api/health/ready
# Returns: {"ready": true, "services": ["postgres", "mongodb", "redis"]}
# Kubernetes liveness probe
GET /api/health/live
# Returns: {"alive": true, "uptime": 123.45}- β Build Validation: Both frontend and backend compile successfully
- β TypeScript Safety: Full type checking with zero compilation errors
- β API Testing: Authentication, product catalog, and health endpoint validation
- β UI Testing: All dashboard interfaces render correctly
- β Security Testing: JWT protection and CORS validation
- β Database Connectivity: PostgreSQL, MongoDB, and Redis connection verification
# Test backend compilation
cd backend && npm run build
# Test frontend compilation
cd frontend && npm run build
# Test API endpoints
curl http://localhost:3001/api/health
curl http://localhost:3001/api/products
curl http://localhost:3001/api/auth/me # Should return 401 without authAll required variables are configured in backend/.env:
- Database connections (PostgreSQL, MongoDB, Redis)
- Security settings (JWT secrets, CORS origins)
- External APIs (Stripe, MeiliSearch)
- File storage configuration (MinIO)
- Monitoring and logging settings
Configured in frontend/.env.local:
- Backend API URL configuration
- Public API keys and endpoints
- Feature flags and development settings
Note: All environment files are pre-configured for local development. Update values for production deployment.
- Build Command:
npm run build - Start Command:
npm run start:prod - Health Check:
/api/health/ready - Environment: Configure all
.envvariables in platform dashboard
- Framework: Next.js (auto-detected)
- Build Command:
npm run build - Environment: Configure
.env.localvariables in Vercel dashboard - Domain: Auto-SSL with custom domain support
- PostgreSQL: Use managed services (Railway, Supabase, etc.)
- MongoDB: MongoDB Atlas or managed MongoDB
- Redis: Redis Cloud or managed Redis services
- Search: MeiliSearch Cloud or self-hosted MeiliSearch
- Premium glass morphism effects with backdrop blur
- Responsive grid layouts with professional spacing
- Smooth animations and hover effects
- Consistent design system across all interfaces
- Loading states and empty state management
- Production-grade security headers (Helmet)
- JWT authentication with refresh token support
- Rate limiting (120 requests/minute)
- CORS protection with environment-based origins
- Global exception handling with detailed logging
- Buyer Interface: Clean product browsing with cart management
- Seller Interface: Business metrics with order management tools
- Admin Interface: Platform oversight with system health monitoring
- Real-time updates via WebSocket connections
- Full TypeScript coverage with strict type checking
- ESLint configuration with auto-formatting
- Consistent code structure across frontend/backend
- Environment validation with detailed error messages
- Production-ready error handling and logging
- Next.js 16 with optimized bundling and caching
- Database query optimization with proper indexing
- Redis caching for frequently accessed data
- Compression middleware for reduced payload sizes
- Background job processing with BullMQ
POST /api/auth/login # User authentication
GET /api/auth/me # Get current user (protected)
POST /api/auth/logout # User logout
POST /api/auth/refresh # Refresh JWT token
GET /api/products # Browse product catalog
GET /api/products/:id # Get product details
GET /api/search # Search products (MeiliSearch)
GET /api/health # Comprehensive system health
GET /api/health/ready # Readiness probe (K8s)
GET /api/health/live # Liveness probe (K8s)
- Clone & Start: Follow setup instructions above
- Health Check: Visit
http://localhost:3001/api/health - Browse Products: Navigate to
http://localhost:3000 - Test Dashboards: Access buyer/seller/admin interfaces
- API Testing: Use provided curl commands
- β Security: Helmet, JWT, Rate limiting, CORS
- β Monitoring: Health checks, logging, error handling
- β Performance: Caching, compression, optimizations
- β Scalability: Event-driven architecture, job queues
- β Testing: Build validation, API testing, UI verification
- β Documentation: Comprehensive README, API specs
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Follow TypeScript and ESLint standards
- Test your changes with
npm run build - Commit your changes (
git commit -m 'Add AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT License - see LICENSE file for details.
π Interview Ready: This project demonstrates enterprise-level architecture, security best practices, modern UI/UX design, and comprehensive testing. All features are fully functional with production-grade monitoring and error handling.
Quick Start: docker-compose up -d β cd backend && npm run start:dev β cd frontend && npm run dev
Health Check: http://localhost:3001/api/health | Live Demo: http://localhost:3000