Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coslynx/fitness-tracker-personalized-mvp
Project: Track fitness goals, log workouts, and share progress with friends. Created at https://coslynx.com
https://github.com/coslynx/fitness-tracker-personalized-mvp
api-integration code-generation data-analytics developer-tools devops fitness-tracker goal-setting machine-learning mvp mvp-development nextjs postgresql prisma progress-tracking social-sharing software-development tailwindcss typescript user-authentication zustand
Last synced: about 1 month ago
JSON representation
Project: Track fitness goals, log workouts, and share progress with friends. Created at https://coslynx.com
- Host: GitHub
- URL: https://github.com/coslynx/fitness-tracker-personalized-mvp
- Owner: coslynx
- Created: 2024-09-12T03:49:45.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T03:56:02.000Z (4 months ago)
- Last Synced: 2024-11-10T04:07:43.420Z (2 months ago)
- Topics: api-integration, code-generation, data-analytics, developer-tools, devops, fitness-tracker, goal-setting, machine-learning, mvp, mvp-development, nextjs, postgresql, prisma, progress-tracking, social-sharing, software-development, tailwindcss, typescript, user-authentication, zustand
- Language: TypeScript
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
fitness-tracker-personalized-mvpA personalized fitness tracker built with React and Node.js, providing goal setting, progress tracking, and a social community feature.
Developed with the software and tools below.
## ๐ Table of Contents
- ๐ Overview
- ๐ฆ Features
- ๐ Structure
- ๐ป Installation
- ๐๏ธ Usage
- ๐ Hosting
- ๐ License
- ๐ Authors## ๐ Overview
The repository contains a Minimum Viable Product (MVP) called "fitness-tracker-personalized-mvp" that provides a comprehensive solution using the following tech stack: React, JavaScript, HTML, CSS, Node.js, PostgreSQL, and NextAuth.js.## ๐ฆ 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 MVP, its dependencies, and usage instructions.|
| ๐ | **Dependencies** | The codebase relies on various external libraries and packages such as React, Zustand, NextAuth.js, Tailwind CSS, and Prisma, which are essential for building and styling the UI components, handling user authentication, and interacting with the database.|
| ๐งฉ | **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, styles, and utils.|
| ๐งช | **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** | The application integrates with external services through HTTP requests, and includes features like user authentication and database interactions.|
| ๐ถ | **Scalability** | Design the system to handle increased user load and data volume, utilizing caching strategies and cloud-based solutions for better scalability. |## ๐ Structure
```text
โโโ 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```
## ๐ป Installation
### ๐ง Prerequisites
- Node.js
- npm
- Docker### ๐ Setup Instructions
1. Clone the repository:
- `git clone https://github.com/coslynx/fitness-tracker-personalized-mvp.git`
2. Navigate to the MVP directory:
- `cd fitness-tracker-personalized-mvp`
3. Install dependencies:
- `npm install`
4. Set up environment variables:
- Create a `.env` file in the root directory and add the following:
```
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=YOUR_SECRET_KEY
DATABASE_URL=postgres://username:password@localhost:5432/database_name
```
Replace `YOUR_SECRET_KEY` with a strong secret key and replace the database details accordingly.
5. Start the development server:
- `npm run dev`
6. Open your browser and navigate to [http://localhost:3000](http://localhost:3000).## ๐๏ธ Usage
### ๐โโ๏ธ Running the MVP
1. Start the development server:
- `npm run dev`
2. Open your browser and navigate to [http://localhost:3000](http://localhost:3000).### โ๏ธ Configuration
Adjust configuration settings in `next-auth.config.ts` or `.env`.### ๐ Examples
- ๐ **Example 1**: Create a new fitness goal by clicking on the "Create Goal" button on the dashboard. Enter the goal details (name, target, deadline) and submit the form. The new goal will be saved to your profile.
- ๐ **Example 2**: Log a workout by clicking on the "Log Workout" button on the dashboard. Select the activity type, duration, and intensity, and submit the workout log. This data will be used to track your progress towards your fitness goals.
- ๐ **Example 3**: Share your workout progress with your friends by clicking on the "Share" button next to a workout entry. Select the social media platform you want to share on.## ๐ Hosting
### ๐ Deployment Instructions
#### Vercel
1. Create a Vercel account.
2. Install the Vercel CLI: `npm install -g vercel`
3. Log in to Vercel: `vercel login`
4. Deploy the project: `vercel`#### Netlify
1. Create a Netlify account.
2. Install the Netlify CLI: `npm install -g netlify-cli`
3. Log in to Netlify: `netlify login`
4. Deploy the project: `netlify init`#### GitHub Pages
1. Create a new branch named `gh-pages` in your repository.
2. Build the application for production: `npm run build`
3. Move the built files to the `gh-pages` branch: `mv out/* gh-pages/`
4. Commit and push the changes: `git add . && git commit -m "Deploy to GitHub Pages" && git push origin gh-pages`
5. Go to your repository settings on GitHub and configure GitHub Pages to use the `gh-pages` branch.### ๐ Environment Variables
- `NEXTAUTH_URL`: The URL of your deployed application (e.g., `https://your-app.vercel.app`).
- `NEXTAUTH_SECRET`: A secret key used for authentication. You can generate a random key or use a secure key from a service like `random.org`.
- `DATABASE_URL`: The connection string for your PostgreSQL database.## ๐ API Documentation
### ๐ Endpoints
- **GET /api/auth/session**: Fetches the current user's session data.
- **POST /api/auth/login**: Authenticates a user with email and password.
- **POST /api/auth/signup**: Creates a new user account.
- **POST /api/goals**: Creates a new fitness goal.
- **GET /api/goals**: Retrieves a list of fitness goals for the current user.
- **PUT /api/goals/:id**: Updates an existing fitness goal.
- **DELETE /api/goals/:id**: Deletes a fitness goal.
- **POST /api/workouts**: Logs a new workout.
- **GET /api/workouts**: Retrieves a list of workout logs for the current user.### ๐ Authentication
The application uses NextAuth.js for secure user authentication and session management.### ๐ Examples
- `curl -X GET http://localhost:3000/api/auth/session`## ๐ License
This MVP is licensed under the [MIT License](https://choosealicense.com/licenses/mit/).## ๐ฅ Authors
- **Author Name** - [CosLynx.com](https://coslynx.com)
- **Creator Name** - [CosLynxAI](https://github.com/coslynx)
๐ CosLynx.com
Create Your Custom MVP in Minutes With CosLynxAI!