How namkhasnh/easy_phone_ai works
EasyPhoneAI is an iOS assistant that turns typed, spoken, or photographed requests into editable task drafts, then executes approved actions through device services. Its backend provides parsing, OCR extraction, account, health, and media APIs, with LLM-backed processing and usage controls. The excerpts show the OCR and review flows and TaskEngine responsibilities; the SOURCE INDEX supports additional module links. The README is empty, and unsampled feature details and some app-to-backend wiring remain uncertain, so those relationships are omitted rather than inferred.
Main entry points: TaskEngine.swift Task engine · main.py API application · parse_service.py Request parsing · extract_service.py OCR extraction
Components 27
iOS app
- App shell
EasyPhoneAI/App/EasyPhoneApp.swift - Conversation
EasyPhoneAI/Features/Conversation/ConversationViewModel.swift - Photo capture
EasyPhoneAI/Features/OCR/OCRCaptureViewModel.swift - Draft review
EasyPhoneAI/Features/Review/ReviewViewModel.swift - API client
EasyPhoneAI/Core/Networking/APIClient.swift
Task workflow
- Task engine
EasyPhoneAI/Core/Engine/TaskEngine.swift - Task draft
EasyPhoneAI/Core/Models/TaskDraft.swift - Task steps
EasyPhoneAI/Core/Models/TaskStep.swift - Fields and rules
EasyPhoneAI/Core/Models/FieldCatalog.swift - Draft validation
EasyPhoneAI/Core/Engine/Validator.swift - Approval hash
EasyPhoneAI/Core/Engine/ApprovalHash.swift - Step execution
EasyPhoneAI/Core/Engine/StepExecutor.swift - Draft storage
EasyPhoneAI/Core/Services/TaskRepository.swift
Device services
- Permissions
EasyPhoneAI/Core/Permissions/PermissionManager.swift - Device actions
EasyPhoneAI/Core/Services/Live
Backend APIs
- API application
backend/app/main.py - Request parsing
backend/app/services/parse_service.py - OCR extraction
backend/app/services/extract_service.py - Image OCR
backend/app/services/ocr_service.py - LLM gateway
backend/app/services/llm.py - Prompt library
backend/app/services/prompts.py - Schema checks
backend/app/services/schema_check.py - Usage metering
backend/app/services/metering.py - Health endpoint
backend/app/routers/health.py - Account endpoint
backend/app/routers/me.py - Media endpoint
backend/app/routers/media.py
Other components
- User
Connections 37
- User → App shell: opens
- User → Conversation: submits request
- User → Photo capture: chooses photo
EasyPhoneAI/Features/OCR/OCRCaptureViewModel.swift - Photo capture → API client: extracts text
EasyPhoneAI/Features/OCR/OCRCaptureViewModel.swift - Photo capture → Draft storage: saves draft
EasyPhoneAI/Features/OCR/OCRCaptureViewModel.swift - Photo capture → Task engine: applies extraction
EasyPhoneAI/Features/OCR/OCRCaptureViewModel.swift - Draft review → Task engine: forwards intents
EasyPhoneAI/Features/Review/ReviewViewModel.swift - Draft review → Permissions: checks access
EasyPhoneAI/Features/Review/ReviewViewModel.swift - Task engine → Step execution: executes step
EasyPhoneAI/Core/Engine/TaskEngine.swift - Task engine → Draft storage: saves mutations
EasyPhoneAI/Core/Engine/TaskEngine.swift - Task engine → Draft validation: validates draft
EasyPhoneAI/Core/Engine/TaskEngine.swift - Task engine → Approval hash: checks approval
EasyPhoneAI/Core/Engine/TaskEngine.swift - Task engine → Fields and rules: uses catalog
EasyPhoneAI/Core/Engine/TaskEngine.swift - Task engine → Task steps: mutates state
EasyPhoneAI/Core/Engine/TaskEngine.swift - Draft storage → Task draft: stores
EasyPhoneAI/Core/Models/TaskDraft.swift - Task draft → Task steps: contains
EasyPhoneAI/Core/Models/TaskDraft.swift - Task steps → Fields and rules: contains
EasyPhoneAI/Core/Models/TaskStep.swift - Step execution → Permissions: requires access
EasyPhoneAI/Core/Permissions/PermissionManager.swift - Step execution → Device actions: dispatches actions
- API client → API application: calls API
- API application → Request parsing: routes parse
backend/app/main.py - API application → OCR extraction: routes extract
backend/app/main.py - API application → Health endpoint: routes health
backend/app/main.py - API application → Account endpoint: routes account
backend/app/main.py - API application → Media endpoint: routes media
backend/app/main.py - Request parsing → LLM gateway: calls model
backend/app/services/parse_service.py - Request parsing → Prompt library: uses prompts
backend/app/services/parse_service.py - Request parsing → Schema checks: checks output
backend/app/services/parse_service.py - Request parsing → Usage metering: records usage
backend/app/services/parse_service.py - OCR extraction → LLM gateway: calls model
backend/app/services/extract_service.py - OCR extraction → Prompt library: uses prompts
backend/app/services/extract_service.py - OCR extraction → Schema checks: checks output
backend/app/services/extract_service.py - OCR extraction → Usage metering: records usage
backend/app/services/extract_service.py - Image OCR → LLM gateway: calls model
backend/app/services/ocr_service.py - Image OCR → Prompt library: uses prompts
backend/app/services/ocr_service.py - Image OCR → Schema checks: checks output
backend/app/services/ocr_service.py - Image OCR → Usage metering: records usage
backend/app/services/ocr_service.py