Skip to content

annous246/Swipeat

Repository files navigation

icon

Swipeat

Swipeat is a simple and efficient meal tracking AI Powered cross-platform app. Add meals once, then swipe daily to log them β€” fast, easy, and consistent. (AVAILABLE ON ANDROID πŸ‘‰ DOWNLOAD (old version))


🧩 Tech Badges

Frontend

React Native TypeScript JavaScript

Backend

NodeJS Express.js JWT

Database

PostgreSQL

AI & Assistant

Azure AI Gemini Flash Lite ChromaDB GitHub Models OpenAI

(soon on Google Play Store)


✨ Features

  • πŸ₯— Instant Add Cam β€” use your camera to instantly add meals to your macros.
  • πŸ”Ž Smart Sorting & Search β€” find meals and nutrition data instantly.
  • πŸ€– Gemini Flash Lite Assistant β€” embedded AI chat assistant that:
    • Uses ChromaDB for predefined knowledge and contextual answers.
    • If confidence > 60% β†’ responds using ChromaDB.
    • If confidence < 30% β†’ switches to Chatbot Mode (safe, rail-guarded, roleplaying assistant).
    • Between 30–60% β†’ Gemini Agent dynamically decides which mode to use.
  • πŸ“Š Macro Analytics β€” visualize calories, protein, carbs, and fats.
  • ⚑ Swipe Logging System β€” log your meals with a single swipe.
  • πŸ“± Cross-Platform App β€” Android (available), iOS (coming soon).
  • πŸ’‘ AI Recommendations β€” get personalized meal suggestions and tracking help.
  • 🎨 Minimal UI β€” clean design built with React Native + Expo.

πŸ›’οΈ Databse Class Diagram

classDiagram
    %% =======================
    %%        USERS
    %% =======================
    class Users {
        +int id PK
        +string email
        +string password
        +string username
        +float protein_progress
        +float carbs_progress
        +float calories_progress
        +float height
        +float weight
        +int age
        +boolean stepper
        +timestamp last_reset
        +boolean gender
        +boolean verified
        +string code
        +timestamp code_date
    }

    %% =======================
    %%        FOODS
    %% =======================
    class Foods {
        +int id PK
        +string name
        +float protein
        +float carbs
        +float calories
        +float portion
        +int userid FK -> Users.id
    }

    %% =======================
    %%   CONSUMED FOODS TODAY
    %% =======================
    class ConsumedFoods {
        +string name
        +float protein
        +float carbs
        +float calories
        +float portion
        +int userid FK -> Users.id
        +int servings
        +int id FK -> Foods.id
    }

    %% =======================
    %%   PAST CONSUMED FOODS
    %% =======================
    class PastConsumedFoods {
        +int id PK
        +string name
        +float protein
        +float carbs
        +float calories
        +float portion
        +int userid FK -> Users.id
        +date consumed_date
        +int servings
    }

    %% =======================
    %%     MACRO GOALS NOW
    %% =======================
    class MacroGoals {
        +float protein_goal
        +float carbs_goal
        +float calories_goal
        +int userid FK -> Users.id
    }

    %% =======================
    %%    PAST MACRO PROGRESS
    %% =======================
    class PastMacroProgress {
        +float protein_goal
        +float carbs_goal
        +float calories_goal
        +int userid FK -> Users.id
        +date progress_date
    }

    %% =======================
    %%      RELATIONSHIPS
    %% =======================

    Users "1" --> "many" Foods : owns >
    Users "1" --> "many" ConsumedFoods : logs >
    Users "1" --> "many" PastConsumedFoods : logged >
    Users "1" --> "1" MacroGoals : has >
    Users "1" --> "many" PastMacroProgress : history >

    Foods "1" --> "many" ConsumedFoods : referenced by >
Loading

🧠 AI Food Recognition System Architecture

flowchart LR
    A["Mobile App (Expo React Native)"] --> B["Node.js Backend API"]

    subgraph Backend ["Node.js Backend Server"]
        direction TB
        B --> C["GPT-4 (Tool Calling): Image Recognition + Food Detection"]
        C --> E["Response Builder: Combine food name + macros + portion"]
    end

    E --> F["Return JSON Response to Frontend"]
    F --> G["Display Food Info: Name, Calories, Protein, Carbs, Fat"]
Loading

🧠 AI Chatbot System Architecture

flowchart LR
    A[User Query] --> B[ChromaDB Predefined Response Semantic Search]
    B --> C{Confidence Score}
    C -->|> 60%| D[ChromaDB Response]
    C -->|< 30%| E[Chatbot Mode - Gemini Roleplay]
    C -->|30–60%| F[Gemini reAt agent judge Decides Best choice]
    F --> D
    F --> E

Loading

πŸš€ Getting Started

Prerequisites

Installation

# Clone the repository
git clone https://github.com/username/swipeat.git

# Navigate into the project
cd swipeat

# Install dependencies
npm install
npx expo start --lan

πŸ“± Screenshots

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 7 Screenshot 8 Screenshot 9 Screenshot 10 Screenshot 11 Screenshot 12 Screenshot 13 Screenshot 14 Screenshot 15 Screenshot 16 Screenshot 17 Screenshot 18 Screenshot 19

πŸ› οΈ Tech Stack

React Native + Expo

Node.js + Express

PostgreSQL + Mongoose

OpenAI + Gemini Flash Lite + ChromaDB

JWT Auth + Secure Role Management

🀝 Contributing

This is a private project, but feel free to fork it or suggest improvements.

πŸ“„ License

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


About

AI Powered Food macros tracking app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published