Skip to content

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-Goal-MVP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fitness-Tracker-Goal-MVP

A Minimal Viable Product for Personalized Fitness Goal Tracking

Developed with the software and tools below.

Framework: Next.js Frontend: React Backend: Node.js Database: PostgreSQL
git-last-commit GitHub commit activity GitHub top language

πŸ“‘ Table of Contents

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

πŸ“ Overview

This repository contains the source code for a Fitness Tracker MVP, built to empower individuals to set, track, and achieve their fitness goals. It features a user-friendly interface, personalized goal setting, detailed progress tracking, and a supportive social community.

πŸ“¦ Features

Feature Description
πŸ” User Authentication Secure user registration and login using NextAuth.js, supporting multiple providers like Google, Facebook, and email.
🎯 Goal Setting Set personalized fitness goals with specific targets and deadlines.
πŸ“ˆ Progress Tracking Track workouts, activities, and nutrition intake.
🀝 Social Sharing Share progress updates and connect with other users to build a supportive community.
πŸ“Š Data Visualization Visualize progress with interactive charts and graphs for insights and motivation.
πŸ›‘οΈ Security Robust security measures to protect user data and ensure a safe and private experience.

πŸ“‚ Structure

Fitness-Tracker-Goal-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
β”œβ”€β”€ tailwind.config.ts
└── tsconfig.json

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • PostgreSQL

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/coslynx/Fitness-Tracker-Goal-MVP.git
  2. Navigate to the project directory:
    • cd Fitness-Tracker-Goal-MVP
  3. Install dependencies:
    • npm install
  4. Set up PostgreSQL:
    • Create a PostgreSQL database.
    • Update the .env file with your database credentials (DATABASE_URL).

πŸ—οΈ Usage

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

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

βš™οΈ Configuration

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

πŸ“š Examples

  • πŸ“ Example 1: Create a new fitness goal from the dashboard page.
  • πŸ“ Example 2: Log a workout using the workout tracking feature.
  • πŸ“ Example 3: Share your progress update on the social feed.

🌐 Hosting

πŸš€ Deployment Instructions

Vercel

  1. Login to Vercel:
    • vercel login
  2. Initialize Vercel project:
    • vercel init
  3. Deploy the application:
    • vercel

Netlify

  1. Login to Netlify:
    • netlify login
  2. Create a new Netlify site:
    • netlify init
  3. Deploy the application:
    • netlify deploy

GitHub Pages

  1. Create a new branch named gh-pages:
    • git checkout -b gh-pages
  2. Build the application for production:
    • npm run build
  3. Commit the build output to the gh-pages branch:
    • git add .
    • git commit -m "Deploy to GitHub Pages"
    • git push origin gh-pages
  4. Configure your GitHub repository to use the gh-pages branch for GitHub Pages deployment.

πŸ”‘ Environment Variables

  • DATABASE_URL: Your PostgreSQL database connection string.

πŸ“œ API Documentation

πŸ” Endpoints

  • POST /api/auth/login: Authenticate a user.
  • POST /api/auth/register: Register a new user.
  • GET /api/goals/:userId: Retrieve goals for a specific user.
  • POST /api/goals: Create a new goal for the current user.
  • PUT /api/goals/:id: Update a goal.
  • DELETE /api/goals/:id: Delete a goal.
  • POST /api/progress: Log a new workout for the current user.
  • GET /api/progress/:userId: Retrieve workout history for a specific user.

πŸ”’ Authentication

Use JWT (JSON Web Tokens) for authentication. The tokens are generated and verified using NextAuth.js.

πŸ“ Examples

  • Login:
    • curl -X POST http://localhost:3000/api/auth/login -H "Content-Type: application/json" -d '{"email": "[email protected]", "password": "your_password"}'
  • Register:
    • curl -X POST http://localhost:3000/api/auth/register -H "Content-Type: application/json" -d '{"email": "[email protected]", "password": "your_password", "name": "Your Name"}'

πŸ“œ License & Attribution

πŸ“„ License

This Fitness Tracker 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-Goal-MVP

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