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/FitTrack-MVP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

Repository files navigation

FitTrack-MVP

A user-friendly fitness tracker MVP built with React, Next.js, and PostgreSQL.

Developed with the software and tools below.

Framework-React-blue Frontend-Javascript,_Html,_Css-red Backend-Node.js-blue Database-PostgreSQL-blue
git-last-commit GitHub commit activity GitHub top language

πŸ“‘ Table of Contents

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

πŸ“ Overview

This repository contains a Minimum Viable Product (MVP) called "FitTrack-MVP" that offers a streamlined and motivating experience to empower users to achieve their fitness aspirations. It provides a user-centric platform that combines personalized goal setting, detailed progress monitoring, and a thriving social community. Built on a secure and robust technical foundation, FitTrack-MVP differentiates itself through a user-friendly interface, personalized goal setting, detailed progress tracking, and social engagement features.

πŸ“¦ Features

Feature Description
πŸ” Authentication Users can register and login securely through an email-based authentication system.
🎯 Goal Setting Users can set personalized fitness goals tailored to their individual needs and preferences.
πŸ“ˆ Progress Tracking Users can log their workouts, activities, and nutritional intake, and track their progress towards their goals.
πŸ‘₯ Social Engagement Users can share their progress, motivate one another, and connect with like-minded individuals.
πŸ’» Technology Stack FitTrack-MVP is built on a robust technology stack, including React, Next.js, TypeScript, PostgreSQL, and other essential libraries.

πŸ“‚ Structure

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

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker

πŸš€ Setup Instructions

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

πŸ—οΈ Usage

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

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

βš™οΈ Configuration

Adjust configuration settings in .env and next-auth.config.ts.

πŸ“š Examples

  • Register & Login: Users can register and log in using their email addresses and passwords.
  • Set Goals: Users can define personalized fitness goals, including targets and deadlines.
  • Track Progress: Users can log their workouts and activities, with the app automatically calculating their progress toward their goals.
  • Engage Socially: Users can share their fitness achievements, motivate others, and connect with like-minded individuals through the social feed.

🌐 Hosting

πŸš€ Deployment Instructions

Vercel

  1. Install the Vercel CLI:
    • npm install -g vercel
  2. Log in to Vercel:
    • vercel login
  3. Initialize Vercel in your project directory:
    • vercel init
  4. Deploy your application:
    • vercel deploy

Netlify

  1. Install the Netlify CLI:
    • npm install -g netlify-cli
  2. Log in to Netlify:
    • netlify login
  3. Initialize Netlify in your project directory:
    • netlify init
  4. Deploy your application:
    • netlify deploy

GitHub Pages

  1. Update your project's settings on GitHub to enable GitHub Pages.
  2. Configure the build settings and deploy directory (usually out) on GitHub.
  3. Push your code to the gh-pages branch.

AWS

  1. Create an AWS account and set up an S3 bucket for hosting your static website.
  2. Configure AWS CloudFront for content distribution.
  3. Use a CI/CD pipeline to automate deployment to AWS.

Google Cloud

  1. Create a Google Cloud account and set up a Cloud Storage bucket for hosting.
  2. Configure Google Cloud CDN for content distribution.
  3. Use a CI/CD pipeline to automate deployment to Google Cloud.

πŸ”‘ Environment Variables

  • NEXT_PUBLIC_API_URL: Your API URL (e.g., http://localhost:3000)
  • NEXTAUTH_URL: Your application's URL (e.g., http://localhost:3000)
  • NEXTAUTH_SECRET: A random secret key for signing tokens (generate using openssl rand -base64 32)
  • DATABASE_URL: Your PostgreSQL database connection string (e.g., postgresql://user:password@host:port/database)

πŸ“œ API Documentation

πŸ” Endpoints

  • POST /api/auth/register: Register a new user.
  • POST /api/auth/login: Log in an existing user.
  • POST /api/auth/logout: Log out the current user.
  • POST /api/goals: Create a new fitness goal.
  • GET /api/goals: Retrieve a list of user goals.
  • PUT /api/goals/:id: Update a specific goal.
  • DELETE /api/goals/:id: Delete a specific goal.
  • POST /api/workouts: Log a new workout.
  • GET /api/workouts: Retrieve a list of user workouts.
  • PUT /api/workouts/:id: Update a specific workout.
  • DELETE /api/workouts/:id: Delete a specific workout.

πŸ”’ Authentication

The API utilizes JSON Web Tokens (JWT) for authentication. Users need to authenticate before accessing protected resources.

πŸ“ Examples

  • Register a new user:
    • curl -X POST http://localhost:3000/api/auth/register -H 'Content-Type: application/json' -d '{"email": "example@email.com", "password": "yourpassword"}'
  • Log in an existing user:
    • curl -X POST http://localhost:3000/api/auth/login -H 'Content-Type: application/json' -d '{"email": "example@email.com", "password": "yourpassword"}'

πŸ“œ 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.

πŸ“ž 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!

Developers-Drix10,_Kais_Radwan-red Website-CosLynx.com-blue Backed_by-Google,_Microsoft_&_Amazon_for_Startups-red Finalist-Backdrop_Build_v4,_v6-black