How sat-14/app works
Project Type & Purpose
• This is a full-stack “Smart Bills Reminder” system combining:
• A Flask-based REST API backend (Python 3.9+)
• A cross-platform mobile GUI built with Kivy
• A lightweight SQLite data store
• Background scheduling for reminders
• Integrations with AI (Gemini/OpenAI/ElevenLabs) and communications (Twilio/Bland AI)
File Structure Analysis
• Top-level:
• .gitattributes, LICENSE, README.md
• backend/ (all server code + mobile UI under backend/frontend/)
• backend/
• app.py, config.py, models.py: core Flask entry and DB models
• auth.py, bills.py, loans.py, receipts.py, reminders.py, chatbot.py, reset_password.py: API endpoints (business logic)
• ai_service.py, elevenlabs_service.py, reminder_service.py, local_storage_service.py: integration services
• scheduler.py: APScheduler job definitions
• requirements.txt, .env, bills_reminder.json: configs & dependencies
• frontend/: Kivy application (main.py + .kv screen layouts)
Key README Insights
• Client Layer (mobile app) → API Gateway → Business Logic → Data Layer → External Services
• Core features: recurring bills, loan tracking, receipts, AI chatbot, multi-channel reminders
a. Main Components
– Mobile App (Kivy screens & API manager)
– Flask API Server
– Scheduler (APScheduler)
– Database (SQLite)
– File Storage (local receipts folder)
– AI Services (Google Gemini, OpenAI GPT-4, ElevenLabs TTS)
– Communication Services (Twilio WhatsApp/SMS, Bland AI voice calls)
b. Component Relationships
– Mobile App → (HTTP/REST) → Flask API
– Flask API ↔ SQLite (via SQLAlchemy)
– Flask API → Scheduler (schedule definitions)
– Scheduler → Flask API (invoke reminder logic)
– Reminder Service in API → Communication Services → End Users
– API → AI Services (chatbot & content generation)
– Receipt uploads → stored on local filesystem → served by API
c. Architectural Patterns
– Layered Architecture (Client, API Gateway/Controllers, Services/Business Logic, Persistence)
– Modular service integrations (AI, communications, storage)
– Background job scheduling for asynchronous tasks
– MVC flavor in Kivy frontend (Screen Manager + .kv templates)
d. Key Technologies
– Backend: Python, Flask, SQLAlchemy, APScheduler, Flask-JWT-Extended, Bcrypt, Cryptography
– Frontend: Python, Kivy, KivyMD
– Database: SQLite
– AI: Google Gemini, OpenAI GPT-4, ElevenLabs TTS
– Comm: Twilio API (WhatsApp/SMS), Bland AI
Diagramming Conventions
• Related components in labeled containers (“Mobile App,” “Backend Services,” “External Services”)
Detail & Scope
• Every major module: auth, bills, loans, receipts, reminders, chatbot
• Scheduler loop triggering reminder logic
• Optional flows (WhatsApp vs. SMS vs. voice)
• AI decision point in the chatbot/reminder services