BuildForge is an intelligence-driven E-Commerce marketplace and PC customizer platform built on the MERN stack. It empowers users to browse premium hardware components, verify system compatibility in real-time, estimate AAA gaming FPS performance across target resolutions, save configurations locally under user-scoped keys, share rigs with the community, and converse with an AI Hardware Consultant chatbot.
graph TD
Client[React SPA - Netlify]
Server[Express API - Render]
Database[(MongoDB Atlas)]
Gemini[Google Gemini API]
Client -- HTTPS / REST --> Server
Server -- Mongoose ORM --> Database
Server -- SDK Requests --> Gemini
- JWT Authentication: Secure login and signup flows with password hashing via
bcryptjsand token verification. - Builder Profiles: Customizable profiles showing member bios, avatars, default shipping details, order history, and showcase statistics (Reputation, Posts count, Likes received).
- Isolation & Migration: User configurations and orders are securely isolated using user-scoped localStorage keys (
forge_saved_builds_${userId}). Legacy configurations are automatically merged into the user-scoped slot upon login. - Order History Tracking: Detailed tabular logs recording historical procurement orders, itemized prices, checkout status, and transaction timestamps.
- Interactive PC Configurator: Configure custom gaming rigs by selecting compatible parts across 8 hardware slots (CPU, GPU, Motherboard, RAM, Storage, PSU, Cooler, Case).
- Part Catalog & Faceted Search: Browse and filter hardware components dynamically by brand, price range, and technical specifications (Socket Type, RAM Support, VRAM, capacity) with responsive URL synchronization.
- Compatibility Engine: Automatically validates motherboard-socket pairing, memory type slots, case clearances (maximum GPU length and cooler height), and estimated power consumption wattage.
- FPS & Resolution Performance Estimator: Forecasts gaming frame rates (FPS) dynamically at 1080p, 1440p, and 4K resolutions on popular AAA game titles.
- Shopping Cart & Checkout: Place procurement orders for parts lists, track checkout shipping information, and log orders directly to user accounts.
- Side-by-Side Product Comparison: Compare detailed specifications, socket types, VRAM capacities, and pricing models side-by-side for up to 4 hardware products.
- Build Showcase Feed: Renders community-shared rigs with author profiles, custom specifications snapshots, and budget metrics.
- Atomic Interactions: Users can like, comment, bookmark, and clone community configurations. Likes and comment counters utilize atomic MongoDB operations (
$addToSet,$push,$pull,$inc) to prevent race conditions. - Nested Commenting & Discussion: Engage in deep dialog threads on custom builds through interactive comment drawers supporting parent-child reply hierarchies.
- AI Advisor Dialogue: Conversational interface powered by Google Gemini (e.g.
gemini-2.5-flash) that acts as a hardware consultant. - Progressive Requirement Gathering: Inquires about the user's budget, purpose, and preferred brands, cross-referencing live database products to recommend builds.
- Compatibility Advisor: Directly analyses selected configurations to explain bottleneck issues and compatibility warnings in plain text.
- Stitch Styling System: Built using the Stitch layout and component styling principles on the frontend for custom components, fluid layouts, and cohesive typography.
- Dynamic WebGL Background: Animated WebGL hero layout rendering smooth gradient wave shaders and real-time color transitions.
- Trending Carousel & Skeletons: Animated hardware showcases and loading state skeletons to optimize perceived user response times.
- Frontend: Stitch, React (v18+), Vite, Tailwind CSS, Lucide Icons, React Router DOM
- Backend: Node.js, Express, Mongoose (v9.x), JWT (jsonwebtoken), Bcryptjs, Cors
- AI Engine: Google Generative AI SDK (Gemini AI)
- Database: MongoDB (Atlas)
- Deployment Hosting: Netlify (Frontend), Render (Backend)
E-Commerce/
├── backend/ # MVC Backend
│ ├── config/ # Database and server configs
│ ├── controllers/ # Request handlers (auth, products, orders, chat, community)
│ ├── data/ # Seed datasets and migration scripts
│ ├── middleware/ # Auth, error, and routing interceptors
│ ├── models/ # Mongoose schemas (User, Product, Order, CommunityBuild, Bookmark)
│ ├── routes/ # API endpoint routing declarations
│ ├── services/ # Gemini AI SDK integration
│ ├── utils/ # Token and query features
│ ├── server.js # Server bootloader entrypoint
│ └── app.js # Express app configuration
├── public/ # Frontend static assets (contains _redirects)
├── src/ # Frontend Source
│ ├── components/ # Reusable UI widgets (Navbar, ChatAssistant)
│ ├── context/ # Cart and global state providers
│ ├── data/ # Fallback datasets
│ ├── pages/ # Page components (Home, Products, Profile, SavedBuilds, Community)
│ ├── App.jsx # Client routes setup
│ ├── index.css # Main styling system
│ └── main.jsx # DOM renderer and fetch interceptor
├── vite.config.js # Vite build and proxy settings
├── vercel.json # Alternative Vercel deployment configs
├── package.json # Client dependencies and build scripts
└── README.md # Project documentation
- Node.js (v18+)
- MongoDB (Local instance or Atlas cloud account URI)
- Start your local MongoDB server or prepare your MongoDB Atlas URI.
- Navigate to the
backend/directory:cd backend
- Create a
backend/.envfile based onbackend/.env.example:PORT=5000 NODE_ENV=development MONGODB_URI=mongodb://127.0.0.1:27017/ecommerce JWT_SECRET=your_super_secure_jwt_secret_key_minimum_256_bits JWT_EXPIRES_IN=7d GEMINI_API_KEY=your_google_ai_studio_gemini_api_key
- Install server dependencies:
npm install
- Boot the API server in development mode:
npm run dev
- Open a new terminal in the workspace root directory:
npm install
- Run the Vite development server:
npm run dev
- Open
http://localhost:3000in your browser.
| Variable | Required | Description | Example |
|---|---|---|---|
PORT |
No | Binding port for the server (defaults to 5000) | 5000 |
NODE_ENV |
Yes | Server environment state | production / development |
MONGODB_URI |
Yes | MongoDB Connection String | mongodb+srv://... / mongodb://... |
JWT_SECRET |
Yes | Secret key used for signing JWT login tokens | strong_random_secret_string |
JWT_EXPIRES_IN |
Yes | Validity duration of auth tokens | 7d |
GEMINI_API_KEY |
Yes | Google Gemini API key for chatbot advisor | AIzaSy... |
| Variable | Required | Description | Example |
|---|---|---|---|
VITE_API_URL |
No | Base URL of the API server in production | https://buildforge-backend.onrender.com |
POST /register: Register a new user account.POST /login: Log in and retrieve a JWT bearer token.
GET /: Retrieve catalog products with filters, sorting, keyword search, and dynamic specs matches.GET /categories: Retrieve all distinct product categories.GET /games: Retrieve AAA game profiles for FPS calculations.GET /:id: Retrieve detailed product parameters.POST /(Admin): Create a new product.PATCH /:id(Admin): Modify product fields.DELETE /:id(Admin): Remove product.
GET /: Retrieve published showcase builds feed.POST /: Publish a custom build configuration.GET /:id: Retrieve specific showcase build details.DELETE /:id: Delete showcase post.POST /:id/like: Toggle atomic likes.POST /:id/bookmark: Toggle bookmark tracking.POST /:id/clone: Increment clone tracking count.GET /:id/comments: Retrieve comment logs.POST /:id/comments: Add a new comment/nested reply.DELETE /:id/comments/:commentId: Remove comment.
GET /profile: Get active user profile with computed reputation.PATCH /profile: Update profile info.
POST /: Submit a procurement order.GET /myorders: Get logged-in user order history.
POST /: Chatbot hardware consultant endpoint.
- Authentication: Users can sign up, log in, secure JWT token is saved, and protected routes block unauthenticated visitors.
- API Connectivity: Frontend fetches succeed in production environment, fetching database products and saving builds correctly.
- Real-time Compatibility: Builder scans socket mismatch, PSU sufficiency, and case GPU clearances.
- AI Advisor Chatbot: Gemini chatbot replies, analyzes compatibility lists, and identifies concept explanations.
- Atomic Counters: Liking and commenting from concurrent users do not hit VersionError crashes.
- Database Integrity: Saved builds, profiles, and order logs persist correctly in MongoDB Atlas.
Distributed under the ISC License. See LICENSE for details.