How kvkrpm/ai-subscription-optimizer-with-intelligent-assistant works
SubManager is a subscription-management dashboard: users authenticate, manage subscription records, review spending and renewals, and ask an AI assistant questions about their subscriptions. The Streamlit client calls a FastAPI API; the backend uses MySQL-backed domain records, an agent/LLM and memory services, and scheduled email reminders. The README also documents Google OAuth and web search. Some frontend pages and backend subsystems are only represented by paths and SOURCE INDEX references; uncertain internal links are omitted.
Main entry points: api_client.py API client · auth_router.py Authentication routes · main.py FastAPI application · models.py User and subscription records
Components 27
Streamlit client
- Streamlit app
frontend/app.py - API client
frontend/utils/api_client.py - User sidebar
frontend/utils/sidebar.py - Dashboard page
frontend/pages/_dashboard.py - Manage subscriptions
frontend/pages/_manage.py - Assistant page
frontend/pages/_assistant.py
API and identity
- FastAPI application
backend/main.py - Authentication routes
backend/routers/auth_router.py - JWT and passwords
backend/auth.py - Current-user dependency
backend/dependencies.py
Subscription domain
- Subscription routes
backend/routers/subscriptions.py - Dashboard summary
backend/routers/dashboard.py
AI assistant
- Assistant routes
backend/routers/assistant.py - Agent orchestration
backend/services/agent_service.py - LLaMA service
backend/services/llm_service.py - Conversation memory
backend/services/memory_service.py - Web search
backend/services/search_service.py - FAISS store
memory/faiss_store.py
Reminders and storage
- Reminder scheduler
backend/scheduler.py - Reminder service
backend/services/reminder_service.py - SQLAlchemy database
backend/database.py - User and subscription records
backend/models.py
Other components
- User
- Google OAuth
- Ollama
- DuckDuckGo search
- Gmail SMTP
Connections 41
- User → Streamlit app: uses
README.md - Streamlit app → API client: calls
frontend/app.py - Dashboard page → API client: requests data
frontend/pages/_dashboard.py - Manage subscriptions → API client: manages records
frontend/pages/_manage.py - Assistant page → API client: sends prompts
frontend/pages/_assistant.py - User sidebar → API client: fetches user
frontend/utils/sidebar.py - API client → Authentication routes: calls auth endpoints
frontend/utils/api_client.py - API client → Subscription routes: calls subscription endpoints
frontend/utils/api_client.py - API client → Dashboard summary: requests summary
frontend/utils/api_client.py - API client → Assistant routes: sends chat
frontend/utils/api_client.py - FastAPI application → Authentication routes: registers routes
backend/main.py - FastAPI application → Subscription routes: registers routes
backend/main.py - FastAPI application → Dashboard summary: registers routes
backend/main.py - FastAPI application → Assistant routes: registers routes
backend/main.py - Authentication routes → SQLAlchemy database: opens sessions
backend/routers/auth_router.py - Authentication routes → User and subscription records: queries users
backend/routers/auth_router.py - Authentication routes → JWT and passwords: hashes and signs
backend/routers/auth_router.py - Authentication routes → Current-user dependency: uses current user
backend/routers/auth_router.py - User → Google OAuth: authenticates with
README.md - Authentication routes → Google OAuth: exchanges OAuth code
backend/routers/auth_router.py - Subscription routes → SQLAlchemy database: uses sessions
backend/routers/subscriptions.py - Subscription routes → User and subscription records: reads and writes
backend/routers/subscriptions.py - Dashboard summary → SQLAlchemy database: uses sessions
backend/routers/dashboard.py - Dashboard summary → User and subscription records: queries records
backend/routers/dashboard.py - Assistant routes → SQLAlchemy database: loads subscriptions
backend/routers/assistant.py - Assistant routes → User and subscription records: queries records
backend/routers/assistant.py - Assistant routes → Agent orchestration: runs agent
backend/routers/assistant.py - Assistant routes → Conversation memory: saves conversation
backend/routers/assistant.py - Agent orchestration → Web search: uses search
backend/services/agent_service.py - Agent orchestration → LLaMA service: generates responses
README.md - Conversation memory → User and subscription records: uses memory records
backend/services/memory_service.py - Conversation memory → FAISS store: may use vector storage
- Web search → DuckDuckGo search: queries web
backend/services/search_service.py - LLaMA service → Ollama: queries model
backend/services/llm_service.py - FastAPI application → Reminder scheduler: starts and stops
backend/main.py - Reminder scheduler → Reminder service: runs checks
backend/scheduler.py - FastAPI application → Reminder service: triggers reminders
backend/main.py - Reminder service → SQLAlchemy database: opens session
backend/services/reminder_service.py - Reminder service → User and subscription records: reads renewals
backend/services/reminder_service.py - Reminder service → Gmail SMTP: sends email
backend/services/reminder_service.py - SQLAlchemy database → User and subscription records: defines tables
backend/models.py