- flake.nix: Flutter 3.41.6, Android SDK, Stalwart, GTK3/build tools for Linux desktop, go-task - .envrc: copied from sharedinbox — use flake + dotenv_if_exists - Taskfile.yml: analyze, test, integration, codegen, run tasks - stalwart-dev/: IMAP+SMTP dev server reused from sharedinbox - test/integration/imap_sync_test.dart: login, list mailboxes, send via SMTP and receive via IMAP - pubspec.yaml: add flutter_secure_storage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.6 KiB
1.6 KiB
SharedInbox Flutter — Plan
Architecture
IMAP/SMTP server
↓
AccountSyncManager (IMAP IDLE per account)
↓ writes
Drift (SQLite, local DB)
↓ reads
UI (Riverpod + go_router)
UI never touches the network. The sync layer runs independently.
Phases
| Phase | Scope | Status |
|---|---|---|
| 0 — Scaffold | pubspec, Drift schema, DI, router, enough_mail vendored | Done |
| 1 — Core models | Account, Mailbox, Email, EmailBody, repository interfaces |
Done |
| 2 — DB layer | Drift tables, AccountRepositoryImpl, MailboxRepositoryImpl, EmailRepositoryImpl |
Done |
| 3 — IMAP sync | connectImap, MailboxRepositoryImpl.syncMailboxes, EmailRepositoryImpl.syncEmails |
Done |
| 4 — IMAP IDLE | AccountSyncManager with exponential-backoff reconnect |
Done |
| 5 — SMTP send | connectSmtp, EmailRepositoryImpl.sendEmail |
Done |
| 6 — UI | All screens: AccountList, AddAccount, MailboxList, EmailList, EmailDetail, Compose, Settings | Done |
| 7 — Dev tooling | Nix flake, .envrc, Taskfile, Stalwart dev server (IMAP+SMTP), integration tests |
Done |
| 8 — Code-gen | Run task codegen to generate database.g.dart and Riverpod providers |
Pending |
| 9 — Platform targets | Android, iOS, Linux, macOS, Windows entry points | Pending |
| 10 — Polish | Reply prefill, attachment open, thread view, search | Next |
Next candidates
- Reply-with-prefill (subject/body/from populated from original email)
- Thread view (group by
References/In-Reply-To) - Search (IMAP
SEARCHcommand) - Attachment download + open
- Draft auto-save