{"id":19416704,"url":"https://github.com/coslynx/fitness-tracker-react-node-mvp","last_synced_at":"2026-04-10T12:31:44.405Z","repository":{"id":262045947,"uuid":"886071128","full_name":"coslynx/Fitness-Tracker-React-Node-MVP","owner":"coslynx","description":"Set fitness goals, track progress, share achievements, and connect with others online... Created at https://coslynx.com","archived":false,"fork":false,"pushed_at":"2024-11-10T05:51:16.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T03:30:49.030Z","etag":null,"topics":["authentication","code-generation","coslynx","developer-tools","devops","expressjs","fitness-tracker","goal-tracking","javascript","machine-learning","material-ui","mongodb","mongodb-database","mvp","node-js","nodejs","react","reactjs","user-interface","web-app"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/coslynx.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":"2024-11-10T05:32:53.000Z","updated_at":"2024-11-10T05:51:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"66e2dfe8-0d04-4965-b31f-044d06856d9a","html_url":"https://github.com/coslynx/Fitness-Tracker-React-Node-MVP","commit_stats":null,"previous_names":["coslynx/fitness-tracker-react-node-mvp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coslynx/Fitness-Tracker-React-Node-MVP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FFitness-Tracker-React-Node-MVP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FFitness-Tracker-React-Node-MVP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FFitness-Tracker-React-Node-MVP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FFitness-Tracker-React-Node-MVP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coslynx","download_url":"https://codeload.github.com/coslynx/Fitness-Tracker-React-Node-MVP/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2FFitness-Tracker-React-Node-MVP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263112202,"owners_count":23415567,"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":["authentication","code-generation","coslynx","developer-tools","devops","expressjs","fitness-tracker","goal-tracking","javascript","machine-learning","material-ui","mongodb","mongodb-database","mvp","node-js","nodejs","react","reactjs","user-interface","web-app"],"created_at":"2024-11-10T13:04:04.182Z","updated_at":"2026-04-10T12:31:44.101Z","avatar_url":"https://github.com/coslynx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv class=\"hero-icon\" align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/ec559a9f6bfd399b82bb44393651661b08aaf7ba/icons/folder-markdown-open.svg\" width=\"100\" /\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003e\nFitness Tracker Web App - MVP\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eA comprehensive fitness tracker web application built with React, Node.js, and MongoDB for goal setting, progress tracking, and a supportive community.\u003c/h4\u003e\n\u003ch4 align=\"center\"\u003eDeveloped with the software and tools below.\u003c/h4\u003e\n\u003cdiv class=\"badges\" align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Framework-React-blue\" alt=\"Framework - React - blue\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Frontend-Javascript,_Html,_Css-red\" alt=\"Frontend - Javascript, Html, Css - red\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Backend-Node.js-blue\" alt=\"Backend - Node.js - blue\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Database-MongoDB-green\" alt=\"Database - MongoDB - green\"\u003e\n\u003c/div\u003e\n\u003cdiv class=\"badges\" align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/coslynx/Fitness-Tracker-React-Node-MVP?style=flat-square\u0026color=5D6D7E\" alt=\"git-last-commit\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/commit-activity/m/coslynx/Fitness-Tracker-React-Node-MVP?style=flat-square\u0026color=5D6D7E\" alt=\"GitHub commit activity\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/languages/top/coslynx/Fitness-Tracker-React-Node-MVP?style=flat-square\u0026color=5D6D7E\" alt=\"GitHub top language\" /\u003e\n\u003c/div\u003e\n\n## 📑 Table of Contents\n- 📍 Overview\n- 📦 Features\n- 📂 Structure\n- 💻 Installation\n- 🏗️ Usage\n- 🌐 Hosting\n- 📄 License\n- 👏 Authors\n\n## 📍 Overview\nThis repository houses the Fitness Tracker web application - a powerful and user-friendly platform built with React, Node.js, and MongoDB. Designed to empower fitness enthusiasts of all levels, the Fitness Tracker provides a robust environment for setting personalized goals, tracking progress, and connecting with a supportive community.\n\n## 📦 Features\n\n|    | Feature            | Description                                                                                                        |\n|----|--------------------|--------------------------------------------------------------------------------------------------------------------|\n| 🔐 | **Secure Authentication**   | Users can create accounts and securely log in using email/password or social media integration (Google, Facebook), safeguarding personal data and enhancing user experience. |\n| 🎯 | **Personalized Goal Setting**       | Set individual fitness goals, including weight, exercise frequency, distance, or specific milestones, providing a clear roadmap for progress.          |\n| 📈 | **Comprehensive Progress Tracking**   | Log workouts, meals, and activities. The app calculates and displays progress toward goals in visually appealing charts and graphs for motivation and accountability. |\n| 🤝 | **Social Sharing and Community Building**     | Connect with friends, share progress, and achievements, fostering a sense of community, encouraging healthy competition, and providing support.     |\n| 🌐 | **Responsive Design**       | The application is fully responsive, adapting seamlessly to various devices (mobile, tablet, desktop) for a user-friendly experience across all screens.  |\n| ⚡️ | **Performance**    | Optimized for speed and responsiveness for a seamless user experience.                                                  |\n| 🔄 | **Scalability**    | Designed to handle a growing user base and increasing data volume.                                                     |\n| 🔒 | **Security**       | Robust security measures including data encryption and secure authentication to ensure user trust and confidence.             |\n\n## 📂 Structure\n```text\nfitness-tracker/\n├── apps/\n│   ├── web/\n│   │   ├── src/\n│   │   │   ├── components/\n│   │   │   ├── pages/\n│   │   │   ├── styles/\n│   │   │   └── utils/\n│   │   ├── next.config.js\n│   │   ├── package.json\n│   │   └── tsconfig.json\n│   └── admin/\n│       └── src/\n│           └── pages/\n│               ├── login/\n│               └── dashboard/\n├── packages/\n│   └── ui/\n│       └── src/\n│           └── components/\n│               └── Button/\n└── .eslintrc.js\n\n```\n\n## 💻 Installation\n\n### 🔧 Prerequisites\n- Node.js v16+\n- npm 6+\n- MongoDB 5+\n- Git 2.x+\n\n### 🚀 Setup Instructions\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/coslynx/Fitness-Tracker-React-Node-MVP.git\n   cd Fitness-Tracker-React-Node-MVP\n   ```\n2. Install dependencies:\n   ```bash\n   npm install\n   ```\n3. Set up MongoDB:\n   - [Install MongoDB](https://www.mongodb.com/docs/manual/installation/) if you haven't already.\n   - Start the MongoDB server.\n   - Create a database named \"fitness_tracker\".\n4. Configure environment variables:\n   - Create a `.env` file in the root directory:\n     ```bash\n     cp .env.example .env\n     ```\n   - Update the following variables in the `.env` file:\n     ```\n     # MongoDB Connection Details\n     MONGODB_URI=mongodb://localhost:27017/fitness_tracker \n\n     # JWT Secret Key\n     JWT_SECRET=averylongandrandomsecretkeythatisverydifficulttoguess \n\n     # Next.js API URL\n     NEXT_PUBLIC_API_URL=http://localhost:3000/api\n     ```\n\n## 🏗️ Usage\n\n### 🏃‍♂️ Running the MVP\n1. Start the development server:\n   ```bash\n   npm run dev\n   ```\n2. Access the application:\n   - Web interface: [http://localhost:3000](http://localhost:3000)\n   - API endpoint: [http://localhost:3000/api](http://localhost:3000/api)\n\n### ⚙️ Configuration\n- The `.env` file is used to configure environment-specific settings.\n- See the comments in `.env` for details on each variable and how to modify them.\n\n### 📚 Examples\n\n- 📝 **User Registration**: \n  ```bash\n  curl -X POST http://localhost:3000/api/auth/register               -H \"Content-Type: application/json\"               -d '{\"username\": \"newuser\", \"email\": \"user@example.com\", \"password\": \"securepass123\"}'\n  ```\n\n- 📝 **Setting a Fitness Goal**: \n  ```bash\n  curl -X POST http://localhost:3000/api/goals               -H \"Content-Type: application/json\"               -H \"Authorization: Bearer YOUR_JWT_TOKEN\"               -d '{\"type\": \"weight_loss\", \"target\": 10, \"deadline\": \"2023-12-31\"}'\n  ```\n\n- 📝 **Logging Progress**: \n  ```bash\n  curl -X POST http://localhost:3000/api/progress               -H \"Content-Type: application/json\"               -H \"Authorization: Bearer YOUR_JWT_TOKEN\"               -d '{\"goalId\": \"goal_id_here\", \"value\": 2, \"date\": \"2023-06-15\"}'\n  ```\n\n## 🌐 Hosting\n\n### 🚀 Deployment Instructions\n\n#### Deploying to Vercel\n1. Create a Vercel account (if you don't have one): [https://vercel.com/](https://vercel.com/)\n2. Install the Vercel CLI:\n   ```bash\n   npm install -g vercel\n   ```\n3. Login to Vercel:\n   ```bash\n   vercel login\n   ```\n4. Initialize Vercel project:\n   ```bash\n   vercel init\n   ```\n5. Choose a project name (e.g., \"fitness-tracker-mvp\").\n6. Deploy the application:\n   ```bash\n   vercel deploy\n   ```\n7. Configure environment variables in the Vercel dashboard (https://vercel.com/dashboard).\n8. The deployment will be accessible at a unique URL provided by Vercel.\n\n### 🔑 Environment Variables\n\n- **`MONGODB_URI`**: Connection string for your MongoDB database (found in your MongoDB cluster settings).\n- **`JWT_SECRET`**: A long, randomly generated secret key for JWT token generation.\n- **`NEXT_PUBLIC_API_URL`**: URL of your deployed API server. \n\n## 📜 API Documentation\n\n### 🔍 Endpoints\n\n- **POST /api/auth/register**\n  - Description: Register a new user.\n  - Body: `{ \"username\": string, \"email\": string, \"password\": string }`\n  - Response: `{ \"id\": string, \"username\": string, \"email\": string, \"token\": string }`\n\n- **POST /api/auth/login**\n  - Description: Login an existing user.\n  - Body: `{ \"email\": string, \"password\": string }`\n  - Response: `{ \"token\": string, \"user\": { \"id\": string, \"username\": string, \"email\": string } }`\n\n- **GET /api/users/me**\n  - Description: Get authenticated user data.\n  - Headers: `Authorization: Bearer YOUR_JWT_TOKEN`\n  - Response: `{ \"id\": string, \"username\": string, \"email\": string }`\n\n- **POST /api/goals**\n  - Description: Create a new fitness goal.\n  - Headers: `Authorization: Bearer YOUR_JWT_TOKEN`\n  - Body: `{ \"type\": string, \"target\": number, \"deadline\": date }`\n  - Response: `{ \"id\": string, \"type\": string, \"target\": number, \"deadline\": date, \"progress\": number }`\n\n- **GET /api/goals**\n  - Description: Get all goals for the authenticated user.\n  - Headers: `Authorization: Bearer YOUR_JWT_TOKEN`\n  - Response: `[ { \"id\": string, \"type\": string, \"target\": number, \"deadline\": date, \"progress\": number } ]`\n\n- **PUT /api/goals/:goalId**\n  - Description: Update an existing fitness goal.\n  - Headers: `Authorization: Bearer YOUR_JWT_TOKEN`\n  - Body: `{ \"type\": string, \"target\": number, \"deadline\": date }`\n  - Response: `{ \"id\": string, \"type\": string, \"target\": number, \"deadline\": date, \"progress\": number }`\n\n- **DELETE /api/goals/:goalId**\n  - Description: Delete a fitness goal.\n  - Headers: `Authorization: Bearer YOUR_JWT_TOKEN`\n  - Response: `{ \"message\": \"Goal deleted successfully\" }`\n\n- **POST /api/activities**\n  - Description: Log a new activity.\n  - Headers: `Authorization: Bearer YOUR_JWT_TOKEN`\n  - Body: `{ \"type\": string, \"date\": date, \"duration\": number, \"caloriesBurned\": number, \"distance\": number }`\n  - Response: `{ \"id\": string, \"type\": string, \"date\": date, \"duration\": number, \"caloriesBurned\": number, \"distance\": number }`\n\n### 🔒 Authentication\n\n1. **Register a new user or login** to receive a JWT token.\n2. **Include the token in the `Authorization` header for all protected routes:**\n   ```\n   Authorization: Bearer YOUR_JWT_TOKEN\n   ```\n3. **Token expiration and refresh process:** The JWT token has a limited lifetime. When it expires, the client should request a new token using a refresh token.\n\n### 📝 Examples\n\n```bash\n# Register a new user\ncurl -X POST http://localhost:3000/api/auth/register \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"username\": \"fitnessuser\", \"email\": \"user@example.com\", \"password\": \"securepass123\"}'\n\n# Response\n{\n  \"id\": \"user123\",\n  \"username\": \"fitnessuser\",\n  \"email\": \"user@example.com\",\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\"\n}\n\n# Login an existing user\ncurl -X POST http://localhost:3000/api/auth/login \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"email\": \"user@example.com\", \"password\": \"securepass123\"}'\n\n# Response\n{\n  \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...\",\n  \"user\": {\n    \"id\": \"user123\",\n    \"username\": \"fitnessuser\",\n    \"email\": \"user@example.com\"\n  }\n}\n\n# Get authenticated user data\ncurl -X GET http://localhost:3000/api/users/me \\\n     -H \"Authorization: Bearer YOUR_JWT_TOKEN\"\n\n# Response\n{\n  \"id\": \"user123\",\n  \"username\": \"fitnessuser\",\n  \"email\": \"user@example.com\"\n}\n\n# Create a new goal\ncurl -X POST http://localhost:3000/api/goals \\\n     -H \"Content-Type: application/json\" \\\n     -H \"Authorization: Bearer YOUR_JWT_TOKEN\" \\\n     -d '{\"type\": \"weight_loss\", \"target\": 10, \"deadline\": \"2023-12-31\"}'\n\n# Response\n{\n  \"id\": \"goal123\",\n  \"type\": \"weight_loss\",\n  \"target\": 10,\n  \"deadline\": \"2023-12-31\",\n  \"progress\": 0\n}\n```\n\n\n## 📜 License \u0026 Attribution\n\n### 📄 License\nThis Minimum Viable Product (MVP) is licensed under the [GNU AGPLv3](https://choosealicense.com/licenses/agpl-3.0/) license.\n\n### 🤖 AI-Generated MVP\nThis MVP was entirely generated using artificial intelligence through [CosLynx.com](https://coslynx.com).\n\nNo human was directly involved in the coding process of the repository: Fitness-Tracker-React-Node-MVP\n\n### 📞 Contact\nFor any questions or concerns regarding this AI-generated MVP, please contact CosLynx at:\n- Website: [CosLynx.com](https://coslynx.com)\n- Twitter: [@CosLynxAI](https://x.com/CosLynxAI)\n\n\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e🌐 CosLynx.com\u003c/h1\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cem\u003eCreate Your Custom MVP in Minutes With CosLynxAI!\u003c/em\u003e\n\u003c/p\u003e\n\u003cdiv class=\"badges\" align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Developers-Drix10,_Kais_Radwan-red\" alt=\"\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Website-CosLynx.com-blue\" alt=\"\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Backed_by-Google,_Microsoft_\u0026_Amazon_for_Startups-red\" alt=\"\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Finalist-Backdrop_Build_v4,_v6-black\" alt=\"\"\u003e\n\u003c/div\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoslynx%2Ffitness-tracker-react-node-mvp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoslynx%2Ffitness-tracker-react-node-mvp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoslynx%2Ffitness-tracker-react-node-mvp/lists"}