A full-stack fitness tracking application built with React, Node.js, Express, and MongoDB.
- User authentication (Register/Login)
- Add workout logs (Exercise, Sets, Reps, Weight)
- View workout history
- Progress chart (Total weight lifted)
- Frontend: React, Recharts
- Backend: Node.js, Express
- Database: MongoDB
- Node.js (v14+)
- MongoDB (local or cloud instance)
-
Clone the repository
git clone <your-repo-url> cd fitness-app
-
Backend Setup
cd server npm installCreate a
.envfile in theserverdirectory:MONGO_URI=<your_mongodb_connection_string> JWT_SECRET=<your_secret_key> PORT=5000Run the server:
npm run dev
-
Frontend Setup
cd ../client npm installRun the frontend:
npm start
- Create a new Web Service on Render.
- Connect your GitHub repository.
- Set the build command to
npm install. - Set the start command to
npm start. - Add environment variables:
MONGO_URI,JWT_SECRET.
- Create a new Project on Vercel.
- Import your GitHub repository (select the
clientdirectory). - Vercel will automatically detect the React project.
- Build command:
npm run build. - Output directory:
build. - Install command:
npm install.
Note: Update the API URL in the frontend code (in Dashboard.js, Login.js, etc.) to point to your deployed backend URL (e.g., https://your-backend.onrender.com).