A modern, production-ready PC customization and e-commerce platform with automatic compatibility checking, intelligent build evaluation, and a premium dark-themed UI.
- Smart PC Builder: Select components across 9 categories (CPU, Motherboard, GPU, RAM, Storage, PSU, Cabinet, Cooler, Accessories)
- Auto Compatibility Checking: Real-time validation of component compatibility
- "Is It Worth It?" AI Evaluation: Intelligent analysis of build balance and value
- Shopping Cart: Full e-commerce cart functionality with quantity management
- User Authentication: JWT-based secure login and registration
- Saved Builds: Save and retrieve custom PC configurations
- Admin Panel: Complete product management system
- Dark Theme: Premium #0f172a background with neon accents
- Glassmorphism: Modern frosted glass card effects
- Neon Gradients: Blue + Purple gradient highlights
- Smooth Animations: Fade-in, slide-up, and hover effects
- Fully Responsive: Mobile-first design with breakpoints
- Custom Scrollbar: Styled with gradient effects
- Node.js + Express.js - REST API server
- MongoDB + Mongoose - Database and ODM
- JWT - Authentication
- Bcrypt - Password hashing
- Multer - Image upload handling
- CORS - Cross-origin resource sharing
- React 18 - UI library
- Vite - Build tool and dev server
- React Router - Client-side routing
- Tailwind CSS - Utility-first styling
- Axios - HTTP client
- Context API - State management
- Node.js (v16 or higher)
- MongoDB (local or Atlas)
- npm or yarn
-
Navigate to backend directory: ```bash cd backend ```
-
Install dependencies: ```bash npm install ```
-
Configure environment variables: Create a `.env` file in the backend directory: ```env MONGODB_URI=mongodb://localhost:27017/buildmypc JWT_SECRET=your_super_secret_jwt_key_change_this_in_production PORT=5000 NODE_ENV=development ```
-
Start the server: ```bash npm run dev ```
The backend will run on http://localhost:5000
-
Navigate to frontend directory: ```bash cd frontend ```
-
Install dependencies: ```bash npm install ```
-
Start the development server: ```bash npm run dev ```
The frontend will run on http://localhost:5173
``` Build my Pc/ βββ backend/ β βββ models/ # MongoDB schemas β β βββ User.js β β βββ Product.js β β βββ Build.js β β βββ Cart.js β βββ routes/ # API endpoints β β βββ auth.js β β βββ products.js β β βββ builds.js β β βββ cart.js β βββ middleware/ # Auth & upload middleware β β βββ auth.js β β βββ upload.js β βββ utils/ # Helper functions β β βββ compatibility.js β β βββ evaluation.js β βββ uploads/ # Product images β βββ server.js # Express server β βββ package.json β βββ frontend/ βββ src/ β βββ components/ # Reusable components β β βββ Navbar.jsx β β βββ ProductCard.jsx β β βββ BuildSummary.jsx β β βββ CompatibilityStatus.jsx β β βββ GlassCard.jsx β βββ pages/ # Route pages β β βββ Home.jsx β β βββ BuildPC.jsx β β βββ Cart.jsx β β βββ Auth.jsx β β βββ Admin.jsx β βββ context/ # React context β β βββ AuthContext.jsx β βββ services/ # API calls β β βββ api.js β βββ App.jsx β βββ main.jsx β βββ index.css βββ index.html βββ package.json βββ vite.config.js βββ tailwind.config.js ```
- `POST /api/auth/register` - Register new user
- `POST /api/auth/login` - Login user
- `GET /api/products` - Get all products (with filters)
- `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)
- `POST /api/builds` - Save build
- `GET /api/builds/user/:userId` - Get user's builds
- `GET /api/builds/:id` - Get specific build
- `DELETE /api/builds/:id` - Delete build
- `POST /api/builds/check-compatibility` - Check compatibility
- `GET /api/cart/:userId` - Get user's cart
- `POST /api/cart` - Add item to cart
- `PUT /api/cart/:userId/item/:productId` - Update quantity
- `DELETE /api/cart/:userId/item/:productId` - Remove item
- `DELETE /api/cart/:userId` - Clear cart
The system automatically checks:
- β CPU socket matches Motherboard socket
- β RAM type matches Motherboard support
- β PSU wattage is sufficient for components
- β GPU length fits in Cabinet
- β Motherboard form factor fits in Cabinet
The AI evaluation considers:
- CPU-GPU price balance
- Price-to-performance ratio
- RAM capacity adequacy
- Storage type (SSD/NVMe bonus)
- Overall build category (Excellent/Good/Fair/Poor)
- Background: #0f172a (dark-bg)
- Cards: #1e293b (dark-card)
- Primary Blue: #0ea5e9
- Primary Purple: #a855f7
- Gradients: Blue to Purple (135deg)
- Glass Cards: Frosted glass effect with backdrop blur
- Neon Borders: Gradient borders with glow
- Buttons: Gradient backgrounds with hover effects
- Animations: Fade-in, slide-up, pulse, glow
To access the admin panel, you'll need to manually set a user's `isAdmin` field to `true` in MongoDB.
- Push code to GitHub
- Connect repository to Render/Railway
- Set environment variables
- Deploy
- Push code to GitHub
- Connect repository to Vercel/Netlify
- Set build command: `npm run build`
- Set output directory: `dist`
- Deploy
- Create cluster on MongoDB Atlas
- Get connection string
- Update `MONGODB_URI` in backend .env
- Register/Login: Create an account or login
- Browse Components: Navigate to Build PC page
- Select Parts: Choose components from each category
- Check Compatibility: View real-time compatibility status
- Get Evaluation: See "Is It Worth It?" analysis
- Add to Cart: Add complete build to shopping cart
- Save Build: Save configuration for later
- Checkout: Complete purchase (demo mode)
This project demonstrates:
- β Full-stack development
- β RESTful API design
- β Database modeling
- β Authentication & authorization
- β Modern UI/UX design
- β Responsive web design
- β State management
- β File upload handling
- β Complex business logic
MIT License - feel free to use for your projects!
Contributions are welcome! Feel free to submit issues and pull requests.
Built with β€οΈ for PC enthusiasts