# sandhyadayanithi/bakegenuis-ai architecture

> Architecture diagram of the GitHub repository sandhyadayanithi/bakegenuis-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sandhyadayanithi/bakegenuis-ai
- Repository: https://github.com/sandhyadayanithi/bakegenuis-ai

## Overview

##### Project type and purpose
- This is a front-end-only, static web application (“BakeGenius AI”) built with HTML, CSS, and JavaScript.
- Its purpose is to convert vague cooking measures (cups, tablespoons, teaspoons) into precise grams by combining a local ingredient-density database with calls to the Google Gemini AI API.

##### File structure
- Top level:
- index.html – entry point
- html/ – additional pages (about, convert, customize, feedback, recipe_hub, scale, login, signup)
- css/ – style sheets per page
- js/ – JavaScript modules per page (about.js, convert.js, auth.js, etc.)
- site.webmanifest – PWA manifest
- No server-side code or configuration files implies a fully static site, hosted via GitHub Pages or any CDN.
- Ingredient density data and conversion logic live in the JS modules (likely as JSON or JS objects).
- Third-party integrations:
- Google Gemini API (for NLP and AI assistance)
- Web Speech API (for voice input)

##### README for additional insights
- Confirms tech stack: HTML, CSS, JavaScript on the front end, Gemini API for language understanding.
- Features: unit conversion engine, NLP ingredient detection, density database, voice input, visualizations.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User and Hosting
    User((User)):::user
    Browser[Browser]:::browser
    StaticHost[Static Host/CDN]:::static

    User -->|"Interacts via UI"| Browser
    Browser -->|"Requests HTML/CSS/JS"| StaticHost

    %% UI Layer
    subgraph "UI Layer" 
        direction TB
        Index["index.html"] 
        subgraph "Additional Pages"
            direction TB
            AboutPage["about.html"]
            ConvertPage["convert.html"]
            CustomizePage["customize.html"]
            FeedbackPage["feedback.html"]
            RecipeHubPage["recipe_hub.html"]
            ScalePage["scale.html"]
            LoginPage["login.html"]
            SignupPage["signup.html"]
        end
        Manifest["site.webmanifest"]
    end

    Browser -->|"Loads Pages"| Index
    Browser --> AboutPage
    Browser --> ConvertPage
    Browser --> CustomizePage
    Browser --> FeedbackPage
    Browser --> RecipeHubPage
    Browser --> ScalePage
    Browser --> LoginPage
    Browser --> SignupPage
    Browser --> Manifest

    %% Styles
    subgraph "CSS Styles" 
        direction TB
        IndexCSS["index.css"]
        AboutCSS["about.css"]
        AuthCSS["auth.css"]
        ConvertCSS["convert.css"]
        CustomizeCSS["customize.css"]
        FeedbackCSS["feedback.css"]
        RecipeHubCSS["recipe_hub.css"]
        ScaleCSS["scale.css"]
    end

    Index --> IndexCSS
    AboutPage --> AboutCSS
    LoginPage --> AuthCSS
    SignupPage --> AuthCSS
    ConvertPage --> ConvertCSS
    CustomizePage --> CustomizeCSS
    FeedbackPage --> FeedbackCSS
    RecipeHubPage --> RecipeHubCSS
    ScalePage --> ScaleCSS

    %% Client-side Modules
    subgraph "Client-side Logic" 
        direction TB
        InputModule["Input Module<br/>(text/voice capture)"]:::client
        NLPModule["NLP & Parsing Module"]:::client
        DensityDB["Density Database<br/>(in-memory)"]:::db
        ConversionEngine["Conversion Engine"]:::client
        Visualization["Visualization Module"]:::client
        AuthModule["Authentication Module"]:::client
        CustomModule["Customization Module"]:::client
        FeedbackModule["Feedback Module"]:::client
        RecipeHubModule["Recipe Hub Module"]:::client
        AboutModule["About Page Logic"]:::client
    end

    ConvertPage --> InputModule
    InputModule --> NLPModule
    NLPModule --> DensityDB
    DensityDB --> ConversionEngine
    ConversionEngine --> Visualization
    NLPModule --> ExternalAPI
    LoginPage --> AuthModule
    SignupPage --> AuthModule
    CustomizePage --> CustomModule
    FeedbackPage --> FeedbackModule
    RecipeHubPage --> RecipeHubModule
    AboutPage --> AboutModule

    %% External Service
    ExternalAPI["Google Gemini API"]:::external
    NLPModule -->|"API call"| ExternalAPI
    ExternalAPI -->|"Response"| NLPModule

    %% Click events
    click Index "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/index.html"
    click AboutPage "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/html/about.html"
    click ConvertPage "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/html/convert.html"
    click CustomizePage "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/html/customize.html"
    click FeedbackPage "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/html/feedback.html"
    click RecipeHubPage "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/html/recipe_hub.html"
    click ScalePage "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/html/scale.html"
    click LoginPage "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/html/login.html"
    click SignupPage "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/html/signup.html"
    click IndexCSS "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/css/index.css"
    click AboutCSS "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/css/about.css"
    click AuthCSS "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/css/auth.css"
    click ConvertCSS "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/css/convert.css"
    click CustomizeCSS "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/css/customize.css"
    click FeedbackCSS "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/css/feedback.css"
    click RecipeHubCSS "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/css/recipe_hub.css"
    click ScaleCSS "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/css/scale.css"
    click InputModule "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/convert.js"
    click NLPModule "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/convert.js"
    click DensityDB "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/convert.js"
    click ConversionEngine "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/scale.js"
    click Visualization "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/convert.js"
    click AuthModule "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/auth.js"
    click CustomModule "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/customize.js"
    click FeedbackModule "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/feedback.js"
    click RecipeHubModule "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/recipe_hub.js"
    click AboutModule "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/js/about.js"
    click Manifest "https://github.com/sandhyadayanithi/bakegenuis-ai/blob/main/site.webmanifest"

    %% Styles
    classDef user fill:#f9f,stroke:#333,stroke-width:1px
    classDef browser fill:#eef,stroke:#333,stroke-width:1px
    classDef static fill:#bbdefb,stroke:#333,stroke-width:1px
    classDef client fill:#c8e6c9,stroke:#333,stroke-width:1px
    classDef db fill:#fff9c4,stroke:#333,stroke-width:1px
    classDef external fill:#ffcc80,stroke:#333,stroke-width:1px
```
