A full-stack workout tracking application built with the MERN stack (MongoDB, Express, React, Node.js).
- User authentication (signup/login)
- Create, view, and manage workout entries
- JWT-based authentication
- Responsive React frontend
- RESTful API backend
Before running this application, ensure you have the following installed:
- Node.js (v14 or higher)
- npm or yarn
- MongoDB (local or cloud instance)
- Clone the repository:
git clone <repository-url>
cd wt- Install backend dependencies:
npm install- Install frontend dependencies:
cd frontend
npm install
cd ..- Set up environment variables:
cp .env.example .envEdit the .env file with your configuration:
PORT: Server port (default: 4000)MONGODB_URI: Your MongoDB connection stringJWT_SECRET: Secret key for JWT token generation
- Start the backend server:
npm run dev- In a new terminal, start the frontend:
cd frontend
npm startThe backend server will run on http://localhost:4000 (or your configured PORT)
The frontend will run on http://localhost:3000
- Build the TypeScript backend:
npm run build- Build the React frontend:
cd frontend
npm run buildPOST /user/signup- Create a new user accountPOST /user/login- Login with existing credentials
GET /workouts- Get all workouts (requires authentication)POST /workouts- Create a new workout (requires authentication)GET /workouts/:id- Get a specific workoutPATCH /workouts/:id- Update a workoutDELETE /workouts/:id- Delete a workout
- Node.js & Express.js
- MongoDB with Mongoose
- JWT for authentication
- bcrypt for password hashing
- TypeScript support
- React 18
- React Router for navigation
- Context API for state management
- date-fns for date formatting
- Proxy configuration for API calls