A web application that simplifies and enhances fitness goal management, built with Next.js, React, Tailwind CSS, and Supabase.
- π Overview
- π¦ Features
- π Structure
- π» Installation
- ποΈ Usage
- π Hosting
- π License
- π Authors
The repository contains a Minimum Viable Product (MVP) called "Fitness Tracker" that provides a comprehensive solution for fitness enthusiasts to set goals, track progress, and stay motivated. The application is built using a user-centric approach with a modern tech stack including Next.js, React, Tailwind CSS, and Supabase.
Feature | Description | |
---|---|---|
π | User Authentication | Secure user registration and login with email verification and password strength checks using NextAuth.js. Users can create personalized profiles. |
π― | Goal Setting | Allows users to set specific fitness goals with target dates, desired outcomes, and progress metrics. Supports a wide range of goal types. |
π | Progress Tracking | Enables users to log workouts, track metrics, and visualize progress through interactive charts and graphs. Provides detailed workout summaries. |
π€ | Social Sharing | Facilitates connections with friends, sharing achievements, and motivating each other. Provides a community forum for encouragement and support. |
π» | Responsive Design | Optimizes the user interface for various screen sizes, ensuring a smooth and engaging experience across devices. |
βοΈ | 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 React, uuid, esbuild, and eslint, which are essential for building and styling the UI components, 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 background, components, and content. |
π§ͺ | 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 speech recognition and synthesis APIs. |
πΆ | Scalability | Design the system to handle increased user load and data volume, utilizing caching strategies and cloud-based solutions for better scalability. |
Fitness-Tracker
βββ public
β βββ favicon.ico
βββ src
βββ app
β βββ layout.tsx
β βββ page.tsx
β βββ goals
β β βββ page.tsx
β βββ progress
β βββ page.tsx
βββ components
β βββ common
β β βββ Button.tsx
β βββ layout
β β βββ Header.tsx
β β βββ Footer.tsx
β βββ features
β βββ goals
β β βββ GoalForm.tsx
β β βββ GoalList.tsx
β β βββ GoalItem.tsx
β βββ progress
β βββ ProgressChart.tsx
β βββ WorkoutForm.tsx
βββ lib
β βββ api
β β βββ client.ts
β βββ utils
β βββ formatters.ts
βββ styles
βββ globals.css
- Node.js v16+
- npm 6+
- PostgreSQL 14+
- Supabase Account (free tier is sufficient)
- Clone the repository:
git clone https://github.com/coslynx/Fitness-Tracker.git cd Fitness-Tracker
- Install dependencies:
npm install
- Set up the database:
- Create a new Supabase project and get your
SUPABASE_URL
andSUPABASE_KEY
. - Create the following tables in your Supabase database:
- users:
id
(unique identifier)email
(unique)password
(hashed)name
(optional)
- goals:
id
(unique identifier)name
target
(e.g., target weight, distance, etc.)targetDate
outcome
(description of the desired outcome)userId
(foreign key to users table)
- workouts:
id
(unique identifier)activity
(e.g., running, cycling, etc.)duration
(in minutes)metrics
(e.g., distance covered, calories burned, etc.)date
userId
(foreign key to users table)
- users:
- Configure the database connection in
.env.local
:NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co SUPABASE_KEY=your_supabase_api_key
- Create a new Supabase project and get your
- Configure environment variables:
cp .env.example .env
- Replace the placeholder values in
.env
with your actual Supabase credentials.
- Replace the placeholder values in
- Start the development server:
npm run dev
- Access the application:
- Web interface: http://localhost:3000
- Create a Vercel account and install the Vercel CLI:
npm install -g vercel
- Login to Vercel:
vercel login
- Initialize Vercel:
vercel init Fitness-Tracker
- Select the project directory and follow the prompts.
- Deploy the code:
vercel
- Follow the instructions to configure your Supabase database connection and other necessary environment variables on Vercel.
- Once the deployment is complete, you can access your live application through the URL provided by Vercel.
NEXT_PUBLIC_SUPABASE_URL
: Public Supabase URL for frontend access.SUPABASE_KEY
: Private Supabase API key for backend access.NEXTAUTH_URL
: Public URL for NextAuth.js authentication (set to the domain where your application is hosted).NEXTAUTH_SECRET
: Secret key for NextAuth.js authentication (generate a random string).GOOGLE_CLIENT_ID
: Google Client ID for OAuth authentication (create a Google Cloud Project and enable Google Sign-in).GOOGLE_CLIENT_SECRET
: Google Client Secret for OAuth authentication.
This Minimum Viable Product (MVP) is licensed under the GNU AGPLv3 license.
This MVP was entirely generated using artificial intelligence through CosLynx.com.
No human was directly involved in the coding process of the repository: Fitness-Tracker
For any questions or concerns regarding this AI-generated MVP, please contact CosLynx at:
- Website: CosLynx.com
- Twitter: @CosLynxAI
Create Your Custom MVP in Minutes With CosLynxAI!