{"id":27075858,"url":"https://github.com/coslynx/fitwise-workout-tracker","last_synced_at":"2026-04-13T04:05:51.956Z","repository":{"id":286286729,"uuid":"960963054","full_name":"coslynx/fitwise-workout-tracker","owner":"coslynx","description":"Track workouts online get personalized fitness plans... Created at https://coslynx.com","archived":false,"fork":false,"pushed_at":"2025-04-05T13:28:53.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T14:19:45.513Z","etag":null,"topics":["code-generation","coslynx","developer-tools","devops","expressjs","fitness-tracker","full-stack","health-fitness","javascript","machine-learning","mongodb","mvp","nodejs","personalized-workouts","progress-tracking","react","rest-api","web-application","workout-planner"],"latest_commit_sha":null,"homepage":null,"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/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":"2025-04-05T13:04:00.000Z","updated_at":"2025-04-05T13:28:56.000Z","dependencies_parsed_at":"2025-04-05T14:29:50.268Z","dependency_job_id":null,"html_url":"https://github.com/coslynx/fitwise-workout-tracker","commit_stats":null,"previous_names":["coslynx/fitwise-workout-tracker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Ffitwise-workout-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Ffitwise-workout-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Ffitwise-workout-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coslynx%2Ffitwise-workout-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coslynx","download_url":"https://codeload.github.com/coslynx/fitwise-workout-tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247416292,"owners_count":20935441,"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":["code-generation","coslynx","developer-tools","devops","expressjs","fitness-tracker","full-stack","health-fitness","javascript","machine-learning","mongodb","mvp","nodejs","personalized-workouts","progress-tracking","react","rest-api","web-application","workout-planner"],"created_at":"2025-04-06T00:18:11.623Z","updated_at":"2026-04-13T04:05:51.897Z","avatar_url":"https://github.com/coslynx.png","language":"JavaScript","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\n        fitness-tracker-web-mvp\n        \u003c/h1\u003e\n        \u003ch4 align=\"center\"\u003eAn MVP web application providing personalized workout plans and online progress tracking.\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%2018.2-blue\" alt=\"Framework: React 18.2\"\u003e\n          \u003cimg src=\"https://img.shields.io/badge/Frontend-Vite%20~5.0,_Tailwind%20~3.4-red\" alt=\"Frontend: Vite ~5.0, Tailwind ~3.4\"\u003e\n          \u003cimg src=\"https://img.shields.io/badge/Backend_(BaaS)-Supabase%20~2.39-blue\" alt=\"Backend (BaaS): Supabase ~2.39\"\u003e\n          \u003cimg src=\"https://img.shields.io/badge/Database-PostgreSQL%20(via%20Supabase)-black\" alt=\"Database: PostgreSQL (via Supabase)\"\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-web-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-web-mvp?style=flat-square\u0026color=5D6D7E\" alt=\"GitHub commit activity\" /\u003e\n          \u003cimg src=\"https://img.shields.io/github/languages/top/coslynx/fitness-tracker-web-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\n        This repository contains the Minimum Viable Product (MVP) for a **Fitness Tracker Website**. It's designed to provide users with personalized workout plans (based on templates for the MVP) and allow them to track their workout progress online. The application is built using a modern frontend stack: **React** (v18.2) for the UI, **Vite** (~5.0) for fast development and builds, and **Tailwind CSS** (~3.4) for utility-first styling. The backend functionality, including user authentication and database storage (PostgreSQL), is handled by **Supabase** (~2.39), a Backend-as-a-Service platform. **React Router DOM** (~6.21) manages client-side navigation, and **date-fns** (~3.0) assists with date formatting.\n\n        ## 📦 Features\n        |    | Feature                  | Description                                                                                                                                   |\n        |----|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n        | 🔐 | **Authentication**       | Secure user sign-up and login using email/password via Supabase Auth. Session management and protected routes ensure user data privacy.      |\n        | 📅 | **Workout Plan Display** | Fetches and displays a pre-assigned workout plan (MVP uses templates based on user ID/profile) on the user's dashboard after login.             |\n        | 💪 | **Progress Logging**     | Allows users to log details of their completed workout exercises, including sets, reps, and optionally weight used, associated with a specific date. |\n        | 📊 | **Progress History**     | Displays a chronological history of the user's logged workout sessions, allowing them to review past performance.                               |\n        | 📱 | **Responsive Design**    | The UI is styled with Tailwind CSS for responsiveness across various screen sizes (desktop, tablet, mobile).                                     |\n        | ✨ | **Modern Tooling**       | Built with Vite for a fast development experience (HMR) and optimized production builds. Uses React Context for global state management (Auth). |\n        | ☁️ | **Backend-as-a-Service** | Leverages Supabase for database, authentication, and API needs, minimizing backend development effort for the MVP scope.                      |\n        | 🧩 | **Modularity**           | Code is organized into components, pages, services, context, and hooks for better maintainability and potential future expansion.                |\n\n        ## 📂 Structure\n        ```text\n        .\n        ├── public/\n        │   └── index.html       # Main HTML entry point\n        │   └── vite.svg         # Default Vite icon (placeholder)\n        ├── src/\n        │   ├── components/      # Reusable UI components\n        │   │   ├── Button.jsx\n        │   │   ├── Footer.jsx\n        │   │   ├── Header.jsx\n        │   │   └── InputField.jsx\n        │   ├── context/         # React Context providers\n        │   │   └── AuthContext.jsx\n        │   ├── hooks/           # Custom React Hooks\n        │   │   └── useRequireAuth.js # (Note: Renamed from file structure for clarity)\n        │   ├── pages/           # Page-level components\n        │   │   ├── AuthPage.jsx\n        │   │   ├── DashboardPage.jsx\n        │   │   └── ProgressPage.jsx\n        │   ├── routes/          # Routing configuration\n        │   │   └── AppRouter.jsx\n        │   ├── services/        # API/Backend interaction logic\n        │   │   ├── authService.js\n        │   │   ├── supabaseClient.js\n        │   │   └── workoutService.js\n        │   ├── styles/          # Global CSS styles\n        │   │   └── index.css\n        │   ├── App.jsx          # Root application component (layout)\n        │   └── main.jsx         # Application entry point (renders App)\n        ├── .env                 # Environment variables (Supabase keys) - **DO NOT COMMIT**\n        ├── .env.example         # Example environment file\n        ├── .eslintrc.cjs        # ESLint configuration\n        ├── .gitignore           # Git ignore rules\n        ├── index.html           # (Moved to public/index.html by Vite convention)\n        ├── package.json         # Project metadata and dependencies\n        ├── postcss.config.js    # PostCSS configuration (for Tailwind/Autoprefixer)\n        ├── README.md            # This file\n        ├── tailwind.config.js   # Tailwind CSS configuration\n        └── vite.config.js       # Vite configuration\n        ```\n\n        ## 💻 Installation\n          \u003e [!WARNING]\n          \u003e ### 🔧 Prerequisites\n          \u003e - **Node.js**: Version 18.x or later recommended. (Check with `node -v`)\n          \u003e - **npm**: Version 9.x or later recommended (or yarn). (Check with `npm -v`)\n          \u003e - **Supabase Account**: A free account at [supabase.com](https://supabase.com) is required to get project URL and API keys.\n          \u003e - **Supabase Project Setup**:\n          \u003e   - Create a new Supabase project.\n          \u003e   - **Enable Email/Password Authentication**: In your Supabase project dashboard -\u003e Authentication -\u003e Providers -\u003e Email -\u003e Enable.\n          \u003e   - **Database Schema**: Set up the necessary tables (e.g., `profiles`, `workout_plans`, `progress_logs`) based on `workoutService.js`. You'll need to define columns and potentially RLS policies. (See Supabase docs for table editor and SQL editor).\n\n          ### 🚀 Setup Instructions\n          1. Clone the repository:\n             ```bash\n             git clone https://github.com/coslynx/fitness-tracker-web-mvp.git\n             cd fitness-tracker-web-mvp\n             ```\n          2. Install dependencies:\n             ```bash\n             npm install\n             ```\n          3. Configure environment variables:\n             - Copy the example environment file:\n               ```bash\n               cp .env.example .env\n               ```\n             - Edit the newly created `.env` file:\n               ```dotenv\n               # Supabase Project URL - Replace with your actual Supabase project URL\n               VITE_SUPABASE_URL=YOUR_SUPABASE_URL_HERE\n\n               # Supabase Public Anonymous Key - Replace with your actual Supabase anon key\n               VITE_SUPABASE_ANON_KEY=YOUR_SUPABASE_ANON_KEY_HERE\n               ```\n             - Replace `YOUR_SUPABASE_URL_HERE` and `YOUR_SUPABASE_ANON_KEY_HERE` with the actual credentials from your Supabase project dashboard (Project Settings -\u003e API).\n\n          \u003e [!IMPORTANT]\n          \u003e Ensure your Supabase database tables (`workout_plans`, `progress_logs`) and necessary Row Level Security (RLS) policies are set up correctly for the application features to work as intended. The MVP services (`workoutService.js`) assume these tables exist.\n\n        ## 🏗️ Usage\n          ### 🏃‍♂️ Running the MVP\n          1. Start the development server:\n             ```bash\n             npm run dev\n             ```\n          2. Access the application in your browser:\n             - The terminal will output the local URL, typically [http://localhost:3000](http://localhost:3000) (as configured in `vite.config.js`).\n\n          \u003e [!TIP]\n          \u003e ### ⚙️ Configuration\n          \u003e - **Supabase Keys**: The core configuration happens in the `.env` file, providing the necessary Supabase URL and Anon Key. Ensure these are correct and the file is **never** committed to version control.\n          \u003e - **Vite**: `vite.config.js` configures the development server port (3000) and React plugin integration.\n          \u003e - **Tailwind**: `tailwind.config.js` defines theme customizations (none for MVP) and importantly, the `content` array which specifies files to scan for CSS purging in production builds.\n          \u003e - **Supabase Backend**: All database schema, RLS policies, and auth settings are configured directly within your Supabase project dashboard.\n\n          ### 📚 Usage Flow\n          1. Navigate to the application URL.\n          2. You will be prompted to **Login** or **Sign Up** on the `/auth` page.\n          3. **Sign Up**: Create a new account using your email and password. (Depending on Supabase settings, email confirmation might be required).\n          4. **Login**: Sign in with your existing credentials.\n          5. Upon successful authentication, you will be redirected to the **Dashboard (`/`)**.\n          6. **Dashboard**: View your assigned workout plan (MVP uses predefined templates).\n          7. Navigate to the **Progress (`/progress`)** page.\n          8. **View History**: See previously logged workout exercises.\n          9. **Log Workout**: Fill in the form to log a new workout exercise session (Workout Name, Exercise, Sets, Reps, Date, optional Weight) and submit.\n          10. The history list will update to include the newly logged item.\n          11. **Logout**: Use the Logout button in the header.\n\n        ## 🌐 Hosting\n          ### 🚀 Deployment Instructions\n          This project is a standard Vite/React application and can be deployed to various static hosting platforms that support Node.js build steps. Vercel and Netlify are excellent choices.\n\n          #### Deploying to Vercel (Example)\n          1. **Push to Git**: Ensure your code is pushed to a Git repository (GitHub, GitLab, Bitbucket).\n          2. **Create Vercel Account**: Sign up or log in at [vercel.com](https://vercel.com).\n          3. **Import Project**: Click \"Add New...\" -\u003e \"Project\" and import your Git repository.\n          4. **Configure Project**:\n             - **Framework Preset**: Vercel should automatically detect `Vite`.\n             - **Build Command**: Should default to `npm run build` or `vite build`. Verify this is correct.\n             - **Output Directory**: Should default to `dist`. Verify this is correct.\n             - **Install Command**: Should default to `npm install`. Verify this is correct.\n          5. **Set Environment Variables**:\n             - Navigate to Project Settings -\u003e Environment Variables.\n             - Add the following variables with the values from your `.env` file (or your production Supabase project if different):\n               - `VITE_SUPABASE_URL` = `YOUR_SUPABASE_URL_HERE`\n               - `VITE_SUPABASE_ANON_KEY` = `YOUR_SUPABASE_ANON_KEY_HERE`\n             - Ensure these are available for the Production environment (and Preview/Development if needed).\n          6. **Deploy**: Click the \"Deploy\" button. Vercel will build and deploy your application.\n\n          \u003e [!NOTE]\n          \u003e Similar steps apply for Netlify. Ensure the build command, output directory, and environment variables are correctly configured in the platform's settings.\n\n          ### 🔑 Environment Variables\n          The following environment variables are required for the application to connect to Supabase:\n\n          - `VITE_SUPABASE_URL`: **Required**. The unique URL for your Supabase project.\n            *Purpose*: Connects the frontend application to your specific Supabase backend.\n            *Example*: `https://your-project-ref.supabase.co`\n          - `VITE_SUPABASE_ANON_KEY`: **Required**. The public \"anonymous\" key for your Supabase project.\n            *Purpose*: Allows the frontend application to interact with Supabase services within the bounds of your Row Level Security (RLS) policies. This key is safe to expose in client-side code.\n            *Example*: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`\n\n        ## 📜 API Documentation\n        This MVP utilizes **Supabase** as its Backend-as-a-Service (BaaS). There isn't a custom-built REST or GraphQL API defined within this repository itself. Instead, the frontend interacts directly with the Supabase APIs via the `@supabase/supabase-js` client library.\n\n        ### Key Interactions:\n\n        1.  **Authentication**: Managed via `supabase.auth` methods (`signUp`, `signInWithPassword`, `signOut`, `getSession`, `onAuthStateChange`). Interactions are abstracted in `src/services/authService.js` and managed globally by `src/context/AuthContext.jsx`.\n        2.  **Database Operations**: Handled via `supabase.from('table_name').select() | .insert() | .update() | .delete()` methods. These are abstracted in `src/services/workoutService.js` for fetching plans (`workout_plans` table) and logging/fetching progress (`progress_logs` table).\n\n        ### 🔒 Security Model:\n        - **Authentication**: Supabase handles user authentication securely.\n        - **Authorization**: Data access control relies heavily on **Supabase Row Level Security (RLS)** policies defined directly on your database tables (`workout_plans`, `progress_logs`). Ensure policies are configured correctly to allow users to only access and modify their own data. The `user.id` from the authenticated session is used in service calls (`workoutService.js`) to filter data appropriately based on these policies.\n\n        \u003e [!TIP]\n        \u003e Refer to the [Supabase Documentation](https://supabase.com/docs) for details on authentication, database interactions, and configuring Row Level Security policies. The code in `src/services/` provides specific examples of how this MVP interacts with Supabase.\n\n\n        \u003e [!NOTE]\n        \u003e ## 📜 License \u0026 Attribution\n        \u003e\n        \u003e ### 📄 License\n        \u003e This Minimum Viable Product (MVP) is licensed under the [GNU AGPLv3](https://choosealicense.com/licenses/agpl-3.0/) license.\n        \u003e\n        \u003e ### 🤖 AI-Generated MVP\n        \u003e This MVP was entirely generated using artificial intelligence through [CosLynx.com](https://coslynx.com).\n        \u003e\n        \u003e No human was directly involved in the coding process of the repository: fitness-tracker-web-mvp\n        \u003e\n        \u003e ### 📞 Contact\n        \u003e For any questions or concerns regarding this AI-generated MVP, please contact CosLynx at:\n        \u003e - Website: [CosLynx.com](https://coslynx.com)\n        \u003e - 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%2Ffitwise-workout-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoslynx%2Ffitwise-workout-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoslynx%2Ffitwise-workout-tracker/lists"}