A web application that empowers fitness enthusiasts to track their progress, set goals, and connect with others.
- π Overview
- π¦ Features
- π Structure
- π» Installation
- ποΈ Usage
- π Hosting
- π License
- π Authors
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.
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. |
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
- Node.js
- npm
- Docker
- Clone the repository:
git clone /~https://github.com/coslynx/fitness-goals-web-app.git
- Navigate to the project directory:
cd fitness-goals-web-app
- Install dependencies:
npm install
- Start the development server:
npm start
- Open your browser and navigate to http://localhost:3000.
Adjust configuration settings in .env
or next.config.js
as needed.
- π 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.
- Log in to your Vercel account.
- Click "New Project" and select "Import from Git".
- Enter the repository URL:
/~https://github.com/coslynx/fitness-goals-web-app.git
. - Select the branch you want to deploy.
- Click "Deploy".
- Log in to your Netlify account.
- Click "New site from Git".
- Enter the repository URL:
/~https://github.com/coslynx/fitness-goals-web-app.git
. - Select the branch you want to deploy.
- Click "Deploy".
- Navigate to the repository's settings page on GitHub.
- Select "Pages" from the left-hand menu.
- Choose the source branch and directory.
- Click "Save".
Refer to the specific documentation for your chosen hosting service to deploy the application.
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).
- 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.
The application uses Google OAuth for user authentication. After successfully signing in, a session token is issued and used to secure subsequent API requests.
curl -X GET http://localhost:3000/api/goals
This project is licensed under the MIT License.
- CosLynxAI - /~https://github.com/coslynx
Create Your Custom MVP in Minutes With CosLynxAI!