Skip to content

Project: Core Feature Implementation for Initial User Testing. Created at https://spectra.codes, which is owned by @Drix10

Notifications You must be signed in to change notification settings

coslynx/fitness-journey-platform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

fitness-journey-platform

A comprehensive web application for fitness enthusiasts to manage their fitness journey, set goals, track progress, and connect with a supportive community.

Developed with the software and tools below.

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 Minimum Viable Product (MVP) for a web application named "fitness-journey-platform," designed to empower fitness enthusiasts by providing a platform to manage their fitness journey. This MVP leverages a robust technology stack including React, TypeScript, Next.js, Express.js, PostgreSQL, and Tailwind CSS. It prioritizes user-centric design, seamless integration, and robust functionality.

πŸ“¦ Features

Feature Description
🎯 Goal Setting Users can define personalized fitness goals (e.g., weight loss, muscle gain) with target dates and track their progress towards them.
πŸ‹οΈ Workout Tracking Users can log their workouts, including details like type, duration, intensity, and calories burned.
🍽️ Meal Tracking Users can track their daily meals, logging calorie content, macronutrients, and food type to monitor their dietary intake.
πŸ‘₯ Social Sharing Users can connect with friends and fellow fitness enthusiasts, share their progress updates, and motivate each other.
✨ User Interface A visually appealing and user-friendly interface built with React and Tailwind CSS ensures a smooth and intuitive user experience.
πŸ” Authentication Secure user authentication is implemented using NextAuth.js, allowing users to log in using email/password or social media accounts.
πŸ—ƒοΈ Data Storage User data, workout logs, and meal information are securely stored in a PostgreSQL database.
πŸ“ˆ Progress Visualization The application utilizes data visualization techniques to display user progress towards their goals in an easy-to-understand manner.
🌐 Scalability The application is designed to handle increased user demand and data volume, ensuring efficient performance and stability.

πŸ“‚ Structure

fitness-journey-platform/
β”œβ”€β”€ pages
β”‚   β”œβ”€β”€ api
β”‚   β”‚   β”œβ”€β”€ workouts.ts
β”‚   β”‚   └── meals.ts
β”‚   β”œβ”€β”€ workout-log
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ meal-tracker
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ profile
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ settings
β”‚   β”‚   └── page.tsx
β”‚   β”œβ”€β”€ goals
β”‚   β”‚   └── page.tsx
β”‚   └── index.tsx
β”œβ”€β”€ components
β”‚   β”œβ”€β”€ Header.tsx
β”‚   β”œβ”€β”€ Footer.tsx
β”‚   β”œβ”€β”€ Navigation.tsx
β”‚   β”œβ”€β”€ GoalCard.tsx
β”‚   β”œβ”€β”€ WorkoutCard.tsx
β”‚   β”œβ”€β”€ MealCard.tsx
β”‚   β”œβ”€β”€ ProgressChart.tsx
β”‚   β”œβ”€β”€ SocialFeed.tsx
β”‚   β”œβ”€β”€ UserCard.tsx
β”‚   └── LoginForm.tsx
β”œβ”€β”€ styles
β”‚   β”œβ”€β”€ globals.css
β”‚   └── themes.css
β”œβ”€β”€ prisma
β”‚   β”œβ”€β”€ schema.prisma
β”‚   └── migrations
β”‚       └── 20231027123412_init
β”‚           β”œβ”€β”€ migration.sql
β”‚           └── _meta.json
β”œβ”€β”€ utils
β”‚   β”œβ”€β”€ db.ts
β”‚   β”œβ”€β”€ auth.ts
β”‚   └── helpers.ts
β”œβ”€β”€ next.config.mjs
β”œβ”€β”€ tailwind.config.js
β”œβ”€β”€ postcss.config.mjs
β”œβ”€β”€ tsconfig.json
└── README.md

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js (LTS version recommended)
  • npm or yarn

πŸš€ Setup Instructions

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

πŸ—οΈ Usage

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

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

βš™οΈ Configuration

  • Environment Variables: Set environment variables for database connection details (e.g., DATABASE_URL, DATABASE_USER, DATABASE_PASSWORD) in a .env file at the root of the project.

πŸ“š Examples

  • Setting a Weight Loss Goal: Users can input their desired weight loss target, timeframe, and track their progress through workout and meal logging.
  • Tracking Workout Progress: Users can record details of their workouts (e.g., duration, type, intensity) and view their progress over time.
  • Sharing a Fitness Achievement: Users can share their achievements (e.g., new personal best) with friends and followers within the social feed.

🌐 Hosting

πŸš€ Deployment Instructions

Vercel

  1. Login to your Vercel account.
  2. Import the project using the Vercel CLI or their website.
  3. Configure environment variables for your database connection.
  4. Deploy the application.

Netlify

  1. Login to your Netlify account.
  2. Import the project using the Netlify CLI or their website.
  3. Configure environment variables for your database connection.
  4. Deploy the application.

Heroku

  1. Install the Heroku CLI: npm install -g heroku
  2. Login to Heroku: heroku login
  3. Create a new Heroku app: heroku create
  4. Set environment variables for your database connection.
  5. Deploy the application: git push heroku main

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/workouts: Retrieves a list of user's workouts.
  • POST /api/workouts: Creates a new workout entry.
  • GET /api/meals: Retrieves a list of user's meals.
  • POST /api/meals: Creates a new meal entry.
  • GET /api/users: Retrieves user data.
  • POST /api/users: Creates a new user account.

πŸ”’ Authentication

  • The API uses JSON Web Tokens (JWT) for user authentication.
  • Users can authenticate using email/password or social media logins via NextAuth.js.

πŸ“ Examples

# Retrieve user's workouts
curl -X GET http://localhost:3000/api/workouts

# Create a new workout entry
curl -X POST http://localhost:3000/api/workouts -H "Content-Type: application/json" -d '{"name": "Running", "duration": 30, "intensity": "Moderate"}'

πŸ“œ License

This project is licensed under the GNU AGPLv3.

πŸ‘₯ Authors

🌐 Spectra.Codes

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