A terminal-based Python and MySQL project that helps users build compatible custom PCs by selecting components such as CPU, GPU, Motherboard, RAM, Storage, and PSU.
The project allows users to:
- Create custom PC builds
- View compatible hardware
- Store user builds in a database
- Manage records using admin access
- Calculate approximate total build cost
Note: Component prices and hardware data are based on 2024 market data.
- User Login & Signup System
- Continue as Guest
- Create Custom PC Builds
- Compatibility-based component selection
- Automatic PSU recommendation
- Total Price Calculation
- View Other Users' PC Builds
- Insert Records
- Update Records
- Display Records
- Search Records
- Delete Records
- Python
- MySQL
- mysql-connector-python
- python-dotenv
- Tabulate
Custom-PC-Build-System/
│
├── .env.example
├── .gitignore
├── Components.sql
├── Output(s).pdf
├── README.md
├── main.py
├── setup_db.py
└── requirements.txt
git clone https://github.com/KunalSambyal/Custom-PC-Build.git
cd Custom-PC-Build# Create virtual environment
python -m venv .venv
# Activate virtual environment
# Windows (Command Prompt / PowerShell):
.venv\Scripts\activate
# macOS / Linux:
source .venv/bin/activatepip install -r requirements.txtCreate a .env file by copying .env.example:
cp .env.example .envOpen .env and set your MySQL credentials and admin password:
DB_HOST=localhost
DB_USER=root
DB_PASSWORD=your_database_password
DB_NAME=components
ADMIN_PASSWORD=your_admin_passwordRun the automated database setup script:
python setup_db.pyAlternative (Manual SQL Import):
Import the SQL database file directly via MySQL CLI:
mysql -u root -p < Components.sqlOr open Components.sql in MySQL Workbench and run the script.
This will automatically:
- Create the
componentsdatabase - Create all required tables
- Insert sample hardware data
python main.pyThe project includes:
- User Authentication System
- Database CRUD Operations
- Hardware Compatibility Logic
- Dynamic Component Selection
- Admin Management System
Project execution screenshots and outputs are included in:
Output(s).pdf
- GUI version using Tkinter or PyQt
- Secure password hashing
- SQL injection prevention using parameterized queries
- Better exception handling
- Online deployment
- Expanded hardware database
Kunal Sambyal