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.
- 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.
- Next.js (App Router)
- React
- Vanilla CSS (Glassmorphism & Dark Mode)
- Google Gemini API (
@google/generative-ai) - Vitest & React Testing Library
- Clone the repository (if you haven't already).
- Install dependencies:
npm install
- Configure your Gemini API Key:
Create a
.env.localfile in the root directory and add your API key:GEMINI_API_KEY=your_api_key_here
- Run the development server:
npm run dev
- Open the app: Navigate to http://localhost:3000 in your browser.
We use Vitest and React Testing Library for our unit tests. To run the test suite:
npm run testThe 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.