Skip to content

Latest commit

 

History

History
78 lines (59 loc) · 1.74 KB

File metadata and controls

78 lines (59 loc) · 1.74 KB

Exercise Tracker (MERN Stack)

A full-stack exercise tracking application built with the MERN stack (MongoDB, Express, React, Node) and Vite.
Users can create, view, edit, and delete exercises, with persistence handled by MongoDB.


Features

  • Full CRUD operations (Create, Read, Update, Delete)
  • React + Vite frontend with modular components and routing
  • Express.js REST API with input validation
  • MongoDB + Mongoose persistence
  • Proxy setup for smooth frontend–backend integration
  • Development tooling: ESLint, Nodemon

Project Structure

client/   → React + Vite frontend
server/   → Express.js + MongoDB backend

Installation & Setup

1. Clone the repository

git clone https://github.com/demmerss34/MERN-Exercise-Tracker.git
cd MERN-Exercise-Tracker

2. Setup the backend

cd server
npm install
cp .env.example .env   # Add your MongoDB connection string + port
npm start

3. Setup the frontend

cd ../client
npm install
npm run dev

Frontend runs on http://localhost:5173 (default Vite),
Backend runs on http://localhost:3000.


Environment Variables

Create a .env file in the server/ folder:

PORT=3000
MONGODB_CONNECT_STRING=mongodb+srv://<username>:<password>@cluster.mongodb.net/db

API Endpoints

  • POST /exercises → Create exercise
  • GET /exercises → Get all exercises
  • GET /exercises/:id → Get exercise by ID
  • PUT /exercises/:id → Update exercise
  • DELETE /exercises/:id → Delete exercise

Tech Stack

  • Frontend: React 18, Vite, React Router DOM, React Icons
  • Backend: Node.js, Express.js, Mongoose, dotenv
  • Database: MongoDB Atlas
  • Dev Tools: Nodemon, ESLint