Skip to content

koushickp/ai-fitness-tracker

Repository files navigation

AuraFit - AI-Powered Fitness Tracker

AuraFit is a practical, beginner-friendly web application that helps you track your fitness activities and receive personalized, AI-generated guidance based on your progress.

Features

  • User Profile: Track your name, age, and fitness goals.
  • Activity Logging: Log the type of activity, duration, and how you felt.
  • AI Guidance: Get tailored recommendations powered by Google's Gemini API, complete with safety guardrails to prevent harmful advice.
  • Progress Tracking: A sleek, dark-mode dashboard showing your recent activities.
  • Local Storage: Your data is saved securely in your browser.

Technologies Used

  • Next.js (App Router)
  • React
  • Vanilla CSS (Glassmorphism & Dark Mode)
  • Google Gemini API (@google/generative-ai)
  • Vitest & React Testing Library

Setup Instructions

  1. Clone the repository (if you haven't already).
  2. Install dependencies:
    npm install
  3. Configure your Gemini API Key: Create a .env.local file in the root directory and add your API key:
    GEMINI_API_KEY=your_api_key_here
  4. Run the development server:
    npm run dev
  5. Open the app: Navigate to http://localhost:3000 in your browser.

Running Tests

We use Vitest and React Testing Library for our unit tests. To run the test suite:

npm run test

Safety Guardrails

The AI integration has a strict system prompt to ensure:

  • It never provides medical advice.
  • It advises users to consult a doctor if they mention extreme pain or feeling unwell.
  • It provides beginner-friendly, practical, and safe tips.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors