Skip to content

Latest commit

 

History

History
172 lines (153 loc) · 8.99 KB

File metadata and controls

172 lines (153 loc) · 8.99 KB

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!