Bit Bazaar - Game Store API and Frontend
Bit Bazaar is a full-stack application for managing an online game store. It provides a backend API for managing games, users, orders, and payments, along with a frontend for user interaction. The project is designed to simulate an e-commerce platform with features like game inventory management, user authentication, cart functionality, and admin controls.
Project Overview
The GameStore API provides functionalities to simulate an e-commerce platform for video games. Key features include:
- Game inventory management (CRUD operations for games).
- User account management (to be implemented).
- Order processing (to be implemented).
- Payment simulation (to be implemented).
Technology Stack
- Backend: Python with FastAPI
- Frontend: HTML, CSS, JavaScript
- Database: Microsoft SQL Server
- ORM: SQLAlchemy
- Server: Uvicorn
Setup and Installation
Prerequisites
- Python 3.10+
- Microsoft SQL Server (ensure an instance is running, e.g., SQLEXPRESS)
- SQL Server Management Studio (SSMS) or a similar tool to manage the database.
- Git
Steps
Clone the Repository:
git clone <your-repository-url> cd Bit-BazaarCreate and Activate Virtual Environment:
# Windows python -m venv venv .\venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activateInstall Dependencies:
pip install -r requirements.txtDatabase Setup:
- Open SSMS and connect to your SQL Server instance.
- Create a new database named
GameStoreDB. - Ensure the tables (
Users,Games,Orders,OrderItems,CartItems,Payments) are created. You can use SQLAlchemy'sBase.metadata.create_all(bind=engine)inbackend/database.pyfor automatic table creation.
Configure Database Connection:
- Open the
backend/database.pyfile. - Update the
SERVER_NAMEvariable with your SQL Server instance name (e.g.,r"YourComputerName\SQLEXPRESS"orr"(localdb)\MSSQLLocalDB"). - Ensure the
DATABASE_NAMEisGameStoreDB. - Verify the ODBC driver version if necessary (default is
ODBC Driver 17 for SQL Server).
- Open the
Run the Backend:
uvicorn backend.main:app --reloadThe API will be available at
http://127.0.0.1:8000.Run the Frontend:
- Open the
frontend/index.htmlfile in a browser. - Ensure the backend is running to fetch and display games.
- Open the
API Documentation
Interactive API documentation is available at:
- Swagger UI:
http://127.0.0.1:8000/docs - ReDoc:
http://127.0.0.1:8000/redoc
Project Structure
Bit-Bazaar/
├── backend/
│ ├── __init__.py
│ ├── crud.py
│ ├── database.py
│ ├── main.py
│ ├── models.py
│ ├── schemas.py
│ ├── security.py
│ └── static/
│ ├── images/
│ └── js/
├── frontend/
│ ├── admin.html
│ ├── cart.html
│ ├── index.html
│ ├── login.html
│ ├── register.html
│ ├── css/
│ │ ├── auth.css
│ │ ├── cart.css
│ │ ├── style.css
│ ├── js/
│ │ ├── admin.js
│ │ ├── auth.js
│ │ ├── cart.js
│ │ ├── games.js
├── requirements.txt
├── README.md
Feel free to contribute to this project by submitting issues or pull requests.


Log in or sign up for Devpost to join the conversation.