Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/coslynx/fitrio-unsr5n

Project: Rapid Prototyping for Concept Validation. Created at https://spectra.codes, which is owned by @Drix10
https://github.com/coslynx/fitrio-unsr5n

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

Last synced: 1 day ago
JSON representation

Project: Rapid Prototyping for Concept Validation. Created at https://spectra.codes, which is owned by @Drix10

Awesome Lists containing this project

README

        




Fitrio-unsr5n


A web-based application for setting, tracking, and achieving fitness goals with a supportive community.


Developed with the software and tools below.



Framework: Next.js
Frontend: TypeScript, HTML, CSS
Backend: Node.js
Database: PostgreSQL
LLMs: Custom, Gemini, OpenAI



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 "Fitrio-unsr5n" that provides a comprehensive solution for users to set, track, and achieve their fitness goals. The platform fosters a sense of community and motivation by enabling users to share their progress with friends and fellow fitness enthusiasts.

## ๐Ÿ“ฆ Features
| | Feature | Description |
|----|--------------------|--------------------------------------------------------------------------------------------------------------------|
| โš™๏ธ | **Architecture** | The codebase follows a modular architectural pattern with separate directories for different functionalities, ensuring easier maintenance and scalability. |
| ๐Ÿ“„ | **Documentation** | The repository includes a README file that provides a detailed overview of the Minimum Viable Product (MVP), its dependencies, and usage instructions.|
| ๐Ÿ”— | **Dependencies** | The codebase relies on various external libraries and packages such as Next.js, React, Zustand, Tailwind CSS, Prisma, and Sentry, which are essential for building and styling the UI components, managing state, and handling external services.|
| ๐Ÿงฉ | **Modularity** | The modular structure allows for easier maintenance and reusability of the code, with separate directories and files for different functionalities such as components, pages, hooks, and utilities.|
| ๐Ÿงช | **Testing** | Implement unit tests using frameworks like Jest or React Testing Library to ensure the reliability and robustness of the codebase. |
| โšก๏ธ | **Performance** | The performance of the system can be optimized based on factors such as the browser and hardware being used. Consider implementing performance optimizations for better efficiency.|
| ๐Ÿ” | **Security** | Enhance security by implementing measures such as input validation, data encryption, and secure communication protocols.|
| ๐Ÿ”€ | **Version Control**| Utilizes Git for version control with GitHub Actions workflow files for automated build and release processes.|
| ๐Ÿ”Œ | **Integrations** | Interacts with browser APIs, external services through HTTP requests, and includes integrations with fitness tracker APIs for automatic data synchronization.|
| ๐Ÿ“ถ | **Scalability** | Design the system to handle increased user load and data volume, utilizing caching strategies and cloud-based solutions for better scalability. |

## ๐Ÿ“‚ Structure

```
Fitrio-unsr5n/
โ”œโ”€โ”€ app/
โ”‚ โ”œโ”€โ”€ components/
โ”‚ โ”‚ โ”œโ”€โ”€ Dashboard/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ GoalCard.js
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ ActivityLog.js
โ”‚ โ”‚ โ”œโ”€โ”€ GoalSetting/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ GoalForm.js
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ GoalTypeDropdown.js
โ”‚ โ”‚ โ”œโ”€โ”€ SocialFeed/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ PostItem.js
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ PostForm.js
โ”‚ โ”‚ โ”œโ”€โ”€ Navigation/
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ NavBar.js
โ”‚ โ”‚ โ””โ”€โ”€ Auth/
โ”‚ โ”‚ โ””โ”€โ”€ Login.js
โ”‚ โ”œโ”€โ”€ pages/
โ”‚ โ”‚ โ”œโ”€โ”€ index.js
โ”‚ โ”‚ โ”œโ”€โ”€ goals.js
โ”‚ โ”‚ โ””โ”€โ”€ profile.js
โ”‚ โ”œโ”€โ”€ hooks/
โ”‚ โ”‚ โ”œโ”€โ”€ useGoal.js
โ”‚ โ”‚ โ”œโ”€โ”€ useActivity.js
โ”‚ โ”‚ โ”œโ”€โ”€ useUser.js
โ”‚ โ”‚ โ””โ”€โ”€ useAuth.js
โ”‚ โ”œโ”€โ”€ layouts/
โ”‚ โ”‚ โ””โ”€โ”€ MainLayout.js
โ”‚ โ”œโ”€โ”€ utils/
โ”‚ โ”‚ โ”œโ”€โ”€ constants.js
โ”‚ โ”‚ โ”œโ”€โ”€ api.js
โ”‚ โ”‚ โ”œโ”€โ”€ helpers.js
โ”‚ โ”‚ โ””โ”€โ”€ validations.js
โ”‚ โ””โ”€โ”€ styles/
โ”‚ โ””โ”€โ”€ globals.css
โ”œโ”€โ”€ prisma/
โ”‚ โ””โ”€โ”€ schema.prisma
โ”œโ”€โ”€ .eslintrc.js
โ”œโ”€โ”€ next.config.js
โ”œโ”€โ”€ tailwind.config.js
โ”œโ”€โ”€ tsconfig.json
โ”œโ”€โ”€ jest.config.js
โ””โ”€โ”€ README.md
```

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

