Skip to content

Latest commit

 

History

History
195 lines (168 loc) · 7.63 KB

README.md

File metadata and controls

195 lines (168 loc) · 7.63 KB

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!