A full-stack web application combining a React frontend and a FastAPI backend.
This project uses a modern architecture with separate frontend and backend:
- Core: React (v18), TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- UI Components: shadcn/ui (based on Radix UI)
- State Management & Data Fetching: TanStack Query (React Query)
- Routing: React Router
- Forms: React Hook Form + Zod
- Icons: Lucide React
- HTTP Client: Axios
- Framework: FastAPI
- Runtime: Python 3.11+
- Server: Uvicorn
- Database: SQLite (
game_records.db)
.
├── backend/ # Python FastAPI Backend
│ ├── main.py # Backend entry point
│ ├── game_records.db # SQLite database
│ └── requirements.txt # Python dependencies
├── public/ # Static assets (images, favicon, etc.)
├── scripts/ # Utility scripts
├── src/ # Frontend source code
│ ├── components/ # Reusable UI components
│ │ └── ui/ # shadcn/ui base components
│ ├── hooks/ # Custom React Hooks
│ ├── lib/ # Utility functions
│ ├── pages/ # Page components (Route handlers)
│ ├── services/ # API and WebSocket services
│ ├── types/ # TypeScript type definitions
│ ├── App.tsx # Main application component
│ └── main.tsx # Frontend entry point
├── components.json # shadcn/ui configuration
├── index.html # HTML entry point
├── package.json # Node.js project configuration and dependencies
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite configuration
- Node.js (v18+ recommended)
- Python (v3.11+ recommended)
cd backend
# Create a virtual environment (Optional but recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Start the server
uvicorn main:app --reloadThe backend will start at http://localhost:8000 by default.
Open a new terminal window:
# Return to the project root
npm install
# Start the development server
npm run devThe frontend will start at http://localhost:5173 by default.
npm run buildThe built files will be in the dist directory, ready to be deployed to any static hosting service (e.g., Vercel, Netlify).
The backend can be deployed to any platform that supports Python (e.g., Zeabur, Render, Railway). Please refer to ZEABUR_DEPLOY.md for more deployment details.