A full-stack development boilerplate for GUVI Hackathon participants, featuring a React frontend and Python backend.
- React 18+ with Vite
- Tailwind CSS for styling
- Netlify for deployment
- Python 3.x
- FastAPI
- Railway for deployment
- Git
- Make (GNU Make)
- Windows: Install via Chocolatey or Scoop
- macOS: Install via
xcode-select --installorbrew install make - Linux: Install via package manager (e.g.,
sudo apt-get install make)
- Node.js (v22.13.1)
- Windows: Download from Node.js website
- macOS: Install via
brew install node@22or use nvm - Linux: Install via package manager or use nvm
- npm or yarn package manager
- Python 3.x
- Windows: Download from Python website
- macOS: Install via
brew install python@3.11or download from Python website - Linux: Install via package manager (e.g.,
sudo apt-get install python3.11)
- pip (Python package manager)
- Virtual environment (recommended)
This is a boilerplate template. Do not push directly to this repository. Instead:
- Fork this repository to your GitHub account
- Clone your forked repository
- Create a new repository for your project
- Push your code to your new repository
Both frontend and backend use environment variables for configuration. Create the following .env files:
Create backend/.env:
APP_NAME=Hackathon FastAPI Backend
API_VERSION=v1Create frontend/.env:
VITE_API_URL=http://localhost:3001Note: .env files are not tracked in Git for security reasons. Make sure to:
- Never commit
.envfiles to version control - Keep a
.env.examplefile in your repository as a template - Document all required environment variables in your README
git 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-localThis command will:
- Check Node.js version
- Install dependencies
- Start the development server
- Open the browser automatically
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 devThe frontend will be available at http://localhost:3000
- Navigate to the backend directory:
cd backend- Using Make (Recommended):
make run-localThis command will:
- Check Python installation
- Set up virtual environment
- Install dependencies
- Start the FastAPI server
- Open the API documentation in browser
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 3001The backend will be available at http://localhost:3001
API documentation will be available at http://localhost:3001/docs
Using Make (Recommended):
cd frontend
make deployThis command will:
- Check Node.js version
- Install dependencies
- Build the project
- Guide you through Netlify deployment
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=distUsing Make (Recommended):
cd backend
make deployThis command will:
- Check Railway CLI installation
- Verify authentication
- Guide you through Railway deployment
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 upCRITICAL STEP: After deploying your backend to Railway, you MUST create a
.env.productionfile in your frontend directory with the production backend URL before building and deploying the frontend.
- Deploy your backend to Railway first
- Get your backend URL from Railway (it will look like
https://your-app-name.railway.app) - Create
frontend/.env.production:
VITE_API_URL=https://your-app-name.railway.app- Only then proceed with frontend deployment
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 Netlify
make run-local- Start development servermake deploy- Deploy to Railway
- Fork this repository to your GitHub account
- Create a new repository for your project
- Clone your forked repository
- Make your changes
- Push to your new repository
This project is licensed under the MIT License - see the LICENSE file for details.