Skip to content

coslynx/fitness-tracker-mvp-social-community-web-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

41 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

fitness-tracker-mvp-social-community-web-app

A web application for setting, tracking, and sharing fitness goals.

Developed with the software and tools below.

Framework used: React Frontend technologies: JavaScript, HTML, CSS Backend framework: 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 contains the source code for a "fitness-tracker-mvp-social-community-web-app", a web application that allows users to set and track fitness goals, monitor progress, and connect with a community of like-minded individuals. It was built using the following technologies:

  • Frontend: React, JavaScript, HTML, CSS
  • Backend: Node.js
  • Database: PostgreSQL
  • Authentication: NextAuth.js with Google OAuth
  • State Management: Zustand
  • API Development: Express.js
  • Error Tracking and Monitoring: Sentry

πŸ“¦ Features

Feature Description
πŸ” User Authentication Secure user login and signup with Google OAuth, enabling users to create accounts and manage their personal data.
🎯 Personalized Goal Setting Users can set and customize their fitness goals, such as weight loss, muscle gain, distance targets, or specific exercise routines.
πŸ“Š Progress Tracking A comprehensive system to track workouts, monitor progress against goals, and analyze performance over time.
πŸ’¬ Social Interaction Features like a social feed, group challenges, and user profiles allow users to connect, share achievements, and motivate each other.
πŸ”Œ Third-Party Integrations The application integrates with popular fitness trackers like Fitbit and Apple Watch to automatically import activity data, providing a more comprehensive picture of user progress.
πŸ“ˆ Data Analytics Users can access personalized analytics dashboards to track their progress, identify patterns, and optimize their training strategies.
🎨 Customizable UI A user-friendly and visually appealing interface with a modern design that is responsive across different devices.
⚑ Performance Optimization The application is optimized for speed and efficiency, ensuring a smooth user experience and minimal load times.
πŸ”’ Data Security Robust security measures, including data encryption, secure authentication, and regular security audits, protect user data and privacy.
πŸš€ Scalability The application is designed to accommodate future growth and expanding user base, ensuring the platform can handle increasing traffic and data storage demands.

πŸ“‚ Structure

fitness-tracker-mvp-social-community-web-app/
β”œβ”€β”€ pages
β”‚   β”œβ”€β”€ api
β”‚   β”‚   β”œβ”€β”€ auth
β”‚   β”‚   β”‚   └── [...nextauth].ts
β”‚   β”‚   β”œβ”€β”€ goals
β”‚   β”‚   β”‚   β”œβ”€β”€ [id].ts
β”‚   β”‚   β”‚   └── index.ts
β”‚   β”‚   β”œβ”€β”€ activities
β”‚   β”‚   β”‚   β”œβ”€β”€ [id].ts
β”‚   β”‚   β”‚   └── index.ts
β”‚   β”‚   └── users
β”‚   β”‚       β”œβ”€β”€ [id].ts
β”‚   β”‚       └── index.ts
β”‚   β”œβ”€β”€ _app.tsx
β”‚   β”œβ”€β”€ _document.tsx
β”‚   β”œβ”€β”€ index.tsx
β”‚   β”œβ”€β”€ dashboard.tsx
β”‚   └── settings.tsx
β”œβ”€β”€ components
β”‚   β”œβ”€β”€ layout
β”‚   β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”‚   β”œβ”€β”€ Footer.tsx
β”‚   β”‚   └── Sidebar.tsx
β”‚   β”œβ”€β”€ ui
β”‚   β”‚   β”œβ”€β”€ Button.tsx
β”‚   β”‚   β”œβ”€β”€ Card.tsx
β”‚   β”‚   β”œβ”€β”€ Input.tsx
β”‚   β”‚   └── Modal.tsx
β”‚   β”œβ”€β”€ features
β”‚   β”‚   β”œβ”€β”€ goals
β”‚   β”‚   β”‚   β”œβ”€β”€ GoalForm.tsx
β”‚   β”‚   β”‚   └── GoalList.tsx
β”‚   β”‚   β”œβ”€β”€ activities
β”‚   β”‚   β”‚   β”œβ”€β”€ ActivityForm.tsx
β”‚   β”‚   β”‚   └── ActivityList.tsx
β”‚   β”‚   └── auth
β”‚   β”‚       β”œβ”€β”€ LoginForm.tsx
β”‚   β”‚       └── SignupForm.tsx
β”œβ”€β”€ lib
β”‚   β”œβ”€β”€ auth
β”‚   β”‚   └── auth.ts
β”‚   β”œβ”€β”€ hooks
β”‚   β”‚   β”œβ”€β”€ useUser.ts
β”‚   β”‚   β”œβ”€β”€ useGoals.ts
β”‚   β”‚   └── useActivities.ts
β”‚   └── utils
β”‚       β”œβ”€β”€ formatters.ts
β”‚       └── validators.ts
β”œβ”€β”€ styles
β”‚   β”œβ”€β”€ globals.css
β”‚   └── theme.ts
β”œβ”€β”€ public
β”‚   β”œβ”€β”€ fonts
β”‚   └── images
β”œβ”€β”€ .env
β”œβ”€β”€ .eslintrc.js
β”œβ”€β”€ next.config.js
β”œβ”€β”€ prisma
β”‚   └── schema.prisma
└── package.json

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/coslynx/fitness-tracker-mvp-social-community-web-app.git
  2. Navigate to the project directory:
    • cd fitness-tracker-mvp-social-community-web-app
  3. Install dependencies:
    • npm install

