How lucifron28/provision works
Provision is a household pantry and food-inventory product: people use a native iOS app to scan and manage groceries, then track batches, expiration, consumption, and shopping through a FastAPI service. The app also exposes recipe discovery and shopping, meal planning, analytics, food-safety, and household-management capabilities. The excerpts show API-client and grocery-session behavior, plus the inventory data model; several feature branches are represented from the repository tree and README, so their internal call paths are not inferred.
Main entry points: APIClient.swift API client · database.py SQL database · sessions.py Grocery sessions · batch.py Inventory batches
Components 24
iOS Client
- SwiftUI app
frontend/frontend/ContentView.swift - Grocery intake
frontend/frontend/ViewModels/ScanViewModel.swift - Workflow service
frontend/frontend/Core/CookWithPipWorkflowService.swift - API client
frontend/frontend/Core/APIClient.swift - Offline cache
frontend/frontend/Core/LocalCacheStore.swift - Credential storage
frontend/frontend/Core/KeychainStore.swift
Backend API
- FastAPI app
backend/app/main.py - Authentication
backend/app/api/v1/endpoints/auth.py - Grocery sessions
backend/app/api/v1/endpoints/sessions.py - Inventory and products
backend/app/api/v1/endpoints/inventory.py - Shopping lists
backend/app/api/v1/endpoints/shopping.py - Food analytics
backend/app/api/v1/endpoints/analytics.py - Recipe endpoints
backend/app/api/v1/endpoints/recipes.py
Pantry Domain
- Inventory batches
backend/app/models/batch.py - Products
backend/app/models/product.py - Session records
backend/app/models/session.py - Inventory ledger
backend/app/models/event.py
Recipes and Planning
- Recipe shopping
backend/app/services/recipe_shopping.py - Meal planning
backend/app/services/meal_plans.py - AI recipes
backend/app/services/ai_recipes.py
Persistence and Security
- SQL database
backend/app/core/database.py - Household records
backend/app/models/household.py - Token security
backend/app/core/security.py
Other components
- Household member
Connections 24
- Household member → SwiftUI app: uses
- SwiftUI app → API client: requests data
frontend/frontend/Core/APIClient.swift - Grocery intake → API client: submits intake
frontend/frontend/Core/APIClient.swift - Workflow service → API client: delegates requests
frontend/frontend/Core/CookWithPipWorkflowService.swift - API client → Offline cache: caches responses
frontend/frontend/Core/APIClient.swift - API client → FastAPI app: calls REST API
- FastAPI app → Authentication: registers routes
- Authentication → SQL database: uses sessions
backend/app/api/v1/endpoints/auth.py - Authentication → Token security: uses token security
backend/app/api/v1/endpoints/auth.py - Grocery sessions → SQL database: uses sessions
backend/app/api/v1/endpoints/sessions.py - Grocery sessions → Session records: reads and writes
backend/app/api/v1/endpoints/sessions.py - Grocery sessions → Inventory batches: creates batches
backend/app/api/v1/endpoints/sessions.py - Grocery sessions → Inventory ledger: records intake
backend/app/api/v1/endpoints/sessions.py - Inventory batches → Products: references product
backend/app/models/batch.py - Inventory batches → Session records: references session
backend/app/models/batch.py - Inventory ledger → Inventory batches: references batch
backend/app/models/event.py - Inventory and products → SQL database: uses persistence
- Shopping lists → SQL database: uses persistence
- Food analytics → SQL database: queries records
- Recipe endpoints → Recipe shopping: uses service
- Recipe endpoints → Meal planning: uses service
- Recipe endpoints → AI recipes: uses service
- Household records → SQL database: stored in
- Credential storage → API client: stores credentials for