# lgm1213/appideagrocerysaver architecture

> Architecture diagram of the GitHub repository lgm1213/appideagrocerysaver, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lgm1213/appideagrocerysaver
- Repository: https://github.com/lgm1213/appideagrocerysaver

## Overview

Save & Savor is a Rails grocery-savings and meal-planning application. Users set preferences, budget, and stores; browse recipes and deals; generate a deal-aware weekly plan; manage its entries and shopping list; and track savings and cooking feedback. Deal ingestion and matching, recipe preferences, and admin job controls are distinct supporting capabilities. The graph uses README statements and shown controller/job code for relationships; several listed subsystems were not sampled, so their links are limited to documented behavior.

Main entry points: [`app/controllers/meal_plans_controller.rb`](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/meal_plans_controller.rb) (Meal Plan Controller), [`app/controllers/admin/jobs_controller.rb`](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/jobs_controller.rb) (Job Controls), [`app/jobs/fetch_deals_job.rb`](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/jobs/fetch_deals_job.rb) (Deal Fetch Job), [`app/controllers/shopping_lists_controller.rb`](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/shopping_lists_controller.rb) (Shopping Lists)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Account &amp; Setup"]
  node_onboarding["Onboarding"]
  node_preferences[("User Preferences<br/>[user_preference.rb]")]
end

subgraph group_deals["Deal Intelligence"]
  node_deals_ui["Deal Browser"]
  node_deal_fetch["Deal Fetch Job<br/>[fetch_deals_job.rb]"]
  node_scrapers["Store Scrapers<br/>[publix_scraper.rb]"]
  node_kroger_api["Kroger API Client<br/>[api_client.rb]"]
  node_deal_match["Ingredient Matcher"]
  node_match_job["Deal Match Job"]
end

subgraph group_planning["Meal Planning"]
  node_meal_plans["Meal Plan Controller"]
  node_week_builder["Week Builder<br/>[week_builder.rb]"]
  node_deal_provider["Deal-Aware Provider"]
  node_entries["Plan Entries"]
end

subgraph group_recipes["Recipes &amp; Feedback"]
  node_recipes["Recipe Browser"]
  node_recipe_model["Recipe Matching<br/>[recipe.rb]"]
  node_recipe_submission["Recipe Submission<br/>[submission.rb]"]
  node_ratings["Recipe Ratings"]
end

subgraph group_shopping["Shopping &amp; Savings"]
  node_shopping_lists["Shopping Lists"]
  node_shopping_items["List Items"]
  node_savings["Savings Summary<br/>[summary_service.rb]"]
  node_dashboard["Savings Dashboard"]
end

subgraph group_operations["Admin Operations"]
  node_admin_jobs["Job Controls<br/>[jobs_controller.rb]"]
  node_admin_health["System Health<br/>[system_health.rb]"]
  node_admin_users["User Management"]
  node_email_settings["Email Settings"]
  node_job_activity["Job Activity"]
end

node_user(("User"))

node_user -->|"sets preferences"| node_onboarding
node_onboarding -->|"updates"| node_preferences
node_user -->|"browses deals"| node_deals_ui
node_deal_fetch -.->|"fetches deals"| node_scrapers
node_deal_fetch -.->|"fetches promotions"| node_kroger_api
node_user -->|"generates plan"| node_meal_plans
node_meal_plans -->|"calls builder"| node_week_builder
node_week_builder -.->|"uses provider"| node_deal_provider
node_user -->|"edits plan"| node_entries
node_entries -->|"records cooking"| node_preferences
node_user -->|"browses recipes"| node_recipes
node_recipes -->|"filters recipes"| node_recipe_model
node_user -->|"rates recipes"| node_ratings
node_user -->|"manages lists"| node_shopping_lists
node_shopping_lists -->|"manages items"| node_shopping_items
node_meal_plans -->|"generates list"| node_shopping_lists
node_user -->|"views savings"| node_dashboard
node_dashboard -.->|"summarizes savings"| node_savings
node_user -->|"triggers jobs"| node_admin_jobs
node_admin_jobs -->|"enqueues fetch"| node_deal_fetch
node_admin_jobs -->|"enqueues matching"| node_match_job
node_user -->|"monitors health"| node_admin_health
node_user -->|"manages users"| node_admin_users
node_user -->|"configures email"| node_email_settings
node_user -->|"reviews executions"| node_job_activity

