Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.5 KB

architecture.md

File metadata and controls

33 lines (25 loc) · 1.5 KB

PantryPilot Architecture

PantryPilot is a local-first MVP. The backend and frontend run on local development servers, and durable app data lives in a local SQLite database.

PantryPilot architecture

Request Flow

  1. The Next.js dashboard calls the local FastAPI backend.
  2. Receipt uploads go through the receipt import API.
  3. Text receipts are decoded locally.
  4. Image receipts are sent to the configured AI provider for OCR text extraction.
  5. Extracted receipt text is parsed into structured grocery items through the AIProvider boundary.
  6. Parsed groceries are converted into inventory rows with deterministic expiration estimates.
  7. Dinner suggestions use the current inventory and prioritize expiring items.

Boundaries

  • frontend/: dashboard, receipt upload, inventory table, dinner suggestion UI.
  • backend/src/pantry_pilot/api/: FastAPI routes and error handling.
  • backend/src/pantry_pilot/receipts/: receipt extraction and parser workflow.
  • backend/src/pantry_pilot/inventory/: normalization, conversion, and freshness logic.
  • backend/src/pantry_pilot/meal_suggestions/: meal suggestion prompt and response contract.
  • backend/src/pantry_pilot/ai.py: provider-specific OpenAI calls behind a narrow interface.
  • SQLite: local persistence for inventory and receipt import records.

Deliberate Non-Goals

  • No production hosting.
  • No authentication.
  • No cloud sync.
  • No shared household accounts.
  • No grocery ordering or external shopping integrations.