Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coslynx/fitness-tracker-mvp-personalized
Track fitness goals, share progress, and motivate yourself and friends... Created at https://coslynx.com
https://github.com/coslynx/fitness-tracker-mvp-personalized
code-generation developer-tools devops fitness-tracker goal-setting machine-learning mvp mvp-development next-js postgresql prisma progress-monitoring react social-community software-development tailwindcss typescript user-authentication workout-tracking zustand
Last synced: 15 days ago
JSON representation
Track fitness goals, share progress, and motivate yourself and friends... Created at https://coslynx.com
- Host: GitHub
- URL: https://github.com/coslynx/fitness-tracker-mvp-personalized
- Owner: coslynx
- Created: 2024-09-14T13:50:21.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T13:53:46.000Z (2 months ago)
- Last Synced: 2024-10-16T12:16:17.588Z (30 days ago)
- Topics: code-generation, developer-tools, devops, fitness-tracker, goal-setting, machine-learning, mvp, mvp-development, next-js, postgresql, prisma, progress-monitoring, react, social-community, software-development, tailwindcss, typescript, user-authentication, workout-tracking, zustand
- Language: TypeScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Fitness-Tracker-MVP-PersonalizedA user-centric platform for personalized fitness tracking and a thriving community
Developed with the software and tools below.
## 📑 Table of Contents
- 📍 Overview
- 📦 Features
- 📂 Structure
- 💻 Installation
- 🏗️ Usage
- 🌐 Hosting
- 📄 License
- 👏 Authors## 📍 Overview
This repository houses a Minimum Viable Product (MVP) for a Fitness Tracker application. The MVP is designed to empower users with personalized goal setting, detailed progress tracking, and a vibrant social community.The project leverages a modern tech stack, including:
- **Frontend:** React, Next.js, Tailwind CSS
- **Backend:** Node.js, Express.js
- **Database:** PostgreSQL
- **State Management:** Zustand
- **Authentication:** NextAuth.js## 📦 Features
| | Feature | Description |
|----|--------------------|--------------------------------------------------------------------------------------------------------------------|
| 🔐 | **User Authentication** | Secure login and signup using email and password, with support for potential social login integrations in future iterations. |
| 🎯 | **Goal Setting** | Users can create personalized fitness goals with specific targets, deadlines, and measurable metrics. |
| 📊 | **Progress Tracking** | Track workout logs, including activity type, duration, calories burned, and other relevant metrics. |
| 📈 | **Data Visualization** | Visualize progress towards goals using charts and graphs for a clear understanding of achievements. |
| 💬 | **Social Sharing** | Share workout logs and progress updates with friends and followers to build motivation and accountability within a community. |## 📂 Structure
```text
Fitness-Tracker-MVP-Personalized
├── src
│ ├── components
│ │ ├── Button.tsx
│ │ ├── Header.tsx
│ │ ├── Layout.tsx
│ │ ├── GoalInput.tsx
│ │ ├── ProgressChart.tsx
│ │ └── SocialShareButton.tsx
│ ├── pages
│ │ ├── _app.tsx
│ │ ├── index.tsx
│ │ ├── dashboard.tsx
│ │ └── login.tsx
│ │ └── index.tsx
│ ├── styles
│ │ └── global.css
│ ├── utils
│ │ ├── helpers.ts
│ │ ├── api.ts
│ │ ├── auth.ts
│ │ └── validation.ts
│ └── config
│ └── next-auth.config.ts
└── middleware
└── authentication.ts```
## 💻 Installation
### 🔧 Prerequisites
- Node.js (LTS version recommended)
- npm (or yarn)
- PostgreSQL (with a running instance)### 🚀 Setup Instructions
1. **Clone the repository:**
```bash
git clone https://github.com/coslynx/Fitness-Tracker-MVP-Personalized.git
```2. **Navigate to the project directory:**
```bash
cd Fitness-Tracker-MVP-Personalized
```3. **Install dependencies:**
```bash
npm install
```4. **Create a `.env` file (example):**
```bash
cp .env.example .env
```
- Update the `.env` file with your PostgreSQL credentials.## 🏗️ Usage
### 🏃♂️ Running the Development Server
1. **Start the development server:**
```bash
npm run dev
```2. **Open your browser and navigate to:** [http://localhost:3000](http://localhost:3000).
### ⚙️ Configuration
- Configure the database connection in your `.env` file.
- Adjust other settings as needed (e.g., social media API keys, if applicable).### 📚 Examples
- **📝 Example 1: Setting a Fitness Goal**
- Login to the application.
- Navigate to the "Goals" section.
- Click the "Add Goal" button.
- Enter a goal name (e.g., "Lose 10 pounds"), target value (e.g., "10"), and deadline (e.g., "2024-12-31").
- Submit the goal.- **📝 Example 2: Logging a Workout**
- Login to the application.
- Navigate to the "Workouts" section.
- Click the "Log Workout" button.
- Select the activity type (e.g., "Running").
- Enter the workout duration (e.g., "30 minutes").
- Submit the workout log.- **📝 Example 3: Sharing Workout Progress**
- Login to the application.
- Navigate to your workout logs.
- Click the "Share" button next to a specific workout entry.
- Choose your preferred social media platform to share your progress.## 🌐 Hosting
### 🚀 Deployment Instructions
#### Using Vercel (Recommended)
1. **Login to Vercel:**
- [https://vercel.com/](https://vercel.com/)2. **Import project:**
- Click the "Import Project" button and select the `Fitness-Tracker-MVP-Personalized` directory.
- Follow the Vercel instructions to configure your project and deploy.#### Using Netlify
1. **Login to Netlify:**
- [https://www.netlify.com/](https://www.netlify.com/)2. **Import project:**
- Click the "New site from Git" button.
- Connect your GitHub account and select the `Fitness-Tracker-MVP-Personalized` repository.
- Follow the Netlify instructions to configure your project and deploy.#### Using GitHub Pages
1. **Create a `gh-pages` branch:**
```bash
git checkout -b gh-pages
```2. **Install the `gh-pages` package:**
```bash
npm install gh-pages --save-dev
```3. **Configure the `gh-pages` package:**
- Update your `package.json` file with the following:
```json
"scripts": {
"deploy": "gh-pages -d build"
}
```4. **Build the application:**
```bash
npm run build
```5. **Deploy to GitHub Pages:**
```bash
npm run deploy
```6. **Push the changes to the `gh-pages` branch:**
```bash
git push origin gh-pages
```#### Using AWS
1. **Create an AWS account (if you don't have one):**
- [https://aws.amazon.com/](https://aws.amazon.com/)2. **Create an S3 bucket:**
- Go to the S3 console and create a new bucket.3. **Configure an S3 bucket website:**
- In the S3 bucket settings, enable "Static website hosting" and configure the index document (`index.html`).4. **Deploy the build files:**
- Use the AWS CLI or a tool like the AWS S3 plugin for VS Code to upload the build files (from the `build` directory) to the S3 bucket.5. **Configure a CloudFront distribution (optional):**
- Set up a CloudFront distribution to serve your S3 website content with a custom domain name and caching.#### Using Google Cloud
1. **Create a Google Cloud Platform (GCP) account (if you don't have one):**
- [https://cloud.google.com/](https://cloud.google.com/)2. **Create a Cloud Storage bucket:**
- Go to the Cloud Storage console and create a new bucket.3. **Configure a website on Cloud Storage:**
- In the Cloud Storage bucket settings, enable "Website hosting" and configure the index document (`index.html`).4. **Deploy the build files:**
- Use the Google Cloud Storage CLI or a tool like the Google Cloud Storage plugin for VS Code to upload the build files (from the `build` directory) to the Cloud Storage bucket.5. **Configure a Cloud CDN (optional):**
- Use Cloud CDN to cache and accelerate your Cloud Storage website content.### 🔑 Environment Variables
- `NEXT_PUBLIC_APP_NAME`: Your application name (displayed in the header).
- `NEXT_PUBLIC_APP_DESCRIPTION`: Your application description (displayed in the header).
- `DATABASE_URL`: Your PostgreSQL database URL (e.g., `postgres://username:password@host:port/database_name`).## 📜 API Documentation
### 🔍 Endpoints
- **`GET /api/goals`:** Retrieves a list of goals for the current user.
- **`POST /api/goals`:** Creates a new goal for the current 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.
- **`POST /api/workouts`:** Logs a new workout for the current user.
- **`GET /api/workouts`:** Retrieves a list of workouts for the current user.
- **`GET /api/workouts/:id`:** Retrieves a specific workout by its ID.
- **`PUT /api/workouts/:id`:** Updates an existing workout by its ID.
- **`DELETE /api/workouts/:id`:** Deletes a workout by its ID.### 🔒 Authentication
- The API endpoints require authentication.
- Authentication is handled through NextAuth.js, using JWT tokens for session management.### 📝 Examples
```bash
# Get all goals
curl -X GET -H "Authorization: Bearer YOUR_JWT_TOKEN" http://localhost:3000/api/goals# Create a new goal
curl -X POST -H "Authorization: Bearer YOUR_JWT_TOKEN" -H "Content-Type: application/json" -d '{"name": "Lose 10 pounds", "target": "10", "deadline": "2024-12-31"}' http://localhost:3000/api/goals# Log a new workout
curl -X POST -H "Authorization: Bearer YOUR_JWT_TOKEN" -H "Content-Type: application/json" -d '{"type": "Running", "duration": "30 minutes"}' http://localhost:3000/api/workouts
```## 📜 License & Attribution
### 📄 License
This Minimum Viable Product (MVP) is licensed under the [GNU AGPLv3](https://choosealicense.com/licenses/agpl-3.0/) license.
### 🤖 AI-Generated MVP
This MVP was entirely generated using artificial intelligence through [CosLynx.com](https://coslynx.com).
No human was directly involved in the coding process of the repository: Fitness-Tracker-MVP-Personalized
### 📞 Contact
For any questions or concerns regarding this AI-generated MVP, please contact CosLynx at:
- Website: [CosLynx.com](https://coslynx.com)
- Twitter: [@CosLynxAI](https://x.com/CosLynxAI)
🌐 CosLynx.com
Create Your Custom MVP in Minutes With CosLynxAI!