Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/coslynx/fitness-goals-web-app

Project: Simple fitness tracker with goal setting, progress logging, and basic analytics. Created at https://coslynx.com
https://github.com/coslynx/fitness-goals-web-app

api-integration code-generation developer-tools devops fitness-community fitness-tracker goal-setting machine-learning motivation-app mvp nextjs postgresql progress-tracking react social-fitness software-development supabase tailwindcss typescript workout-logging

Last synced: about 3 hours ago
JSON representation

Project: Simple fitness tracker with goal setting, progress logging, and basic analytics. Created at https://coslynx.com

Awesome Lists containing this project

README

        




fitness-goals-web-app


A web application that empowers 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 for development


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-goals-web-app" that provides a comprehensive solution for fitness enthusiasts. This application utilizes a robust technology stack including React, Next.js, TypeScript, Tailwind CSS, Supabase, and custom LLMs like Gemini and OpenAI.

## ๐Ÿ“ฆ Features
| | Feature | Description |
|----|--------------------|--------------------------------------------------------------------------------------------------------------------|
| โš™๏ธ | **Architecture** | The codebase follows a modular architectural pattern, separating functionalities into distinct directories for easier maintenance and scalability. |
| ๐Ÿ“„ | **Documentation** | This README file provides a comprehensive overview of the MVP, including installation instructions, usage guides, and detailed explanations. |
| ๐Ÿ”— | **Dependencies** | The application leverages various external libraries and packages, such as React, Next.js, Zustand, and Tailwind CSS, to provide a seamless user experience. |
| ๐Ÿงฉ | **Modularity** | The code is structured with separate components, pages, and utilities, promoting code reusability and simplifying future development. |
| ๐Ÿงช | **Testing** | The codebase includes unit tests to ensure the reliability and robustness of the application's core functionalities. |
| โšก๏ธ | **Performance** | The application prioritizes performance, utilizing caching strategies and optimized code to deliver a fast and responsive user experience. |
| ๐Ÿ” | **Security** | Security is a top priority, with measures like input validation, data encryption, and secure authentication implemented to protect user data. |
| ๐Ÿ”€ | **Version Control**| Git is used for version control, while GitHub Actions automate build and release processes, ensuring a streamlined development workflow. |
| ๐Ÿ”Œ | **Integrations** | The application integrates with various external services like Supabase for database management, Google OAuth for authentication, and fitness trackers via APIs. |
| ๐Ÿ“ถ | **Scalability** | The application is designed for scalability, using a serverless backend and cloud-based database to handle increasing user traffic and data storage. |

## ๐Ÿ“‚ Structure
```text
fitness-goals-web-app
โ”œโ”€โ”€ public
โ”‚ โ””โ”€โ”€ favicon.ico
โ”œโ”€โ”€ src
โ”‚ โ”œโ”€โ”€ 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
โ”‚ โ””โ”€โ”€ tsconfig.json
โ””โ”€โ”€ vite.config.js
```

## ๐Ÿ’ป Installation
### ๐Ÿ”ง Prerequisites
- Node.js
- npm
- Docker

### ๐Ÿš€ Setup Instructions
1. Clone the repository:
- `git clone https://github.com/coslynx/fitness-goals-web-app.git`
2. Navigate to the project directory:
- `cd fitness-goals-web-app`
3. Install dependencies:
- `npm install`

## ๐Ÿ—๏ธ Usage
### ๐Ÿƒโ€โ™‚๏ธ Running the Application
1. Start the development server:
- `npm start`
2. Open your browser and navigate to [http://localhost:3000](http://localhost:3000).

### โš™๏ธ Configuration
Adjust configuration settings in `.env` or `next.config.js` as needed.

### ๐Ÿ“š Examples
- **๐Ÿ“ Example 1**: How to Set a Fitness Goal:
- Navigate to the "Goals" section.
- Click the "Add Goal" button.
- Enter the details of your goal, including the type (weight loss, distance running, etc.), target date, and any additional information.
- Click "Save Goal" to create the goal.
- **๐Ÿ“ Example 2**: How to Record a Workout:
- Navigate to the "Progress" section.
- Click the "Log Workout" button.
- Select the type of workout (cardio, strength training, etc.).
- Enter the duration and intensity of your workout.
- Click "Save Workout" to record your activity.
- **๐Ÿ“ Example 3**: How to Connect with Others:
- Navigate to the "Social" section.
- Search for other users to follow.
- Share your progress updates and achievements.
- Leave comments and provide encouragement to other users.

## ๐ŸŒ Hosting
### ๐Ÿš€ Deployment Instructions
#### Vercel
1. Log in to your Vercel account.
2. Click "New Project" and select "Import from Git".
3. Enter the repository URL: `https://github.com/coslynx/fitness-goals-web-app.git`.
4. Select the branch you want to deploy.
5. Click "Deploy".

#### Netlify
1. Log in to your Netlify account.
2. Click "New site from Git".
3. Enter the repository URL: `https://github.com/coslynx/fitness-goals-web-app.git`.
4. Select the branch you want to deploy.
5. Click "Deploy".

#### GitHub Pages
1. Navigate to the repository's settings page on GitHub.
2. Select "Pages" from the left-hand menu.
3. Choose the source branch and directory.
4. Click "Save".

#### Other Hosting Services
Refer to the specific documentation for your chosen hosting service to deploy the application.

### ๐Ÿ”‘ Environment Variables
- `NEXT_PUBLIC_SUPABASE_URL`: Your Supabase URL (obtain from Supabase project settings).
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`: Your Supabase Anonymous Key (obtain from Supabase project settings).

## ๐Ÿ“œ API Documentation
### ๐Ÿ” Endpoints
- **GET /api/auth/session**: Retrieves the current user session information.
- **POST /api/auth/signin**: Initiates the sign-in process using Google OAuth.
- **POST /api/auth/signout**: Logs out the current user.
- **GET /api/goals**: Retrieves a list of user goals.
- **POST /api/goals**: Creates a new goal for the user.
- **PUT /api/goals/:id**: Updates an existing goal.
- **DELETE /api/goals/:id**: Deletes a goal.
- **GET /api/progress**: Retrieves the user's workout progress.
- **POST /api/progress**: Records a new workout.

### ๐Ÿ”’ Authentication
The application uses Google OAuth for user authentication. After successfully signing in, a session token is issued and used to secure subsequent API requests.

### ๐Ÿ“ Examples
- `curl -X GET http://localhost:3000/api/goals`

## ๐Ÿ“œ License
This project is licensed under the [MIT](https://choosealicense.com/licenses/mit/) License.

## ๐Ÿ‘ฅ Authors
- **CosLynxAI** - [https://github.com/coslynx](https://github.com/coslynx)


๐ŸŒ CosLynx.com


Create Your Custom MVP in Minutes With CosLynxAI!