Skip to content

Latest commit

 

History

History
195 lines (172 loc) · 9.24 KB

File metadata and controls

195 lines (172 loc) · 9.24 KB

fitness-tracker-mvp-personalized-goals

A user-friendly fitness tracking platform with personalized goal setting and a motivating social community.

Developed with the software and tools below.

Framework used: React Frontend technology: Javascript, HTML, CSS Backend technology: Node.js LLMs used: Custom, Gemini, OpenAI
git-last-commit GitHub commit activity GitHub top language

📑 Table of Contents

  • 📍 Overview
  • 📦 Features
  • 📂 Structure
  • 💻 Installation
  • 🏗️ Usage
  • 🌐 Hosting
  • 📄 License
  • 👏 Authors

📍 Overview

This repository houses the "fitness-tracker-mvp-personalized-goals" project, an MVP for a fitness tracking application designed to empower users to achieve their fitness goals through personalized goal setting, detailed progress tracking, and a supportive social community. It leverages a robust technology stack including React, JavaScript, HTML, CSS, Node.js, and custom LLMs like Gemini and OpenAI.

📦 Features

Feature Description
⚙️ Architecture The codebase implements a modular architecture with separate directories for functionalities, promoting maintainability and scalability.
📄 Documentation This README provides a comprehensive overview of the MVP, dependencies, and usage instructions.
🔗 Dependencies The project relies on libraries such as React, Zustand, Tailwind CSS, NextAuth.js, Prisma ORM, and others for UI development, authentication, database interaction, and more.
🧩 Modularity The modular structure enables efficient maintenance and reusability through dedicated files and directories for components, utils, pages, and more.
🧪 Testing Unit tests implemented with Jest or React Testing Library ensure code reliability and robustness.
⚡️ Performance Performance optimization techniques are employed to ensure the application runs efficiently across various browsers and devices.
🔐 Security Security measures like input validation, secure data storage, and authentication protect user data and prevent vulnerabilities.
🔀 Version Control Git for version control with GitHub Actions for automated build and release processes.
🔌 Integrations Integrates with browser APIs, external services through HTTP requests, and potential integrations with speech recognition and synthesis APIs.
📶 Scalability The system is designed for future scalability with caching, optimized database structures, and cloud-based solutions.

📂 Structure

└── src
    ├── 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.js
└── tsconfig.json

💻 Installation

🔧 Prerequisites

  • Node.js
  • npm
  • Docker (Optional)

🚀 Setup Instructions

  1. Clone the Repository:
    git clone https://github.com/coslynx/fitness-tracker-mvp-personalized-goals.git
  2. Navigate to the Project Directory:
    cd fitness-tracker-mvp-personalized-goals
  3. Install Dependencies:
    npm install

🏗️ Usage

🏃‍♂️ Running the MVP

  1. Start the Development Server:
    npm start
  2. Open in Browser: Open your browser and access http://localhost:3000.

⚙️ Configuration

  • Environment Variables: Configure environment variables in the .env file.

📚 Examples

  • Example 1: Setting a new fitness goal
  • Example 2: Tracking a workout
  • Example 3: Sharing progress updates on the social feed

🌐 Hosting

🚀 Deployment Instructions

Vercel (Recommended)

  1. Log in to Vercel: Sign up or log in to your Vercel account.
  2. Import Project: Use the "Import from GitHub" option to import the repository.
  3. Deploy: Click the "Deploy" button.

Netlify

  1. Create a Netlify Account: Sign up for a Netlify account.
  2. Connect to GitHub: Connect your GitHub account to Netlify.
  3. Deploy: Choose the repository and configure deployment settings.

GitHub Pages

  1. Enable GitHub Pages: Go to the repository settings and enable GitHub Pages.
  2. Build & Push: Build the application and push the resulting files to the gh-pages branch.

AWS

  1. Create an S3 Bucket: Create an Amazon S3 bucket to store your application files.
  2. Configure AWS Lambda: Set up an AWS Lambda function to handle server-side logic.
  3. Deploy: Deploy your application code to the S3 bucket and configure AWS Lambda for API requests.

Google Cloud

  1. Create a Cloud Storage Bucket: Create a Google Cloud Storage bucket to store your application files.
  2. Configure Cloud Run: Set up a Google Cloud Run service to host your application.
  3. Deploy: Deploy your application code to the Cloud Storage bucket and configure Cloud Run for deployment.

🔑 Environment Variables

  • DATABASE_URL: Your database connection string.
  • NEXTAUTH_URL: The URL of your NextAuth.js instance.
  • NEXTAUTH_SECRET: A secret used for session encryption.

📜 API Documentation

🔍 Endpoints

  • GET /api/goals: Retrieves a list of goals for the authenticated user.
  • POST /api/goals: Creates a new goal for the authenticated user.
  • GET /api/goals/:id: Retrieves a specific goal by ID for the authenticated user.
  • PUT /api/goals/:id: Updates a specific goal by ID for the authenticated user.
  • DELETE /api/goals/:id: Deletes a specific goal by ID for the authenticated user.
  • POST /api/workouts: Logs a new workout for the authenticated user.

🔒 Authentication

  • The API uses JWT tokens for authentication, issued by NextAuth.js upon successful login.

📝 Examples

  • Get a list of goals:
    curl -X GET http://localhost:3000/api/goals -H "Authorization: Bearer YOUR_JWT_TOKEN"
  • Create a new goal:
    curl -X POST http://localhost:3000/api/goals -H "Authorization: Bearer YOUR_JWT_TOKEN" -d '{"name": "Lose 10 pounds", "target": "10 pounds", "deadline": "2024-12-31T00:00:00.000Z"}'

📜 License

This project is licensed under the MIT License.

👥 Authors

🌐 CosLynx.com

Create Your Custom MVP in Minutes With CosLynxAI!

Developers: Drix10, Kais Radwan Website: CosLynx.com Backed by: Google, Microsoft & Amazon for Startups Finalist: Backdrop Build v4