This guide covers deploying the Backend to Render and Frontend to Vercel.
This guide will help you deploy the TMMR Backend to Render.com, a free cloud hosting platform.
We have added a render.yaml file to your repository which automates the configuration.
- Sign Up/Login: Go to dashboard.render.com and log in.
- New Blueprint: Click New + button and select "Blueprint".
- Connect Repo: Select your
tmmr-b2brepository. - Accept: Render will detect
render.yamland show you thetmmr-backendservice. Click Apply. - Environment Variables:
- Go to the Dashboard → Click on the new
tmmr-backendservice. - Click Environment on the left menu.
- Add
GEMINI_API_KEYwith your actual API key. - Click Save Changes.
- Go to the Dashboard → Click on the new
- Done!: Your backend will deploy. You will get a URL like
https://tmmr-backend.onrender.com.
- New Web Service:
- Go to Render Dashboard.
- Click New + → Web Service.
- Connect Repo: Select
tmmr-b2b. - Configure:
- Name:
tmmr-backend - Root Directory:
backend(Important!) - Runtime:
Node - Build Command:
npm install - Start Command:
npm start
- Name:
- Environment Variables:
- Add
GEMINI_API_KEY:your_key_here
- Add
- Create Web Service: Click the button at the bottom.
Once deployed, you need to tell your local (or deployed) frontend where the backend lives.
- Copy your new Render URL (e.g.,
https://tmmr-backend-xyz.onrender.com). - Update your
frontend/.envfile:VITE_API_BASE_URL=https://tmmr-backend-xyz.onrender.com/api
- Restart your frontend.
Render's free tier spins down after inactivity. The first request might take 50+ seconds to wake it up. This is normal for free instances.
Now that your backend is running, deploy the React frontend.
- Sign Up/Login: Go to vercel.com and log in.
- Add New Project: Click "Add New..." -> "Project".
- Connect Repo: Import your
tmmr-b2brepository. - Configure Project:
- Framework Preset: Vercel should auto-detect "Vite".
- Root Directory: Click "Edit" and select
frontend. (CRITICAL STEP) - Environment Variables:
- Add
VITE_API_BASE_URLwith your Render Backend URL (e.g.,https://tmmr-backend-xyz.onrender.com/api).
- Add
- Deploy: Click Deploy.
Your full stack application is now live!
- Frontend:
https://tmmr-b2b.vercel.app(or similar) - Backend:
https://tmmr-backend.onrender.com