A full-stack development boilerplate for GUVI Hackathon participants, featuring a React frontend and Python backend.
xcode-select --install
or brew install make
sudo apt-get install make
)brew install node@22
or use nvmbrew install [email protected]
or download from Python websitesudo apt-get install python3.11
)This is a boilerplate template. Do not push directly to this repository. Instead:
Both frontend and backend use environment variables for configuration. Create the following .env
files:
Create backend/.env
:
APP_NAME=Hackathon FastAPI Backend
API_VERSION=v1
Create frontend/.env
:
VITE_API_URL=http://localhost:3001
Note: .env
files are not tracked in Git for security reasons. Make sure to:
.env
files to version control.env.example
file in your repository as a templategit clone https://github.com/guvi-research/react-python-fsd-v1.git
cd react-python-fsd-v1
Navigate to the frontend directory:
cd frontend
Using Make (Recommended):
make run-local
This command will:
If you encounter issues with make run-local
, you can run the commands manually:
# 1. Install dependencies
npm install
# 2. Start the development server
npm run dev
The frontend will be available at http://localhost:3000
Navigate to the backend directory:
cd backend
Using Make (Recommended):
make run-local
This command will:
If you encounter issues with make run-local
, you can run the commands manually:
# 1. Create virtual environment
# Windows
python -m venv venv
.\venv\Scripts\activate
# macOS/Linux
python3 -m venv venv
source venv/bin/activate
# 2. Install dependencies
pip install -r requirements.txt
# 3. Start the server
uvicorn app.main:app --reload --port 3001
The backend will be available at http://localhost:3001
API documentation will be available at http://localhost:3001/docs
Using Make (Recommended):
cd frontend
make deploy
This command will:
If you encounter issues with make deploy
, you can deploy manually:
# 1. Build the project
npm run build
# 2. Deploy to Netlify
npx netlify deploy --prod --dir=dist
Using Make (Recommended):
cd backend
make deploy
This command will:
If you encounter issues with make deploy
, you can deploy manually:
# 1. Install Railway CLI
npm install @railway/cli
# 2. Login to Railway
railway login
# 3. Initialize project
railway init
# 4. Deploy
railway up
CRITICAL STEP: After deploying your backend to Railway, you MUST create a
.env.production
file in your frontend directory with the production backend URL before building and deploying the frontend.
https://your-app-name.railway.app
)frontend/.env.production
:VITE_API_URL=https://your-app-name.railway.app
If you skip this step, your frontend will not be able to connect to your backend in production!
react-python-fsd-v1/
āāā frontend/
ā āāā src/
ā ā āāā components/
ā ā āāā pages/
ā ā āāā services/
ā āāā public/
ā āāā .env
ā āāā Makefile
ā āāā package.json
āāā backend/
āāā app/
ā āāā routes/
ā āāā models/
ā āāā main.py
āāā .env
āāā Makefile
āāā requirements.txt
make run-local
- Start development servermake deploy
- Deploy to Netlifymake run-local
- Start development servermake deploy
- Deploy to RailwayThis project is licensed under the MIT License - see the LICENSE file for details.