Skip to content

Latest commit

 

History

History
261 lines (208 loc) · 8.21 KB

File metadata and controls

261 lines (208 loc) · 8.21 KB

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.