click node_onboarding "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/onboarding/steps_controller.rb"
click node_preferences "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/user_preference.rb"
click node_deals_ui "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/deals_controller.rb"
click node_deal_fetch "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/jobs/fetch_deals_job.rb"
click node_scrapers "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/services/scrapers/publix_scraper.rb"
click node_kroger_api "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/kroger/api_client.rb"
click node_deal_match "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/deals/ingredient_matcher.rb"
click node_match_job "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/jobs/match_deals_to_ingredients_job.rb"
click node_meal_plans "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/meal_plans_controller.rb"
click node_week_builder "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/meal_plans/week_builder.rb"
click node_deal_provider "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/meal_plans/providers/deal_aware_provider.rb"
click node_entries "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/meal_plan_entries_controller.rb"
click node_recipes "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/recipes_controller.rb"
click node_recipe_model "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/recipe.rb"
click node_recipe_submission "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/recipes/submission.rb"
click node_ratings "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/recipe_ratings_controller.rb"
click node_shopping_lists "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/shopping_lists_controller.rb"
click node_shopping_items "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/shopping_list_items_controller.rb"
click node_savings "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/savings/summary_service.rb"
click node_dashboard "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/savings_controller.rb"
click node_admin_jobs "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/jobs_controller.rb"
click node_admin_health "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/admin/system_health.rb"
click node_admin_users "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/users_controller.rb"
click node_email_settings "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/email_settings_controller.rb"
click node_job_activity "https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/job_executions_controller.rb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_onboarding,node_preferences,node_user toneBlue
class node_deals_ui,node_deal_fetch,node_scrapers,node_kroger_api,node_deal_match,node_match_job toneAmber
class node_meal_plans,node_week_builder,node_deal_provider,node_entries toneMint
class node_recipes,node_recipe_model,node_recipe_submission,node_ratings toneRose
class node_shopping_lists,node_shopping_items,node_savings,node_dashboard toneIndigo
class node_admin_jobs,node_admin_health,node_admin_users,node_email_settings,node_job_activity toneTeal
```

## Components

### Account & Setup

- [Onboarding](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/onboarding/steps_controller.rb): `app/controllers/onboarding/steps_controller.rb`
- [User Preferences](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/user_preference.rb): `app/models/user_preference.rb`

### Deal Intelligence

- [Deal Browser](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/deals_controller.rb): `app/controllers/deals_controller.rb`
- [Deal Fetch Job](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/jobs/fetch_deals_job.rb): `app/jobs/fetch_deals_job.rb`
- [Store Scrapers](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/services/scrapers/publix_scraper.rb): `app/services/scrapers/publix_scraper.rb`
- [Kroger API Client](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/kroger/api_client.rb): `app/models/kroger/api_client.rb`
- [Ingredient Matcher](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/deals/ingredient_matcher.rb): `app/models/deals/ingredient_matcher.rb`
- [Deal Match Job](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/jobs/match_deals_to_ingredients_job.rb): `app/jobs/match_deals_to_ingredients_job.rb`

### Meal Planning

- [Meal Plan Controller](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/meal_plans_controller.rb): `app/controllers/meal_plans_controller.rb`
- [Week Builder](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/meal_plans/week_builder.rb): `app/models/meal_plans/week_builder.rb`
- [Deal-Aware Provider](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/meal_plans/providers/deal_aware_provider.rb): `app/models/meal_plans/providers/deal_aware_provider.rb`
- [Plan Entries](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/meal_plan_entries_controller.rb): `app/controllers/meal_plan_entries_controller.rb`

### Recipes & Feedback

- [Recipe Browser](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/recipes_controller.rb): `app/controllers/recipes_controller.rb`
- [Recipe Matching](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/recipe.rb): `app/models/recipe.rb`
- [Recipe Submission](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/recipes/submission.rb): `app/models/recipes/submission.rb`
- [Recipe Ratings](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/recipe_ratings_controller.rb): `app/controllers/recipe_ratings_controller.rb`

### Shopping & Savings

- [Shopping Lists](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/shopping_lists_controller.rb): `app/controllers/shopping_lists_controller.rb`
- [List Items](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/shopping_list_items_controller.rb): `app/controllers/shopping_list_items_controller.rb`
- [Savings Summary](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/savings/summary_service.rb): `app/models/savings/summary_service.rb`
- [Savings Dashboard](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/savings_controller.rb): `app/controllers/savings_controller.rb`

### Admin Operations

- [Job Controls](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/jobs_controller.rb): `app/controllers/admin/jobs_controller.rb`
- [System Health](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/models/admin/system_health.rb): `app/models/admin/system_health.rb`
- [User Management](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/users_controller.rb): `app/controllers/admin/users_controller.rb`
- [Email Settings](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/email_settings_controller.rb): `app/controllers/admin/email_settings_controller.rb`
- [Job Activity](https://github.com/lgm1213/appideagrocerysaver/blob/main/app/controllers/admin/job_executions_controller.rb): `app/controllers/admin/job_executions_controller.rb`

### Other components

- **User**

## Connections

- User → Onboarding: sets preferences
- Onboarding → User Preferences: updates (evidence: `app/controllers/onboarding/steps_controller.rb`)
- User → Deal Browser: browses deals
- Deal Fetch Job → Store Scrapers: fetches deals
- Deal Fetch Job → Kroger API Client: fetches promotions
- User → Meal Plan Controller: generates plan
- Meal Plan Controller → Week Builder: calls builder (evidence: `app/controllers/meal_plans_controller.rb`)
- Week Builder → Deal-Aware Provider: uses provider
- User → Plan Entries: edits plan
- Plan Entries → User Preferences: records cooking (evidence: `app/controllers/meal_plan_entries_controller.rb`)
- User → Recipe Browser: browses recipes
- Recipe Browser → Recipe Matching: filters recipes
- User → Recipe Ratings: rates recipes
- User → Shopping Lists: manages lists
- Shopping Lists → List Items: manages items
- Meal Plan Controller → Shopping Lists: generates list
- User → Savings Dashboard: views savings
- Savings Dashboard → Savings Summary: summarizes savings
- User → Job Controls: triggers jobs
- Job Controls → Deal Fetch Job: enqueues fetch (evidence: `app/controllers/admin/jobs_controller.rb`)
- Job Controls → Deal Match Job: enqueues matching (evidence: `app/controllers/admin/jobs_controller.rb`)
- User → System Health: monitors health
- User → User Management: manages users
- User → Email Settings: configures email
- User → Job Activity: reviews executions
