Project Relationships
Dependency Graph
graph TD
subgraph Apps["Applications"]
ReceiptOCR["Receipt OCR App"]
EmailEditor["Email Editor"]
FramerClone["Framer Clone"]
end
subgraph Packages["Shared Packages"]
DataTable["@marlinjai/data-table-*"]
SBSDK["@marlinjai/storage-brain-sdk"]
DBSDK["@marlinjai/data-brain-sdk"]
EmailCore["@marlinjai/email-editor-core"]
end
subgraph Infra["Infrastructure"]
BrainCore["Brain Core"]
SB["Storage Brain"]
DataBrain["Data Brain"]
end
subgraph Tooling["Tooling"]
Clearify["Clearify"]
end
ReceiptOCR --> DataTable
ReceiptOCR --> SBSDK
EmailEditor --> EmailCore
SBSDK --> SB
DBSDK --> DataBrain
DataTable --> DBSDK
SB --> BrainCore
DataBrain --> BrainCore
Clearify -.->|documents| Apps
Clearify -.->|documents| Packages
Integration Matrix
| Project | Brain Core | Storage Brain | Data Brain | Data Table | MobX ST | Cloudflare |
|---|---|---|---|---|---|---|
| Brain Core | -- | -- | -- | -- | -- | Workers |
| Storage Brain | Auth, crypto, errors | API + SDK | -- | -- | -- | Workers, R2, D1 |
| Data Brain | Auth, crypto, errors | -- | API + SDK | -- | -- | Workers, D1 |
| Data Table | -- | File adapter | DB adapter | -- | -- | D1 adapter |
| Receipt OCR App | -- | File uploads | -- | Expense display | -- | Pages |
| Email Editor | -- | -- | -- | -- | State mgmt | -- |
| Framer Clone | -- | -- | -- | -- | State mgmt | -- |
| Clearify | -- | -- | -- | -- | -- | -- |
Project Categories
Infrastructure
- Brain Core — Shared auth middleware, crypto utilities, error handling, base types
- Storage Brain — Multi-tenant file storage with workspaces and signed URLs (Workers + R2)
- Data Brain — Multi-tenant structured data API with workspaces (Workers + D1)
Packages
- Data Table — Notion-like database component (monorepo with core, react, adapters)
- Email Editor — Visual email template builder (monorepo with core, ui, blocks, editor)
Applications
- Receipt OCR App — Next.js expense tracking with AI-powered receipt scanning and chat
- Framer Clone — Visual website builder with infinite canvas and responsive design
Tooling
- Clearify — Documentation site generator (powers this site)
Shared Patterns
Brain Core
Both Storage Brain and Data Brain import from @marlinjai/brain-core:
createAuthMiddleware/createAdminAuthMiddlewarefor API key authhashApiKey,generateApiKey,verifyApiKeyfor key managementApiErrorclass andcreateErrorHandlerfactory- Base types:
BaseTenant,BaseWorkspace,BaseTenantContext
MobX State Tree (MST)
Both Email Editor and Framer Clone use MST for state management:
- Predictable state with snapshots and patches
- Fine-grained reactivity via MobX observers
- Undo/redo via snapshot history
- Type-safe models and actions
Adapter Pattern
Data Table uses the adapter pattern for pluggable backends:
DatabaseAdapterinterface — D1, Memory, Data Brain adaptersFileAdapterinterface — Storage Brain file adapter for file columns
@marlinjai/ Scope
All published packages use the @marlinjai/ npm scope for consistent naming.