Skip to content

Project: Track your fitness progress, set goals, and stay motivated with a personalized online dashboard. Created at https://coslynx.com

Notifications You must be signed in to change notification settings

coslynx/FitSphere-hsvdt2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

Repository files navigation

FitSphere-hsvdt2

A web application for fitness enthusiasts to track their progress, set goals, and connect with others.

Developed with the software and tools below.

Framework used Frontend technologies used Backend technology used LLMs used
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 "FitSphere-hsvdt2" that provides a user-friendly platform for fitness enthusiasts to track their progress, set fitness goals, and connect with a supportive community.

πŸ“¦ Features

Feature Description
βš™οΈ Architecture The codebase is structured with a focus on modularity and maintainability, using separate components and directories for different functionalities.
πŸ“„ Documentation The repository includes this README file that provides a detailed overview of the MVP, its features, and instructions for installation and usage.
πŸ”— Dependencies The project utilizes a range of popular libraries and frameworks including React, Next.js, Tailwind CSS, Zustand, Prisma, and Sentry for building a robust and scalable web application.
🧩 Modularity The code is organized into modules for easier maintenance and reusability. This separation allows for focused development and reduced complexity.
πŸ§ͺ Testing Automated tests are implemented to ensure the application's reliability and functionality, using frameworks like Jest or React Testing Library.
⚑️ Performance The application is designed for optimal performance, employing strategies like code splitting, image optimization, and caching to deliver a fast user experience.
πŸ” Security Security is a top priority, with measures implemented for data protection, secure user authentication, and prevention of common vulnerabilities.
πŸ”€ Version Control The project utilizes Git for version control and continuous integration/continuous deployment (CI/CD) tools like GitHub Actions for automated builds and releases.
πŸ”Œ Integrations The application integrates with external services, such as fitness trackers and social media platforms, through APIs for data synchronization and social sharing.
πŸ“Ά Scalability The architecture is designed to scale effectively, accommodating a growing user base and handling increased data volume with ease.

πŸ“‚ Structure

β”œβ”€β”€ app
β”‚   β”œβ”€β”€ layout.tsx
β”‚   β”œβ”€β”€ page.tsx
β”‚   β”œβ”€β”€ components
β”‚   β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”‚   β”œβ”€β”€ Footer.tsx
β”‚   β”‚   β”œβ”€β”€ GoalInput.tsx
β”‚   β”‚   β”œβ”€β”€ ProgressChart.tsx
β”‚   β”‚   β”œβ”€β”€ UserProfile.tsx
β”‚   β”‚   └── ActivityLog.tsx
β”‚   └── api
β”‚       β”œβ”€β”€ goals.ts
β”‚       └── progress.ts
β”œβ”€β”€ components
β”‚   β”œβ”€β”€ Button.tsx
β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”œβ”€β”€ Layout.tsx
β”‚   β”œβ”€β”€ GoalInput.tsx
β”‚   β”œβ”€β”€ ProgressChart.tsx
β”‚   β”œβ”€β”€ SocialShareButton.tsx
β”‚   β”œβ”€β”€ UserProfile.tsx
β”‚   └── ActivityLog.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

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/coslynx/FitSphere-hsvdt2.git
  2. Navigate to the project directory:
    • cd FitSphere-hsvdt2
  3. Install dependencies:
    • npm install

πŸ—οΈ Usage

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

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

βš™οΈ Configuration

  • .env.local: Store environment variables securely for development.
    • NEXT_PUBLIC_API_URL: Store the API endpoint for the backend.
    • NEXTAUTH_URL: Set the URL for NextAuth.js.
    • GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET: Store credentials for Google authentication.
    • FACEBOOK_CLIENT_ID and FACEBOOK_CLIENT_SECRET: Store credentials for Facebook authentication.
    • DATABASE_URL: Store the connection string for the PostgreSQL database.

πŸ“š Examples

  • Create a new goal: Use the Goal Input form to create a new fitness goal, specifying the type, target value, and timeframe.
  • Track progress: Log your workouts, meals, and other activities related to your goals. The application will automatically calculate progress towards your goals and display it on your dashboard.
  • Connect with others: Use the social features to share your achievements, progress, and motivational messages with friends and other members of the community.

🌐 Hosting

πŸš€ Deployment Instructions

To deploy the MVP to a production environment, you can follow these steps:

Vercel

  1. Create a Vercel account (if you don't have one).
  2. Use the Vercel CLI to initialize the project: vercel init
  3. Deploy the project to Vercel: vercel deploy

Netlify

  1. Create a Netlify account (if you don't have one).
  2. Use the Netlify CLI to initialize the project: netlify init
  3. Deploy the project to Netlify: netlify deploy

GitHub Pages

  1. Configure GitHub Pages for your repository.
  2. Build the project for production: npm run build
  3. Deploy the built files to your GitHub Pages branch.

AWS

  1. Create an AWS account (if you don't have one).
  2. Configure an AWS S3 bucket to host static files.
  3. Configure an AWS CloudFront distribution for content delivery.
  4. Build the project for production: npm run build
  5. Deploy the built files to your S3 bucket.

Google Cloud

  1. Create a Google Cloud account (if you don't have one).
  2. Configure a Google Cloud Storage bucket to host static files.
  3. Configure a Google Cloud CDN for content delivery.
  4. Build the project for production: npm run build
  5. Deploy the built files to your Google Cloud Storage bucket.

πŸ”‘ Environment Variables

  • DB_HOST: Database host
  • DB_USER: Database user
  • DB_PASS: Database password
  • JWT_SECRET: Secret key for JWT authentication

πŸ“œ API Documentation

πŸ” Endpoints

  • /api/auth/signup: Create a new user account.
  • /api/auth/login: Log in an existing user.
  • /api/goals: Retrieve a list of user goals.
  • /api/goals/:id: Retrieve a specific goal by ID.
  • /api/goals: Create a new goal.
  • /api/goals/:id: Update a goal by ID.
  • /api/goals/:id: Delete a goal by ID.
  • /api/progress: Retrieve a list of user activity logs.
  • /api/progress/:id: Retrieve a specific activity log by ID.
  • /api/progress: Create a new activity log.
  • /api/progress/:id: Update an activity log by ID.
  • /api/progress/:id: Delete an activity log by ID.

πŸ”’ Authentication

The API uses JWT (JSON Web Token) authentication for secure access.

πŸ“ Examples

  • Create a new goal:
    curl -X POST http://localhost:3000/api/goals \
    -H "Content-Type: application/json" \
    -d '{"type": "Weight Loss", "target": 10, "startDate": "2024-11-01", "endDate": "2024-12-01"}'

πŸ“œ License

This project is licensed under the MIT License.

πŸ‘₯ Authors

  • [Your Name] - [Your Website]
  • [Your GitHub Username] - [Your GitHub Profile]

🌐 CosLynx.com

Create Your Custom MVP in Minutes With CosLynxAI!