A Flask-based virtual assistant that integrates task management, calendar, and AI services. Uses a provider-based architecture with support for multiple backends (Google, O365, Todoist, OpenAI).
virtual_assistant/- Main Python packageflask_app.py- Application factory and core routes (the real entry point)__init__.py- Secondary app factory (simpler, used by migrations)ai/- AI provider integrations (OpenAI, Grok placeholder)auth/- Authentication (Google Identity Services, Flask-Login)database/- SQLAlchemy models (User, ExternalAccount, Task/TaskAccount)meetings/- Calendar providers (Google Calendar, O365)tasks/- Task providers (Todoist, SQLite, Outlook, Google Tasks)schedule/- Schedule generation routestemplates/- Jinja2 HTML templatesstatic/- CSS, JS, faviconutils/- Settings, logger
migrations/- Alembic/Flask-Migrate schema migrationsmemory-bank/- Legacy context files (from Cursor)oneoff/- One-off scripts
- Python 3.12, Flask, SQLAlchemy, Flask-Migrate (Alembic)
- Poetry for dependency management
- Flask-Login for session management
- Google Identity Services for user auth
- OAuth for calendar/task provider auth
- Provider pattern: abstract base classes with concrete implementations
- Factory pattern for provider instantiation
- Application factory (
create_app()) inflask_app.py - Manager classes coordinate multiple providers
.flaskenvsetsFLASK_APP=virtual_assistant.flask_apppoetry run flask runto start the dev server
- SQLAlchemy ORM with Flask-SQLAlchemy
- Models: User, ExternalAccount, TaskAccount, Task
- Alembic migrations in
migrations/ - ExternalAccount unifies calendar account management (was CalendarAccount)
- Core architecture complete
- Calendar providers (Google, O365) working
- OpenAI provider working
- Grok provider is a placeholder (remove or implement)
- Task providers need testing (Todoist, SQLite)
- Outlook/Google Tasks providers are stubs
- ExternalAccount refactor partially complete (see memory-bank/external_account_refactor.md)
- Dual user management systems need consolidation (prefer DB approach)
The package is virtual_assistant. All internal imports use virtual_assistant.*.