Skip to content

aritroCoder/CalTrack

Repository files navigation

CalTrack 🍛

An Indian food calorie tracking app powered by AI. Scan food images, describe meals, or manually log your calorie intake.

Features

  • 📷 Scan Food - Take a photo of your meal for instant calorie analysis
  • ✍️ Describe Food - Type a description and get calorie estimates
  • Manual Entry - Add custom food items manually
  • 📊 Daily Tracking - View your daily calorie progress
  • 📜 History - Browse your food log by date
  • 🎯 Personalized Goals - Set your own daily calorie target

Tech Stack

  • React Native with Expo
  • TypeScript
  • React Native Paper (Material Design 3)
  • SQLite for local storage
  • Portkey AI Gateway for LLM routing

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Expo CLI (npm install -g expo-cli)
  • Expo Go app on your phone (for testing)

Setup

  1. Clone the repository

    git clone https://github.com/aritroCoder/caltrack.git
    cd caltrack
  2. Install dependencies

    npm install
  3. Configure environment variables

    Create a .env file in the project root:

    EXPO_PUBLIC_PORTKEY_API_KEY=your_portkey_api_key_here

    Get your Portkey API key from portkey.ai

  4. Start the development server

    npx expo start
  5. Run on your device

    • Scan the QR code with Expo Go (Android) or Camera app (iOS)
    • Or press a to open on Android emulator
    • Or press w to open in web browser

Building APK

Option 1: EAS Build (Recommended)

  1. Login to Expo

    eas login
  2. Add your API key to EAS (one-time setup)

    eas env:create --name EXPO_PUBLIC_PORTKEY_API_KEY --value "your_api_key" --environment production --visibility sensitive
  3. Build the APK

    eas build --platform android --profile production

Option 2: Local Build (Requires Android SDK)

npx expo run:android --variant release

Project Structure

caltrack/
├── App.tsx                 # Main app entry point
├── src/
│   ├── config/
│   │   ├── config.ts       # App configuration
│   │   └── prompts.ts      # AI prompt templates
│   ├── screens/
│   │   ├── HomeScreen.tsx      # Dashboard
│   │   ├── ResultScreen.tsx    # Analysis results
│   │   ├── HistoryScreen.tsx   # Food history
│   │   ├── TextInputScreen.tsx # Text-based input
│   │   ├── ManualEntryScreen.tsx # Manual food entry
│   │   ├── OnboardingScreen.tsx  # First-run setup
│   │   └── SettingsScreen.tsx    # User settings
│   ├── services/
│   │   ├── geminiService.ts    # AI API integration
│   │   └── databaseService.ts  # SQLite operations
│   ├── store/
│   │   └── appStore.ts     # Zustand state management
│   └── theme/
│       └── index.ts        # App theme configuration
└── .env                    # Environment variables

License

MIT

Developer

Aritra Bhaduri

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published