A full-stack web application for managing and browsing a game store. The application consists of a FastAPI backend providing RESTful APIs for products, categories, and platforms, and a React frontend offering both user and admin interfaces.
- Product Management: Browse, view details, create, update, and delete game products.
- Category Management: Organize products into categories (e.g., Action, RPG).
- Platform Management: Associate products with gaming platforms (e.g., PC, PlayStation, Xbox).
- Admin Panel: Dedicated interface for administrators to manage products, categories, and platforms.
- User Interface: Clean, responsive UI for browsing products with detailed views.
- Database: SQLite database with SQLModel ORM for data persistence.
- API Documentation: Automatic API docs via FastAPI (available at
/docs).
- FastAPI: Modern, fast web framework for building APIs.
- SQLModel: SQL database ORM and data validation.
- SQLite: Lightweight database for development.
- Uvicorn: ASGI server for running the application.
- React: JavaScript library for building user interfaces.
- Vite: Fast build tool and development server.
- TailwindCSS: Utility-first CSS framework for styling.
- Axios: HTTP client for API requests.
- React Router: Declarative routing for React.
- Python 3.8 or higher
- Node.js 16 or higher
- pnpm (Package manager for Node.js)
-
Clone the repository:
git clone <repository-url> cd GGStoreV2
-
Set up the backend:
cd backend python -m venv venv source venv/Scripts/activate # On Windows # source venv/bin/activate # On macOS/Linux pip install -r requirements.txt
-
Set up the frontend:
cd ../frontend pnpm install
-
Start the backend:
cd backend source venv/Scripts/activate # On Windows uvicorn main:app --reload --host 127.0.0.1 --port 8000
The API will be available at
http://localhost:8000. API documentation athttp://localhost:8000/docs. -
Start the frontend (in a new terminal):
cd frontend pnpm run devThe frontend will be available at
http://localhost:5173.
GET /products- Retrieve all productsGET /products/{id}- Retrieve a specific productPOST /products- Create a new productPUT /products/{id}- Update a productDELETE /products/{id}- Delete a product
GET /categories- Retrieve all categoriesGET /categories/{id}- Retrieve a specific categoryPOST /categories- Create a new categoryPUT /categories/{id}- Update a categoryDELETE /categories/{id}- Delete a category
GET /platforms- Retrieve all platformsGET /platforms/{id}- Retrieve a specific platformPOST /platforms- Create a new platformPUT /platforms/{id}- Update a platformDELETE /platforms/{id}- Delete a platform
GGStoreV2/
├── backend/
│ ├── db.py # Database configuration
│ ├── main.py # FastAPI application entry point
│ ├── requirements.txt # Python dependencies
│ ├── models/
│ │ └── model_product.py # SQLModel database models
│ ├── repos/
│ │ ├── repo_product.py # Product repository
│ │ ├── repo_category.py # Category repository
│ │ └── repo_platform.py # Platform repository
│ ├── routers/
│ │ ├── routes_product.py # Product API routes
│ │ ├── routes_category.py# Category API routes
│ │ └── routes_platform.py# Platform API routes
│ └── schemas/
│ └── schema_product.py # Pydantic schemas
├── frontend/
│ ├── package.json # Node.js dependencies and scripts
│ ├── vite.config.js # Vite configuration
│ ├── index.html # HTML entry point
│ ├── src/
│ │ ├── main.jsx # React entry point
│ │ ├── index.css # Global styles
│ │ ├── components/
│ │ │ ├── atoms/ # Basic UI components
│ │ │ ├── molecules/ # Composite components
│ │ │ └── organisms/ # Complex components
│ │ ├── pages/ # Page components
│ │ ├── router/ # Routing configuration
│ │ └── services/ # API service functions
│ └── public/ # Static assets
├── info.md # Quick start guide
└── README.md # This file
- Backend: Uses SQLModel for ORM, with relationships between products, categories, and platforms.
- Frontend: Component-based architecture following atomic design principles.
- Styling: TailwindCSS for responsive design.
- Routing: Client-side routing with React Router.