{"id":22473324,"url":"https://github.com/arsy786/workout-mern-app","last_synced_at":"2026-04-09T12:03:08.876Z","repository":{"id":147956183,"uuid":"619159133","full_name":"arsy786/workout-mern-app","owner":"arsy786","description":"This is a full-stack MERN app for managing workouts.","archived":false,"fork":false,"pushed_at":"2024-09-22T09:44:50.000Z","size":47401,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T20:12:37.344Z","etag":null,"topics":["2023","expressjs","mern-stack","mongodb","nodejs","reactjs","tutorial"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arsy786.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-26T12:55:35.000Z","updated_at":"2024-09-22T09:44:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"80728e0c-c5b4-44e3-9bf5-5c14dd35426d","html_url":"https://github.com/arsy786/workout-mern-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsy786%2Fworkout-mern-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsy786%2Fworkout-mern-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsy786%2Fworkout-mern-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsy786%2Fworkout-mern-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arsy786","download_url":"https://codeload.github.com/arsy786/workout-mern-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245881183,"owners_count":20687686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2023","expressjs","mern-stack","mongodb","nodejs","reactjs","tutorial"],"created_at":"2024-12-06T12:22:28.923Z","updated_at":"2025-12-30T20:32:43.460Z","avatar_url":"https://github.com/arsy786.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Workout MERN App\n\nThis is a simple Workout app designed for managing workouts with ease. The app is built using the MERN (MongoDB, Express, React, Node.js) stack and supports essential CRUD (Create, Read, Update, Delete) operations. It utilizes MongoDB for database management, Express and Node.js for server-side functionality, and React for a dynamic front-end user experience.\n\nThis project was built following the below tutorials:\n\n- [MERN Stack Crash Course Tutorial (YouTube/TheNetNinja)](https://www.youtube.com/playlist?list=PL4cUxeGkcC9iJ_KkrkBZWZRHVwnzLIoUE)\n- [MERN Auth Tutorial (YouTube/TheNetNinja)](https://www.youtube.com/playlist?list=PL4cUxeGkcC9g8OhpOZxNdhXggFz2lOuCT)\n\n## Branches\n\n    - master: components, react-context, auth\n    - react-context: components, react-context\n    - no-state-management: components\n\n## Getting Started\n\nThis project is divided into two main parts: the backend and the frontend. Follow these steps to set up and run both parts of the application.\n\n### Prerequisites\n\n- Node.js\n- MongoDB\n\n### Cloning the Repo\n\n1. Open your terminal or command prompt.\n\n2. Clone the repository using Git:\n\n   ```bash\n   git clone https://github.com/arsy786/workout-mern-app.git\n   ```\n\n3. Navigate to the cloned repository's root directory\n\n   ```bash\n   cd workout-mern-app\n   ```\n\n### Setting up the Backend\n\n1. From the root directory, navigate to the backend directory:\n\n   ```bash\n   cd backend\n   ```\n\n2. Install the required Node.js modules:\n\n   ```bash\n   npm install\n   ```\n\n3. Create a `.env` file in the backend directory and add the following:\n\n   ```env\n   PORT=4000\n   MONGO_URI=\u003cYour MongoDB connection string\u003e\n   SECRET=\u003cYour JWT secret key\u003e\n   ```\n\n   For example:\n\n   ```env\n   PORT=4000\n   MONGO_URI=mongodb://localhost:27017/workout-mern-app\n   SECRET=secret\n   ```\n\n5. Start the backend:\n\n   ```bash\n   npm run dev\n   ```\n\n   The backend should now be running on `http://localhost:4000`.\n\n### Setting up the Client\n\n1. Open a new terminal or command prompt window.\n\n2. From the root directory, navigate to the frontend directory:\n\n   ```bash\n   cd frontend\n   ```\n\n3. Install the required Node.js modules:\n\n   ```bash\n   npm install\n   ```\n\n4. In the `package.json` file in the frontend directory, add the following:\n\n   ```json\n     \"proxy\": \"http://localhost:4000\",\n   ```\n\n   This proxy setting forwards API requests to the backend server running on port 4000. For example, when the React app makes an API request like fetch('/api/data'), it will actually be routed to http://localhost:4000/api/data due to the proxy configuration.\n\n5. Start the frontend:\n\n   ```bash\n   npm run start\n   ```\n\n   The frontend should now be running on `http://localhost:3000`.\n\n### Accessing the Application\n\nAfter starting both the backend and frontend servers, you can access the web application by navigating to `http://localhost:3000` in your web browser. Ensure both servers are running concurrently to allow the frontend to communicate with the backend effectively.\n\n## Backend\n\nThe backend provides a REST API for managing workouts \u0026 users. Here are the available endpoints:\n\n    - GET /api/workouts - Get all workouts\n    - GET /api/workouts/:id - Get a workout by ID\n    - POST /api/workouts - Create a new workout\n    - PATCH /api/workouts/:id - Update a workout by ID\n    - DELETE /api/workouts/:id - Delete a workout by ID\n\n    - POST /api/user/signup - Register a new user\n    - POST /api/user/login - Login a user\n\nThe API requires user authentication with JSON Web Tokens (JWT). To authenticate a user, send a `POST` request to `/api/user/login` with a JSON body containing the `email` and `password` fields. The server will respond with a JWT, which should be included in subsequent requests to protected endpoints.\n\n## Frontend\n\nThe app provides the following features:\n\n    - View a list of workouts\n    - Create a new workout\n    - Update a workout\n    - Delete a workout\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsy786%2Fworkout-mern-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farsy786%2Fworkout-mern-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsy786%2Fworkout-mern-app/lists"}