Skip to content

Project: Track fitness goals, log workouts, and share progress with friends. Created at https://coslynx.com

Notifications You must be signed in to change notification settings

coslynx/Fitness-Tracker-MVP-Social-Goals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

Repository files navigation

Fitness-Tracker-MVP-Social-Goals

A web application designed to empower individuals in their fitness journeys with goal setting, progress tracking, and social interaction.

Developed with the software and tools below.

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-MVP-Social-Goals" that provides a user-friendly platform for setting fitness goals, tracking progress, and connecting with others. The MVP aims to address the challenges of maintaining fitness motivation by offering personalized insights, clear progress visualization, and a sense of community. It leverages the power of Next.js, React, Node.js, and Supabase to deliver a seamless and engaging experience.

πŸ“¦ Features

Feature Description
πŸ‘€ User Authentication Securely registers and logs in users, managing their sessions using NextAuth.js with Supabase integration.
🎯 Goal Setting Allows users to define personalized fitness goals (e.g., weight loss, muscle gain, distance run) with customizable parameters.
πŸ“Š Progress Tracking Collects user activity data automatically through integration with fitness trackers and wearables or allows manual entry.
πŸ’¬ Social Sharing Enables users to share their progress updates, achievements, and motivational messages with their friends and family through a social feed.
πŸ“ˆ Data Visualization Displays a comprehensive overview of progress with interactive charts and graphs, providing insights into user activity and goal achievements.
πŸ” Security Implements robust security measures, including data encryption, authentication, and authorization, to protect user data and ensure a secure experience.
⚑ Performance Optimized for performance with server-side rendering (SSR) using Next.js and caching strategies to ensure fast loading times and a smooth user experience.
🌐 Scalability Designed to handle increasing user load and data volume with a microservices architecture, database sharding, and a serverless approach provided by Supabase.
πŸ—οΈ Modular Structure The codebase is organized into well-defined modules and components for better maintainability, reusability, and collaboration.

πŸ“‚ Structure

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

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/coslynx/Fitness-Tracker-MVP-Social-Goals.git
  2. Navigate to the project directory:
    • cd Fitness-Tracker-MVP-Social-Goals
  3. Install dependencies:
    • npm install

πŸ—οΈ Usage

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

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

βš™οΈ Configuration

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

πŸ“š Examples

  • πŸ“ Example 1: Register a new user and set a weight loss goal.
  • πŸ“ Example 2: Connect a wearable device to automatically track activity and view progress towards a distance run goal.
  • πŸ“ Example 3: Share a progress update on the social feed, engage with other users' posts, and join a fitness challenge.

🌐 Hosting

πŸš€ Deployment Instructions

  1. Vercel (Recommended):
    • Configure Vercel project settings to deploy the Next.js application.
    • Connect your GitHub repository and deploy the code with a single command.
  2. Netlify:
    • Create a new Netlify site and connect it to your GitHub repository.
    • Configure build settings for the Next.js application and deploy.
  3. Heroku:
    • Install the Heroku CLI and login to your Heroku account.
    • Create a new Heroku app and deploy the code using the Heroku CLI.
  4. AWS:
    • Create an AWS account and configure services such as EC2, S3, and Elastic Beanstalk for deployment.
    • Deploy the Next.js application to your AWS infrastructure.
  5. Google Cloud:
    • Create a Google Cloud account and configure services such as App Engine, Compute Engine, or Cloud Functions for deployment.
    • Deploy the Next.js application to your Google Cloud infrastructure.

πŸ”‘ Environment Variables

  • SUPABASE_URL: Your Supabase database URL.
  • SUPABASE_ANON_KEY: Your Supabase anonymous API key.
  • NEXTAUTH_URL: Your application's URL, usually http://localhost:3000 in development.
  • NEXTAUTH_SECRET: A random secret for signing JWT tokens.

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/goals: Retrieves a list of user goals.
  • POST /api/goals: Creates a new fitness goal.
  • GET /api/progress: Fetches user activity data and progress metrics.
  • POST /api/progress: Logs a manual workout or activity.
  • GET /api/social/feed: Retrieves updates from the social feed.
  • POST /api/social/post: Shares a progress update to the social feed.

πŸ”’ Authentication

  • Uses NextAuth.js with Supabase integration for user authentication.
  • JWT tokens are used for secure session management.

πŸ“ Examples

  • curl -X GET http://localhost:3000/api/goals (Retrieves a list of goals).
  • curl -X POST http://localhost:3000/api/goals -H "Content-Type: application/json" -d '{"title": "Lose 10 pounds", "type": "Weight Loss", "target_date": "2024-12-31"}' (Creates a new weight loss goal).

πŸ“œ License

This MVP is licensed under the MIT License.

πŸ‘₯ Authors

🌐 CosLynx.com

Create Your Custom MVP in Minutes With CosLynxAI!