This is a fullstack web application with a FastAPI backend and a React frontend.
-
Navigate to the backend directory:
cd backend
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the FastAPI server:
uvicorn main:backend --reload
Make sure your
main.py
is the entry file and contains the FastAPI app instance asapp
. -
API should now be running at:
http://localhost:8000
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
npm install
-
Start the React development server:
npm run dev
-
The frontend should now be running at:
http://localhost:5173
-
An env.example file is present in backend
cd backend
-
Generate API Key from AI Studio by Google
-
Add API Key for Gemini from Google AI Sudio (Free)
- Assumption: Ports 3000 (React) and 8000 (FastAPI) are not in use.