### ๐Ÿš€ Setup Instructions
1. Clone the repository:
- `git clone https://github.com/spectra-ai-codegen/Fitrio-unsr5n.git`
2. Navigate to the project directory:
- `cd Fitrio-unsr5n`
3. Install dependencies:
- `npm install`
4. Set up the database:
- Create a PostgreSQL database instance (using Docker or your preferred method).
- Create a `.env` file in the root directory and configure the following environment variables:
- `DATABASE_URL`: The connection string for your PostgreSQL database.
5. Initialize Prisma:
- `npx prisma init`
- `npx prisma generate`
6. Run the development server:
- `npm run dev`

## ๐Ÿ—๏ธ Usage
### ๐Ÿƒโ€โ™‚๏ธ Running the Minimum Viable Product (MVP)
1. Start the development server (if not already running):
- `npm run dev`
2. Open your browser and navigate to [http://localhost:3000](http://localhost:3000).

### โš™๏ธ Configuration
Adjust configuration settings in `next.config.js`, `tailwind.config.js`, or `.env` file.

### ๐Ÿ“š Examples
- ๐Ÿ“ **Example 1**: Setting a Weight Loss Goal
- Users can create a new goal by selecting "Weight Loss" from the goal type dropdown, entering their target weight, and choosing a start and end date.
- ๐Ÿ“ **Example 2**: Tracking Running Progress
- Users can connect their fitness trackers (e.g., Fitbit, Apple Watch) to automatically log their running activities and visualize their progress in charts and graphs.
- ๐Ÿ“ **Example 3**: Sharing Achievements with Friends
- Users can share their workout updates, achievements, and progress with friends and fellow fitness enthusiasts on the social feed, fostering a supportive community.

## ๐ŸŒ Hosting
### ๐Ÿš€ Deployment Instructions
If applicable, provide details on how to host the Minimum Viable Product (MVP) using various services, such as:

Vercel
Netlify
GitHub Pages
AWS
Google Cloud

#### Vercel
1. Deploy the code:
- `vercel`
2. Follow the prompts to configure the Vercel deployment.

#### Netlify
1. Deploy the code:
- `netlify deploy`
2. Follow the prompts to configure the Netlify deployment.

#### GitHub Pages
1. Create a new GitHub repository with the project code.
2. Go to the repository's settings.
3. Select "Pages" from the left-hand menu.
4. Choose the "Branch" and "Folder" to deploy from (typically "gh-pages" and "docs", respectively).
5. Click "Save" to deploy the project.

#### AWS
1. Create a new AWS account (if you don't have one).
2. Create a new S3 bucket to store the static assets of the project.
3. Create a new CloudFront distribution to serve the content from the S3 bucket.
4. Configure the CloudFront distribution to use the appropriate origin (S3 bucket).
5. Deploy the code to the S3 bucket.

#### Google Cloud
1. Create a new Google Cloud project.
2. Create a new Cloud Storage bucket to store the static assets of the project.
3. Create a new Cloud CDN service to serve the content from the Cloud Storage bucket.
4. Configure the Cloud CDN service to use the appropriate origin (Cloud Storage bucket).
5. Deploy the code to the Cloud Storage bucket.

### ๐Ÿ”‘ Environment Variables
- `NEXT_PUBLIC_SENTRY_DSN`: The DSN for your Sentry project (optional, for error tracking).
- `DATABASE_URL`: The connection string for your PostgreSQL database.

## ๐Ÿ“œ API Documentation
### ๐Ÿ” Endpoints
- **GET /api/goals**: Retrieves a list of user's goals.
- **POST /api/goals**: Creates a new goal for the user.
- **GET /api/goals/:id**: Retrieves a specific goal by its ID.
- **PUT /api/goals/:id**: Updates an existing goal by its ID.
- **DELETE /api/goals/:id**: Deletes a goal by its ID.
- **GET /api/activities**: Retrieves a list of user's activities.
- **POST /api/activities**: Creates a new activity log for the user.
- **GET /api/activities/:id**: Retrieves a specific activity by its ID.
- **PUT /api/activities/:id**: Updates an existing activity by its ID.
- **DELETE /api/activities/:id**: Deletes an activity by its ID.

### ๐Ÿ”’ Authentication
The API uses JWT tokens for authentication.

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

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

## ๐Ÿ‘ฅ Authors
- **Author Name** - [Spectra.codes](https://spectra.codes)
- **Creator Name** - [DRIX10](https://github.com/Drix10)


๐ŸŒ Spectra.Codes


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



Developer: Drix10
Website: Spectra.codes
Backed by: Google, Microsoft & Amazon for Startups
Finalist: Backdrop Build v4