Skip to content

Project: Simple fitness tracker with goal setting, progress logging, and basic analytics. Created at https://coslynx.com

Notifications You must be signed in to change notification settings

coslynx/fitness-goals-web-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

fitness-goals-web-app

A web application that empowers fitness enthusiasts to track their progress, set goals, and connect with others.

Developed with the software and tools below.

Framework used Frontend technologies used Backend technology used LLMs used for development
git-last-commit GitHub commit activity GitHub top language

πŸ“‘ Table of Contents

  • πŸ“ Overview
  • πŸ“¦ Features
  • πŸ“‚ Structure
  • πŸ’» Installation
  • πŸ—οΈ Usage
  • 🌐 Hosting
  • πŸ“„ License
  • πŸ‘ Authors

πŸ“ Overview

The repository contains a Minimum Viable Product (MVP) called "fitness-goals-web-app" that provides a comprehensive solution for fitness enthusiasts. This application utilizes a robust technology stack including React, Next.js, TypeScript, Tailwind CSS, Supabase, and custom LLMs like Gemini and OpenAI.

πŸ“¦ Features

Feature Description
βš™οΈ Architecture The codebase follows a modular architectural pattern, separating functionalities into distinct directories for easier maintenance and scalability.
πŸ“„ Documentation This README file provides a comprehensive overview of the MVP, including installation instructions, usage guides, and detailed explanations.
πŸ”— Dependencies The application leverages various external libraries and packages, such as React, Next.js, Zustand, and Tailwind CSS, to provide a seamless user experience.
🧩 Modularity The code is structured with separate components, pages, and utilities, promoting code reusability and simplifying future development.
πŸ§ͺ Testing The codebase includes unit tests to ensure the reliability and robustness of the application's core functionalities.
⚑️ Performance The application prioritizes performance, utilizing caching strategies and optimized code to deliver a fast and responsive user experience.
πŸ” Security Security is a top priority, with measures like input validation, data encryption, and secure authentication implemented to protect user data.
πŸ”€ Version Control Git is used for version control, while GitHub Actions automate build and release processes, ensuring a streamlined development workflow.
πŸ”Œ Integrations The application integrates with various external services like Supabase for database management, Google OAuth for authentication, and fitness trackers via APIs.
πŸ“Ά Scalability The application is designed for scalability, using a serverless backend and cloud-based database to handle increasing user traffic and data storage.

πŸ“‚ Structure

fitness-goals-web-app
β”œβ”€β”€ public
β”‚   └── favicon.ico
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ Button.tsx
β”‚   β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”‚   β”œβ”€β”€ Layout.tsx
β”‚   β”‚   β”œβ”€β”€ GoalInput.tsx
β”‚   β”‚   β”œβ”€β”€ ProgressChart.tsx
β”‚   β”‚   └── SocialShareButton.tsx
β”‚   β”œβ”€β”€ pages
β”‚   β”‚   β”œβ”€β”€ api
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ goals.ts
β”‚   β”‚   β”‚   └── progress.ts
β”‚   β”‚   β”œβ”€β”€ _app.tsx
β”‚   β”‚   β”œβ”€β”€ index.tsx
β”‚   β”‚   β”œβ”€β”€ dashboard.tsx
β”‚   β”‚   └── login.tsx
β”‚   β”œβ”€β”€ styles
β”‚   β”‚   └── global.css
β”‚   β”œβ”€β”€ utils
β”‚   β”‚   β”œβ”€β”€ helpers.ts
β”‚   β”‚   β”œβ”€β”€ api.ts
β”‚   β”‚   β”œβ”€β”€ auth.ts
β”‚   β”‚   └── validation.ts
β”‚   β”œβ”€β”€ config
β”‚   β”‚   └── next-auth.config.ts
β”‚   β”œβ”€β”€ middleware
β”‚   β”‚   └── authentication.ts
β”‚   β”œβ”€β”€ .env
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ tailwind.config.ts
β”‚   └── tsconfig.json
└── vite.config.js

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone /~https://github.com/coslynx/fitness-goals-web-app.git
  2. Navigate to the project directory:
    • cd fitness-goals-web-app
  3. Install dependencies:
    • npm install

πŸ—οΈ Usage

πŸƒβ€β™‚οΈ Running the Application

  1. Start the development server:
    • npm start
  2. Open your browser and navigate to http://localhost:3000.

βš™οΈ Configuration

Adjust configuration settings in .env or next.config.js as needed.

πŸ“š Examples

  • πŸ“ Example 1: How to Set a Fitness Goal:
    • Navigate to the "Goals" section.
    • Click the "Add Goal" button.
    • Enter the details of your goal, including the type (weight loss, distance running, etc.), target date, and any additional information.
    • Click "Save Goal" to create the goal.
  • πŸ“ Example 2: How to Record a Workout:
    • Navigate to the "Progress" section.
    • Click the "Log Workout" button.
    • Select the type of workout (cardio, strength training, etc.).
    • Enter the duration and intensity of your workout.
    • Click "Save Workout" to record your activity.
  • πŸ“ Example 3: How to Connect with Others:
    • Navigate to the "Social" section.
    • Search for other users to follow.
    • Share your progress updates and achievements.
    • Leave comments and provide encouragement to other users.

🌐 Hosting

πŸš€ Deployment Instructions

Vercel

  1. Log in to your Vercel account.
  2. Click "New Project" and select "Import from Git".
  3. Enter the repository URL: /~https://github.com/coslynx/fitness-goals-web-app.git.
  4. Select the branch you want to deploy.
  5. Click "Deploy".

Netlify

  1. Log in to your Netlify account.
  2. Click "New site from Git".
  3. Enter the repository URL: /~https://github.com/coslynx/fitness-goals-web-app.git.
  4. Select the branch you want to deploy.
  5. Click "Deploy".

GitHub Pages

  1. Navigate to the repository's settings page on GitHub.
  2. Select "Pages" from the left-hand menu.
  3. Choose the source branch and directory.
  4. Click "Save".

Other Hosting Services

Refer to the specific documentation for your chosen hosting service to deploy the application.

πŸ”‘ Environment Variables

  • NEXT_PUBLIC_SUPABASE_URL: Your Supabase URL (obtain from Supabase project settings).
  • NEXT_PUBLIC_SUPABASE_ANON_KEY: Your Supabase Anonymous Key (obtain from Supabase project settings).

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/auth/session: Retrieves the current user session information.
  • POST /api/auth/signin: Initiates the sign-in process using Google OAuth.
  • POST /api/auth/signout: Logs out the current user.
  • GET /api/goals: Retrieves a list of user goals.
  • POST /api/goals: Creates a new goal for the user.
  • PUT /api/goals/:id: Updates an existing goal.
  • DELETE /api/goals/:id: Deletes a goal.
  • GET /api/progress: Retrieves the user's workout progress.
  • POST /api/progress: Records a new workout.

πŸ”’ Authentication

The application uses Google OAuth for user authentication. After successfully signing in, a session token is issued and used to secure subsequent API requests.

πŸ“ Examples

  • curl -X GET http://localhost:3000/api/goals

πŸ“œ License

This project is licensed under the MIT License.

πŸ‘₯ Authors

🌐 CosLynx.com

Create Your Custom MVP in Minutes With CosLynxAI!