Skip to content

coslynx/fitness-tracker-community-mvp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


fitness-tracker-community-mvp

Web application MVP for fitness enthusiasts to set, track, and share fitness goals.

Developed with the software and tools below.

Framework: Next.js Frontend: Javascript, Html, Css Backend: Node.js LLMs: Custom, Gemini, OpenAI

git-last-commit GitHub commit activity GitHub top language

πŸ“‘ Table of Contents

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

πŸ“ Overview

The repository contains a Minimum Viable Product (MVP) called "fitness-tracker-community-mvp" that provides a web application for fitness enthusiasts to set, track, and share their fitness goals. It utilizes a robust tech stack including Next.js for the frontend, Node.js for the backend, and powerful LLMs like Gemini and OpenAI for advanced features.

πŸ“¦ Features

Feature Description
βš™οΈ Architecture The codebase follows a modular architectural pattern, organized into separate directories for different functionalities, ensuring easier maintenance and scalability.
πŸ“„ Documentation The repository includes a comprehensive README file that provides detailed insights into the MVP, its dependencies, and step-by-step usage instructions.
πŸ”— Dependencies The codebase relies on a variety of external libraries and packages, including Next.js, React, Tailwind CSS, Prisma, and NextAuth.js, for UI components, data management, authentication, and more.
🧩 Modularity The modular structure promotes easier maintenance and reusability of the code, with separate directories and files for different functionalities such as pages, components, and API routes.
πŸ§ͺ Testing The application incorporates unit tests to ensure the reliability and robustness of the codebase.
⚑️ Performance The system prioritizes performance by using optimized frameworks like Next.js and employing caching strategies to enhance the user experience.
πŸ” Security Security is paramount, with measures like input validation, data encryption, and secure communication protocols implemented to safeguard user information.
πŸ”€ Version Control Utilizes Git for version control with a dedicated GitHub Actions workflow for automated build and release processes.
πŸ”Œ Integrations The application seamlessly integrates with popular fitness trackers and social media platforms for a comprehensive experience.
πŸ“Ά Scalability The system is designed with scalability in mind, utilizing efficient database management and cloud-based solutions to handle increasing user load and data volume.

πŸ“‚ Structure

β”œβ”€β”€ app
β”‚   β”œβ”€β”€ dashboard
β”‚   β”‚   β”œβ”€β”€ page.js
β”‚   β”‚   └── layout.js
β”‚   β”œβ”€β”€ goals
β”‚   β”‚   β”œβ”€β”€ page.js
β”‚   β”‚   └── layout.js
β”‚   β”œβ”€β”€ workouts
β”‚   β”‚   β”œβ”€β”€ page.js
β”‚   β”‚   └── layout.js
β”‚   β”œβ”€β”€ friends
β”‚   β”‚   β”œβ”€β”€ page.js
β”‚   β”‚   └── layout.js
β”‚   β”œβ”€β”€ layout
β”‚   β”‚   └── layout.js
β”‚   β”œβ”€β”€ globals.css
β”‚   └── favicon.ico
β”œβ”€β”€ components
β”‚   β”œβ”€β”€ GoalForm.jsx
β”‚   β”œβ”€β”€ GoalItem.jsx
β”‚   β”œβ”€β”€ WorkoutForm.jsx
β”‚   β”œβ”€β”€ WorkoutItem.jsx
β”‚   β”œβ”€β”€ FriendItem.jsx
β”‚   β”œβ”€β”€ ProgressChart.jsx
β”‚   β”œβ”€β”€ Navbar.jsx
β”‚   └── Footer.jsx
β”œβ”€β”€ pages
β”‚   β”œβ”€β”€ api
β”‚   β”‚   β”œβ”€β”€ auth
β”‚   β”‚   β”‚   └── [...nextauth].js
β”‚   β”‚   β”œβ”€β”€ goals
β”‚   β”‚   β”‚   └── route.js
β”‚   β”‚   β”œβ”€β”€ workouts
β”‚   β”‚   β”‚   └── route.js
β”‚   β”‚   β”œβ”€β”€ friends
β”‚   β”‚   β”‚   └── route.js
β”‚   β”‚   └── users
β”‚   β”‚       └── route.js
β”‚   └── _app.jsx
β”œβ”€β”€ prisma
β”‚   β”œβ”€β”€ schema.prisma
β”‚   └── migrations
β”‚       └── 20231026172907_init
β”‚           └── migration.sql
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ vite.config.js
β”œβ”€β”€ postcss.config.cjs
β”œβ”€β”€ package.json
└── README.md

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker (Optional, for database setup)

πŸš€ Setup Instructions

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

πŸ—οΈ Usage

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

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

βš™οΈ Configuration

Adjust configuration settings in tailwind.config.js, .env, and prisma/schema.prisma.

πŸ“š Examples

  • πŸ“ Example 1: Setting a new fitness goal:
    • Navigate to the "Goals" page.
    • Enter the goal name, target date, and desired outcome.
    • Click "Create Goal."
  • πŸ“ Example 2: Tracking workouts:
    • Navigate to the "Workouts" page.
    • Log your workouts by selecting the exercise type, duration, and date.
    • View your workout history.
  • πŸ“ Example 3: Connecting with friends:
    • Navigate to the "Friends" page.
    • Search for and add friends.
    • Share your progress with friends and join group challenges.

🌐 Hosting

πŸš€ Deployment Instructions

Vercel

  1. Create a new Vercel project: https://vercel.com/new
  2. Import this repository.
  3. Configure environment variables.
  4. Deploy your project.

Netlify

  1. Create a new Netlify site: https://app.netlify.com/start
  2. Connect your GitHub repository.
  3. Configure environment variables.
  4. Deploy your project.

GitHub Pages

  1. Configure a GitHub Pages branch.
  2. Build the project using npm run build.
  3. Deploy the built files to the GitHub Pages branch.

AWS

  1. Create an AWS account.
  2. Set up an S3 bucket for static website hosting.
  3. Configure a CloudFront distribution to serve the content.
  4. Deploy the built files to the S3 bucket.

Google Cloud

  1. Create a Google Cloud project.
  2. Create a Cloud Storage bucket for static website hosting.
  3. Configure a Cloud CDN to serve the content.
  4. Deploy the built files to the Cloud Storage bucket.

πŸ”‘ Environment Variables

  • NEXTAUTH_URL: Your application URL.
  • NEXTAUTH_SECRET: Your application secret.
  • DATABASE_URL: Your database URL.

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/users: Retrieves a list of users.
  • POST /api/users: Creates a new user.
  • GET /api/goals: Retrieves a list of goals for a specific user.
  • POST /api/goals: Creates a new goal for a specific user.
  • GET /api/workouts: Retrieves a list of workouts for a specific user.
  • POST /api/workouts: Creates a new workout for a specific user.
  • GET /api/friends: Retrieves a list of friends for a specific user.
  • POST /api/friends: Adds a new friend for a specific user.

πŸ”’ Authentication

NextAuth.js is used for handling authentication.

πŸ“ Examples

  • curl -X GET http://localhost:3000/api/goals

πŸ“œ License

This MVP is licensed under the GNU AGPLv3.

πŸ‘₯ Authors

🌐 Spectra.Codes

Why only generate Code? When you can generate the whole Repository!

Developer: Drix10 Website: Spectra.codes Backed by: Google, Microsoft & Amazon for Startups Finalist: Backdrop Build v4