A comprehensive web application for fitness enthusiasts to manage their fitness journey, set goals, track progress, and connect with a supportive community.
- π Overview
- π¦ Features
- π Structure
- π» Installation
- ποΈ Usage
- π Hosting
- π License
- π Authors
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.
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. |
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
- Node.js (LTS version recommended)
- npm or yarn
- Clone the repository:
git clone https://github.com/spectra-ai-codegen/fitness-journey-platform.git
- Navigate to the project directory:
cd fitness-journey-platform
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to http://localhost:3000.
- 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.
- 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.
- Login to your Vercel account.
- Import the project using the Vercel CLI or their website.
- Configure environment variables for your database connection.
- Deploy the application.
- Login to your Netlify account.
- Import the project using the Netlify CLI or their website.
- Configure environment variables for your database connection.
- Deploy the application.
- Install the Heroku CLI:
npm install -g heroku
- Login to Heroku:
heroku login
- Create a new Heroku app:
heroku create
- Set environment variables for your database connection.
- Deploy the application:
git push heroku main
- 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.
- The API uses JSON Web Tokens (JWT) for user authentication.
- Users can authenticate using email/password or social media logins via NextAuth.js.
# 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"}'
This project is licensed under the GNU AGPLv3.
- Author Name - Spectra.codes
- Creator Name - DRIX10
Why only generate Code? When you can generate the whole Repository!