Skip to content

Project: Track fitness goals, share progress, and stay motivated with friends. Created at https://coslynx.com

Notifications You must be signed in to change notification settings

coslynx/FitLog-qwtfzh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

FitTrack

A collaborative fitness tracker MVP that empowers users to achieve their goals together.

Developed with the software and tools below.

Framework - Next.js Frontend - Javascript, Html, Css Backend - Node.js Database - MongoDB
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 FitTrack Minimum Viable Product (MVP), a web application designed to enhance the fitness journey by connecting individuals through collaborative goal setting, progress tracking, and social interaction.

πŸ“¦ Features

Feature Description
βš™οΈ Architecture The codebase is structured using a modular architecture, separating functionalities into distinct directories, promoting maintainability and scalability.
πŸ“„ Documentation Comprehensive README.md file outlines project details, instructions, and essential information for developers and users.
πŸ”— Dependencies Utilizes essential libraries like React, Next.js, Tailwind CSS, Zustand, Express.js, Mongoose, NextAuth.js, and others to ensure seamless functionality.
🧩 Modularity The code is structured for modularity, with dedicated directories for components, pages, and utilities, promoting code reuse and manageability.
πŸ§ͺ Testing Implemented unit tests using Jest and integration tests using Cypress to ensure code quality and functionality.
⚑️ Performance The application incorporates performance optimization techniques, such as caching and lazy loading, to deliver a smooth user experience.
πŸ” Security Employs robust security measures, including input validation, authentication, and authorization, to safeguard user data and application integrity.
πŸ”€ Version Control Uses Git for version control with a clear branching strategy, allowing for efficient collaboration and code management.
πŸ”Œ Integrations Seamlessly integrates with popular fitness trackers like Fitbit, Garmin, and Apple Watch through their respective APIs.
πŸ“Ά Scalability Designed with scalability in mind, using a cloud-based architecture and techniques like database sharding and serverless functions for handling increased user traffic.

πŸ“‚ Structure

β”œβ”€β”€ 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

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/coslynx/FitTrack-qwtfzh.git
  2. Navigate to the project directory:
    • cd FitTrack-qwtfzh
  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 next.config.js or .env.

πŸ“š Examples

  • πŸ“ Example 1: Creating a Goal - The user can set a specific weight loss goal, define the desired weight, and set a deadline for achieving the target.
  • πŸ“ Example 2: Tracking Progress - The user can connect their Fitbit account and automatically track their daily steps, calories burned, and other fitness metrics.
  • πŸ“ Example 3: Sharing Progress - The user can share their progress on their social feed, join fitness groups with like-minded individuals, and encourage each other through motivational messages.

🌐 Hosting

πŸš€ Deployment Instructions

Vercel

  1. Login to your Vercel account.
  2. Choose "New Project" from the dashboard.
  3. Select "Import Git Repository" and provide the link to the GitHub repository.
  4. Configure any deployment settings as required.
  5. Click "Deploy."

Netlify

  1. Create a Netlify account.
  2. Select "New site from Git."
  3. Connect your GitHub account and select the "FitTrack-qwtfzh" repository.
  4. Configure any deployment settings as required.
  5. Click "Deploy."

GitHub Pages

  1. Navigate to the GitHub repository's Settings.
  2. Under "Pages," select a branch to deploy.
  3. Choose the "root" directory for deployment.
  4. Click "Save."

Heroku

  1. Install the Heroku CLI:
    • npm install -g heroku
  2. Log in to Heroku:
    • heroku login
  3. Create a new Heroku app:
    • heroku create
  4. Deploy the code:
    • git push heroku main

πŸ”‘ Environment Variables

  • DATABASE_URL: The connection string for the MongoDB Atlas database.

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/auth/signup: Creates a new user account.
  • GET /api/auth/login: Logs in an existing user.
  • GET /api/auth/logout: Logs out the current user.
  • GET /api/goals: Retrieves all goals for the current user.
  • POST /api/goals: Creates a new goal for the current user.
  • PUT /api/goals/:id: Updates an existing goal.
  • DELETE /api/goals/:id: Deletes a goal.
  • GET /api/progress/:userId: Retrieves progress data for a specific user.
  • POST /api/progress/:goalId: Records new progress data for a specific goal.
  • PUT /api/progress/:id: Updates existing progress data.
  • DELETE /api/progress/:id: Deletes progress data.

πŸ”’ Authentication

Uses JWT tokens for authentication, provided by NextAuth.js

πŸ“ Examples

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

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘₯ Authors

🌐 CosLynx.com

Create Your Custom MVP in Minutes With CosLynxAI!