πŸ—οΈ 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 .env file and create a .env.local file for local development configurations.

πŸ“š Examples

  • πŸ“ Example 1: How to create a fitness goal:

    • Log in to the application.
    • Navigate to the "Goals" section.
    • Click "Add Goal".
    • Enter details like goal type, target value, and timeframe.
    • Submit the form to create the goal.
  • πŸ“ Example 2: How to track a workout:

    • Log in to the application.
    • Navigate to the "Activities" section.
    • Click "Log Activity".
    • Enter workout details like activity type, duration, and calories burned.
    • Submit the form to log the activity.
  • πŸ“ Example 3: How to connect with other users:

    • Log in to the application.
    • Navigate to the "Social Feed" section.
    • View posts from other users, share your achievements, and join group challenges.
    • Follow other users to stay motivated and track their progress.

🌐 Hosting

πŸš€ Deployment Instructions

  1. Deploying to Vercel:

    • Log in to Vercel (or create an account) and choose "New Project".
    • Select the "GitHub" option and connect your GitHub account.
    • Select the fitness-tracker-mvp-social-community-web-app repository.
    • Follow the Vercel deployment instructions to create and deploy your project.
  2. Deploying to Netlify:

    • Log in to Netlify (or create an account) and choose "New site from Git".
    • Select the "GitHub" option and connect your GitHub account.
    • Select the fitness-tracker-mvp-social-community-web-app repository.
    • Follow the Netlify deployment instructions to create and deploy your project.
  3. Deploying to GitHub Pages:

    • Ensure your project has a gh-pages branch.
    • Add the following configuration to your package.json file:
      "homepage": "https://your-username.github.io/fitness-tracker-mvp-social-community-web-app",
      "scripts": {
        "build:gh-pages": "npm run build && npm run build:gh-pages",
        "deploy:gh-pages": "gh-pages -d build"
      }
    • Install gh-pages as a dev dependency:
      npm install --save-dev gh-pages
    • Run the following command to build and deploy to GitHub Pages:
      npm run deploy:gh-pages
  4. Deploying to Heroku:

    • Install the Heroku CLI:
      • npm install -g heroku
    • Login to Heroku:
      • heroku login
    • Create a new Heroku app:
      • heroku create
    • Deploy the code:
      • git push heroku main

πŸ”‘ Environment Variables

  • NEXT_PUBLIC_GOOGLE_CLIENT_ID: Your Google OAuth client ID.
  • NEXT_PUBLIC_GOOGLE_CLIENT_SECRET: Your Google OAuth client secret.
  • DATABASE_URL: Your PostgreSQL database connection string.
  • SENTRY_DSN: Your Sentry DSN for error tracking.

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/users/[id]: Retrieves user data by ID.
  • POST /api/users: Creates a new user account.
  • GET /api/goals: Retrieves a list of goals for the current user.
  • POST /api/goals: Creates a new goal.
  • GET /api/goals/[id]: Retrieves a specific goal by ID.
  • PUT /api/goals/[id]: Updates a goal by ID.
  • DELETE /api/goals/[id]: Deletes a goal by ID.
  • GET /api/activities: Retrieves a list of activities for the current user.
  • POST /api/activities: Creates a new activity.
  • GET /api/activities/[id]: Retrieves a specific activity by ID.
  • PUT /api/activities/[id]: Updates an activity by ID.
  • DELETE /api/activities/[id]: Deletes an activity by ID.

πŸ”’ Authentication

Use JWT tokens for authentication.

πŸ“ Examples

  • curl -X GET http://localhost:3000/api/goals
  • curl -X POST http://localhost:3000/api/activities -H "Content-Type: application/json" -d '{"type": "Running", "duration": 30, "caloriesBurned": 200}'

πŸ“œ 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 of the repository: fitness-tracker-mvp-social-community-web-app

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