This repository contains a full stack application with a FastAPI backend and a Vite + React + TypeScript frontend.
The application is designed to provide a seamless integration between a FastAPI backend and a React frontend. The backend uses SQLAlchemy for ORM and Supabase (PostgreSQL) as the database, while the frontend is built with Vite, React, and TypeScript.
- FastAPI - Modern, fast (high-performance) web framework for building APIs with Python 3.8+
- SQLAlchemy - SQL toolkit and ORM for Python
- Supabase - PostgreSQL database as a service
- Vite - Next-generation, fast build tool for React apps
- React - JavaScript library for building user interfaces
- TypeScript - JavaScript with type safety
- Axios - Promise-based HTTP client for making API requests
- Node.js and npm for the frontend
- Python 3.8+ and pip for the backend
- PostgreSQL (Supabase Cloud)
-
Clone the Repository
git clone https://github.com/yourusername/yourprojectname.git cd yourprojectname/Backend -
Set Up Environment Variables
Create a
.envfile and add yourDATABASE_URL:DATABASE_URL=postgresql://<username>:<password>@<host>:<port>/<database> -
Create a Virtual Environment
python -m venv venv
Activate the virtual environment:
-
For Windows:
venv\Scripts\activate
-
For macOS/Linux:
source venv/bin/activate
-
-
Install Dependencies
pip install -r requirements.txt
-
Initialize the Database
python init_db.py
-
Run the Backend Server
uvicorn app.main:app --reload
-
Navigate to the Frontend Directory
cd ../Frontend -
Install Dependencies
npm install
-
Set Up Environment Variables
Copy the
.env.examplefile to.envand configure the backend server URL. -
Run the Frontend Development Server
npm run dev
- Backend/: Contains the FastAPI backend code.
- Frontend/: Contains the Vite + React + TypeScript frontend code.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details