A modern web application with a React (Vite) frontend and FastAPI backend.
project-root/
├── client/ # React (Vite) frontend
│ ├── public/
│ ├── src/
│ ├── package.json
│ └── vite.config.js
├── server/ # FastAPI backend
│ ├── app/
│ │ ├── __init__.py
│ │ ├── main.py
│ │ ├── models/
│ │ ├── routes/
│ │ └── utils/
│ ├── requirements.txt
│ └── .env
└── README.md
git clone https://github.com/aneeshsunganahalli/ProjectSunga.git
cd your-project-name- Navigate to the server directory:
cd server- Create a virtual environment:
# Windows
python -m venv venv
venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate- Install the dependencies:
pip install -r requirements.txt- Create a
.envfile in the server directory (if not already present):
DATABASE_URL=your_database_url
SECRET_KEY=your_secret_key
ENVIRONMENT=development
- Start the FastAPI server:
# Development mode with auto-reload
uvicorn app.main:app --reload --port 8000
# Or if you have a specific entry point defined
python -m app.mainThe API will be available at http://localhost:8000.
API documentation is automatically available at:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
- Navigate to the client directory:
cd client- Install dependencies:
# Using npm
npm install
# Or using yarn
yarn- Create a
.envfile in the client directory (if needed):
VITE_API_URL=http://localhost:8000
- Start the development server:
# Using npm
npm run dev
# Or using yarn
yarn devThe React application will be available at http://localhost:5173 (or another port if 5173 is in use).