Skip to content

Project: Track fitness goals, set reminders, and monitor progress with a simple online tool. Created at https://coslynx.com

Notifications You must be signed in to change notification settings

coslynx/fitness-goals-social-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

fitness-goals-social-tracker

A web application to help users track their fitness goals and connect with others.

Developed with the software and tools below.

Framework used Frontend technologies Backend technologies Database used
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 "fitness-goals-social-tracker" that provides a comprehensive solution for fitness enthusiasts to track their progress, set goals, and connect with others. It leverages the power of React, Node.js, PostgreSQL, and other technologies to offer a user-friendly and engaging experience.

πŸ“¦ 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, Next.js, Tailwind CSS, Prisma, and Zustand, which are essential for building and styling the UI components, managing state, 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, 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 such as code splitting, caching, and image optimization 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 social login APIs like Google and Facebook.
πŸ“Ά Scalability Design the system to handle increased user load and data volume, utilizing caching strategies and cloud-based solutions for better scalability.

πŸ“‚ Structure

fitness-goals-social-tracker
β”œβ”€β”€ 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

πŸ’» Installation

πŸ”§ Prerequisites

  • Node.js
  • npm
  • Docker (Optional for deployment)

πŸš€ Setup Instructions

  1. Clone the repository:
    • git clone https://github.com/coslynx/fitness-goals-social-tracker.git
  2. Navigate to the project directory:
    • cd fitness-goals-social-tracker
  3. Install dependencies:
    • npm install

πŸ—οΈ Usage

πŸƒβ€β™‚οΈ Running the MVP

  1. Start the development server:
    • npm run dev
  2. Open your browser and navigate to http://localhost:3000.

βš™οΈ Configuration

Adjust configuration settings in next.config.js, .env, or next-auth.config.ts as needed.

πŸ“š Examples

  • πŸ“ Example 1: Create a new goal by filling in the required information in the GoalInput form on the dashboard page.
  • πŸ“ Example 2: Log workout data, nutrition, or weight information using the dedicated forms provided on the dashboard page.
  • πŸ“ Example 3: Share your progress updates on the social feed, connect with other users, and motivate each other.

🌐 Hosting

πŸš€ Deployment Instructions

Vercel Deployment

  1. Login to Vercel: Create an account or log in to your existing Vercel account.
  2. Import Project: Click on "New Project" and select "Import Git Repository" to import the project from GitHub.
  3. Connect Repository: Provide the GitHub repository URL: https://github.com/coslynx/fitness-goals-social-tracker.git
  4. Environment Variables: Set up any necessary environment variables (e.g., DATABASE_URL, NEXTAUTH_URL, NEXTAUTH_SECRET).
  5. Deploy: Click on "Deploy" to deploy the application to Vercel.

Heroku Deployment

  1. Install Heroku CLI: npm install -g heroku
  2. Login to Heroku: heroku login
  3. Create a New Heroku App: heroku create
  4. Set Up Environment Variables: Use heroku config:set to set up environment variables for database connection and other configurations.
  5. Push to Heroku: git push heroku main

πŸ”‘ Environment Variables

  • DATABASE_URL: The connection string for your PostgreSQL database.
  • NEXTAUTH_URL: The URL of your NextAuth application (e.g., https://your-app.vercel.app).
  • NEXTAUTH_SECRET: A secret key for NextAuth session management.

πŸ“œ API Documentation

πŸ” Endpoints

  • GET /api/goals: Retrieves a list of goals for the authenticated user.
  • POST /api/goals: Creates a new goal for the authenticated user.
  • PUT /api/goals/:id: Updates an existing goal for the authenticated user.
  • DELETE /api/goals/:id: Deletes an existing goal for the authenticated user.
  • GET /api/progress: Retrieves progress data for a specific goal.
  • POST /api/progress: Logs progress data for a specific goal.

πŸ”’ Authentication

User authentication is handled using JWT tokens via NextAuth.js.

πŸ“ Examples

  • curl -X GET http://localhost:3000/api/goals (Requires authentication)

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘₯ Authors

🌐 CosLynx.com

Create Your Custom MVP in Minutes With CosLynxAI!