An intelligent PC build recommendation system that helps users find the perfect computer components within their budget. The application uses a heuristic-based scoring algorithm to rank PC parts and provides automated build recommendations optimized for different use cases.
- Search through 8,979 PC components from multiple categories
- Advanced filtering by component type (CPU, GPU, RAM, etc.)
- Sort by AI Score, price, or performance metrics
- Pagination support for efficient browsing (20 items per page)
- Performance-to-price ratio scoring for all components
- Category-specific ranking algorithms:
- CPUs: Ranked by cores, clock speed, and value
- GPUs: Ranked by memory, chipset tier, and value
- RAM: Ranked by capacity, speed, and value
- Storage: Ranked by capacity and value
- Visual indicators showing AI Score and market rank
- Enter your budget and receive 3 optimized builds:
- Gaming Build: GPU-focused for maximum gaming performance
- Workstation Build: CPU and RAM optimized for productivity
- General Use Build: Balanced components for everyday computing
- Smart budget allocation across 7 component categories
- Detailed part breakdown with pricing in Indian Rupees (βΉ)
- Dark mode interface with glassmorphism design
- Responsive layout for desktop and mobile
- Interactive cards with detailed component specifications
- Modal dialogs for viewing complete build details
- React 18 with TypeScript
- Vite for fast development and builds
- TailwindCSS for styling
- Shadcn/ui component library
- React Router for navigation
- React Query for data fetching
- Sonner for toast notifications
- Lucide React for icons
- Node.js with Express 5
- TypeScript for type safety
- Zod for schema validation
- Vitest for testing
- 8,979 components across 7 categories
- Multi-file JSON dataset with detailed specifications
- Automated USD to INR conversion (1 USD β 85 INR)
- Node.js 18+ or 20+
- npm or pnpm
- Clone the repository
git clone <repository-url>
cd CSE-PSPP-Proj- Install dependencies
npm install
# or
pnpm install- Start development server
npm run devThe application will be available at http://localhost:5173
- Navigate to the Recommendations page (home page)
- Enter your budget in Indian Rupees (minimum βΉ40,000)
- Click Generate Recommendations
- View the 3 generated builds as cards
- Click any build card to see the complete parts list in a popup
- Navigate to Search Parts from the header
- Use the search bar to find specific components
- Filter by component type (CPU, GPU, RAM, etc.)
- Sort results by:
- Best Value (AI): Highest performance-to-price ratio
- Price: Low to High
- Price: High to Low
- Browse through pages using Next/Previous buttons
CSE-PSPP-Proj/
βββ client/ # Frontend React application
β βββ components/ # Reusable UI components
β β βββ ui/ # Shadcn UI components
β β βββ Header.tsx # Global navigation
β β βββ PartCard.tsx # Component display card
β β βββ BuildDisplay.tsx
β βββ pages/ # Route pages
β β βββ Recommendations.tsx
β β βββ Search.tsx
β βββ lib/ # Utilities
βββ server/ # Backend Express server
β βββ routes/ # API endpoints
β β βββ recommend.ts # Build recommendation logic
β β βββ parts.ts # Parts search & retrieval
β βββ services/ # Business logic
β β βββ partService.ts # Part data management
β β βββ rankingService.ts # AI scoring algorithm
β β βββ recommendationEngine.ts # Build generation
β βββ data/ # Legacy data (deprecated)
βββ dataset/ # PC component data (JSON files)
β βββ cpu.json
β βββ video-card.json
β βββ memory.json
β βββ motherboard.json
β βββ internal-hard-drive.json
β βββ power-supply.json
β βββ case.json
βββ shared/ # Shared TypeScript types
β βββ api.ts
βββ tests/ # Unit tests
Search and retrieve PC parts with pagination.
Query Parameters:
query(optional): Search termtype(optional): Filter by component type (cpu,gpu,ram, etc.)page(optional): Page number (default: 1)limit(optional): Items per page (default: 20)
Response:
{
"data": [
{
"id": "cpu-123",
"name": "AMD Ryzen 7 5800X",
"type": "cpu",
"price": 28900,
"brand": "AMD",
"score": 87.5,
"rank": 42,
"specs": { ... }
}
],
"total": 566,
"page": 1,
"totalPages": 29
}Generate optimized PC builds for a given budget.
Request Body:
{
"budget": 80000
}Response:
{
"builds": [
{
"id": "build-gaming-1234567890",
"usage": "gaming",
"totalPrice": 79850,
"parts": {
"cpu": { ... },
"gpu": { ... },
"ram": { ... },
"motherboard": { ... },
"storage": { ... },
"psu": { ... },
"case": { ... }
},
"estimatedPerformance": {
"gaming": 85,
"workstation": 70
}
}
// ... 2 more builds
]
}The recommendation engine uses optimized budget allocation strategies:
- GPU: 45%
- CPU: 20%
- RAM: 10%
- Motherboard: 10%
- Storage: 8%
- PSU: 5%
- Case: 2%
- CPU: 35%
- GPU: 20%
- RAM: 20%
- Motherboard: 10%
- Storage: 10%
- PSU: 3%
- Case: 2%
- CPU: 25%
- GPU: 20%
- RAM: 15%
- Motherboard: 15%
- Storage: 15%
- PSU: 5%
- Case: 5%
Run the test suite:
npm testTest Coverage:
- Part service data loading and caching
- Search query functionality
- Ranking algorithm correctness
- Pagination logic
- Build generation with budget constraints
- Currency conversion (USD β INR)
npm run buildThis creates:
dist/spa/- Frontend static filesdist/server/- Backend server bundle
npm startnpm run typechecknpm run format.fixThe dataset includes components from:
- 566 CPUs (Intel, AMD)
- 903 GPUs (NVIDIA, AMD)
- 3,034 RAM modules (DDR4, DDR5)
- 725 Motherboards (ATX, Micro-ATX, Mini-ITX)
- 2,126 Storage devices (SSD, HDD)
- 611 Power Supplies (80+ certified)
- 1,014 Cases (Various form factors)
All prices are automatically converted from USD to INR at an approximate rate of 1 USD = 85 INR.
This project was developed as part of a college assignment. Contributions are welcome!
MIT License - feel free to use this project for learning purposes.
Built with β€οΈ using React, TypeScript, and Express