Skip to content

Set fitness goals, track progress, and share achievements with friends... Created at https://coslynx.com

Notifications You must be signed in to change notification settings

coslynx/fitness-tracker-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

Repository files navigation

fitness-tracker-app

A web application for setting fitness goals, tracking progress, and staying motivated.

Developed with the software and tools below.

Framework used for building the application Frontend technologies used Backend technology used Database used for storing user data
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-tracker-app" that provides a comprehensive solution for fitness enthusiasts using a combination of frontend and backend technologies. The application leverages React for a dynamic and user-friendly interface, Next.js for a robust and scalable framework, Node.js for backend logic, Supabase for secure data storage, and various third-party libraries for features like authentication, charting, and social sharing.

πŸ“¦ Features

Feature Description
πŸ” User Authentication Allows users to create accounts, securely log in, and manage their profiles. This ensures data privacy and access control.
🎯 Goal Setting Enables users to define personalized fitness goals with customizable parameters like target weight, distance, and timeframes.
πŸ‹οΈ Workout Tracking Provides a way for users to log their workouts, including type, duration, intensity, and key metrics.
πŸ“ˆ Progress Visualization Visualizes user progress towards their goals through interactive charts and graphs for better insights and motivation.
🀝 Social Community Allows users to connect with others, share their achievements, and receive support and encouragement.
🌐 API Integration Integrates with third-party fitness trackers to automatically import user data, providing a comprehensive view of their fitness activity.
πŸ›‘οΈ Data Security Implements robust security measures like encryption, access control, and data sanitization to protect user information.
⚑️ Performance Optimization Designed for fast loading times, smooth user interactions, and efficient data retrieval using techniques like caching and optimized database queries.
πŸ—οΈ Scalable Architecture Built with a scalable architecture that can accommodate increasing user traffic and data volume.

πŸ“‚ Structure

fitness-tracker-app
β”œβ”€β”€ 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

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker (optional, for deployment)

πŸš€ Setup Instructions

  1. Clone the repository:
    git clone https://github.com/coslynx/fitness-tracker-app.git
  2. Navigate to the project directory:
    cd fitness-tracker-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 config/next-auth.config.ts or .env to customize database credentials and other environment-specific variables.

πŸ“š Examples

  • πŸ“ Example 1: Goal Creation: Users can create a new goal by providing the goal type (e.g., weight loss, distance running) and target value.
  • πŸ“ Example 2: Workout Logging: Users can record workouts by specifying the type (e.g., running, cycling), duration, intensity, and other relevant details.
  • πŸ“ Example 3: Social Sharing: Users can share their achievements on social media platforms like Facebook, Twitter, or Instagram.

🌐 Hosting

πŸš€ Deployment Instructions

Vercel Deployment (Recommended):

  1. Create a Vercel Account: If you don't already have one, sign up for a Vercel account at https://vercel.com/.
  2. Initialize Vercel Project: In your project directory, run:
    npx create-next-app@latest -e with-vercel
  3. Deploy to Vercel: Follow the Vercel CLI prompts to configure your project and deploy to Vercel.
  4. Configure Environment Variables: Set up your environment variables (e.g., database credentials) on the Vercel dashboard.

Other Hosting Options:

  • Netlify: Follow similar steps as with Vercel, using the Netlify CLI or web interface.
  • GitHub Pages: Build a static version of your application and deploy it to GitHub Pages.
  • AWS: Use AWS services like Elastic Beanstalk or EC2 to host your application.
  • Google Cloud: Use Google Cloud Platform services like App Engine or Compute Engine to host your application.

πŸ”‘ Environment Variables

  • SUPABASE_URL: Your Supabase URL (found in your Supabase project settings)
  • SUPABASE_KEY: Your Supabase API key (found in your Supabase project settings)

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/auth/session: Retrieves the user's session information.
  • POST /api/auth/signin: Authenticates a user with email and password.
  • POST /api/auth/signup: Registers a new user with email and password.
  • GET /api/goals: Retrieves a list of the user's 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.
  • POST /api/progress: Logs a new workout and updates progress for a goal.
  • GET /api/progress/:goalId: Retrieves progress data for a specific goal.

πŸ”’ Authentication

The API uses JWT tokens for authentication. When a user logs in, they receive a JWT token that is used for subsequent requests to protected endpoints.

πŸ“ Examples

  • Retrieve user session data:
    curl -X GET http://localhost:3000/api/auth/session

πŸ“œ License & Attribution

πŸ“„ License

This Minimum Viable Product (MVP) is licensed under the GNU AGPLv3 license.

πŸ€– AI-Generated MVP

This MVP was entirely generated using artificial intelligence through CosLynx.com.

No human was directly involved in the coding process of the repository: fitness-tracker-app

πŸ“ž Contact

For any questions or concerns regarding this AI-generated MVP, please contact CosLynx at:

🌐 CosLynx.com

Create Your Custom MVP in Minutes With CosLynxAI!