4ce2df0a2b
CI / backend (push) Successful in 52s
CI / frontend (push) Successful in 14s
Deploy Staging / deploy (push) Successful in 18s
CI / backend (pull_request) Successful in 52s
CI / frontend (pull_request) Successful in 15s
Security / secrets (push) Successful in 4s
Security / dependencies (push) Successful in 55s
Security / secrets (pull_request) Successful in 4s
Security / dependencies (pull_request) Successful in 54s
49 lines
2.9 KiB
Markdown
49 lines
2.9 KiB
Markdown
# Multi-Provider Email Platform + Admin/Settings — Design
|
|
|
|
**Design + architecture phase. No implementation until approved.**
|
|
|
|
Evolves InboxIntel from a single-account Gmail tool into a **multi-provider platform**
|
|
(Gmail · Outlook/Graph · future IMAP) for a **small self-hosted team**, with settings,
|
|
feature flags, and an admin panel. Extends — does not discard — the
|
|
[discovery blueprint](../README.md).
|
|
|
|
## Locked decisions (from interview)
|
|
1. **Tenancy:** **small team, self-hosted, one org.** Roles = **Admin / Member**. Shared
|
|
system settings + feature flags; each member's mail is private to them. No multi-tenant
|
|
org table (one implicit org); the model stays extensible to multi-org later.
|
|
2. **App identity = provider OAuth.** The first Google/Microsoft sign-in **creates/authenticates
|
|
the InboxIntel user**; additional mailboxes **link** to that same user. **No passwords stored.**
|
|
|
|
## How this reshapes the blueprint (the "review" deltas)
|
|
| Blueprint assumption | New reality |
|
|
|----------------------|-------------|
|
|
| Single-user, local-first | **Multi-user (small team)** with Admin/Member RBAC + admin panel |
|
|
| Gmail-centric `Email`/`Sender` | **Account-scoped, provider-normalised** model (`IEmailProvider`) |
|
|
| AI gated by `Ai:Mode` + user pref | **AI gated by system feature flag → user pref → capability** (flag wins) |
|
|
| One implicit mailbox | **N provider accounts per user** (`accounts` table + per-account sync cursors) |
|
|
| Sync = `GmailSyncWorker` | **Provider-agnostic sync orchestrator** dispatching to provider adapters |
|
|
|
|
These deltas will be back-ported into main-blueprint docs [08](../08-technical-architecture.md)
|
|
and [09](../09-roadmap.md) when this design is approved.
|
|
|
|
## Documents
|
|
| # | Doc | Covers (brief part) | Status |
|
|
|---|-----|---------------------|--------|
|
|
| 01 | [Provider Abstraction](01-provider-abstraction.md) | Part 1 | ✅ draft |
|
|
| 02 | [Auth & Sign-in](02-auth-and-signin.md) | Part 2 | ✅ draft |
|
|
| 03 | [Database Design](03-database-design.md) | Part 6 | ✅ draft |
|
|
| 04 | [Settings & Feature Flags](04-settings-and-flags.md) | Part 3 | ✅ draft |
|
|
| 05 | [Admin System](05-admin-system.md) | Part 4 | ✅ draft |
|
|
| 06 | [Security Model](06-security-model.md) | Part 5 | ✅ draft |
|
|
| 07 | [UX Flows](07-ux-flows.md) | Part 7 | ✅ draft |
|
|
| 08 | [AI Feature-Flag Integration](08-ai-feature-flags.md) | Part 8 | ✅ draft |
|
|
| 09 | [Implementation Plan](09-implementation-plan.md) | Part 9 | ✅ draft |
|
|
| 10 | [Git Workflow](10-git-workflow.md) | Part 11 | ✅ draft |
|
|
| 11 | [Risk Analysis](11-risk-analysis.md) | output | ✅ draft |
|
|
| 12 | [Migration Guide](12-migration-guide.md) | Part 10 | ✅ draft |
|
|
|
|
## Non-negotiables carried forward
|
|
Provider logic **never leaks into Domain** · search works **across all a user's accounts**
|
|
· emails stored in **one unified format** · **AI never required** for core function ·
|
|
tokens **encrypted at rest** · admin actions **audit-logged**.
|