|
| 1 | +# ObjectStack Mobile — Roadmap |
| 2 | + |
| 3 | +> **Date**: 2026-02-12 |
| 4 | +> **SDK**: `@objectstack/client@3.0.0`, `@objectstack/client-react@3.0.0`, `@objectstack/spec@3.0.0` |
| 5 | +> **Tests**: ✅ 540/540 passing (63 suites, ~85% coverage) |
| 6 | +
|
| 7 | +--- |
| 8 | + |
| 9 | +## 1. Project Status |
| 10 | + |
| 11 | +The ObjectStack Mobile client has completed all core development phases (0–6) and spec alignment phases (9–10). The SDK is upgraded to v3.0.0 (spec v3.0.0: 12 modules, 171 schemas). |
| 12 | + |
| 13 | +### What's Implemented |
| 14 | + |
| 15 | +- **23 custom hooks** covering all SDK namespaces |
| 16 | +- **12 view renderers** (List, Form, Detail, Dashboard, Kanban, Calendar, Chart, Timeline, Map, Report, Page + widgets) |
| 17 | +- **13 UI primitives** + 9 common components |
| 18 | +- **24 lib modules** (auth, cache, offline, security, analytics, etc.) |
| 19 | +- **4 Zustand stores** (app, ui, sync, security) |
| 20 | +- **4 Maestro E2E flows** (configured, pending backend) |
| 21 | +- Full authentication (better-auth), offline-first (SQLite), i18n, CI/CD (EAS) |
| 22 | + |
| 23 | +### Tech Stack |
| 24 | + |
| 25 | +| Category | Technology | |
| 26 | +|----------|-----------| |
| 27 | +| Runtime | Expo SDK 54, TypeScript 5.9 strict | |
| 28 | +| Navigation | Expo Router (file-based) | |
| 29 | +| Styling | NativeWind v4 (Tailwind CSS) | |
| 30 | +| Client SDK | `@objectstack/client@3.0.0` + `@objectstack/client-react@3.0.0` | |
| 31 | +| State | Zustand + TanStack Query v5 | |
| 32 | +| Offline | expo-sqlite + sync queue | |
| 33 | +| Auth | better-auth v1.4.18 + `@better-auth/expo` | |
| 34 | +| Monitoring | Sentry | |
| 35 | +| Testing | Jest + RNTL + MSW + Maestro | |
| 36 | +| CI/CD | GitHub Actions + EAS Build/Update | |
| 37 | + |
| 38 | +--- |
| 39 | + |
| 40 | +## 2. Development Phases |
| 41 | + |
| 42 | +### Phase 0–3: Foundation ✅ |
| 43 | + |
| 44 | +| Phase | Description | Status | |
| 45 | +|-------|-------------|--------| |
| 46 | +| 0 | Foundation (Expo, Auth, Navigation, State, UI primitives) | ✅ | |
| 47 | +| 1 | SDK Integration (Client, Provider, Hooks, Metadata Cache) | ✅ | |
| 48 | +| 2 | ObjectUI Rendering Engine (12 view types, actions) | ✅ | |
| 49 | +| 3 | ObjectQL Data Layer (Offline, Sync, Query Builder, Batch) | ✅ | |
| 50 | + |
| 51 | +### Phase 4–5: Features ✅ |
| 52 | + |
| 53 | +| Phase | Description | Status | |
| 54 | +|-------|-------------|--------| |
| 55 | +| 4A | SDK Features (Files, Analytics, Charts, Kanban, Calendar, Security) | ✅ | |
| 56 | +| 4B | ObjectOS Integration (Permissions, Workflow, Realtime, Notifications) | ✅ | |
| 57 | +| 5A | Advanced Features (i18n, RTL, Performance, Testing, CI/CD) | ✅ | |
| 58 | +| 5B | Advanced Features · SDK (AI/NLQ, Server i18n, Hook aliases) | ✅ | |
| 59 | + |
| 60 | +### Phase 6: Production Readiness ✅ (mostly) |
| 61 | + |
| 62 | +| Feature | Status | |
| 63 | +|---------|--------| |
| 64 | +| Crash Reporting (Sentry) | ✅ | |
| 65 | +| Feature Flags, Remote Config, Analytics | ✅ | |
| 66 | +| Security Audit, Performance Benchmarks | ✅ | |
| 67 | +| App Store Readiness | ✅ | |
| 68 | +| E2E Test Execution | ⚠️ Configured, pending backend | |
| 69 | + |
| 70 | +### Phase 9–10: Spec Alignment — Core + UI ✅ |
| 71 | + |
| 72 | +| Feature | Status | |
| 73 | +|---------|--------| |
| 74 | +| Automation Hook (`useAutomation`) + Approval Process UI | ✅ | |
| 75 | +| Package Management (`usePackageManagement`) + UI | ✅ | |
| 76 | +| Analytics Explain (`useAnalyticsQuery.explain()`) | ✅ | |
| 77 | +| Report Renderer (tabular/summary/matrix/chart) | ✅ | |
| 78 | +| SDUI Page Composition (`PageRenderer`) | ✅ | |
| 79 | +| Widget System (`widget-registry` + `WidgetHost`) | ✅ | |
| 80 | +| Theme Token Mapping (`theme-bridge.ts`) | ✅ | |
| 81 | + |
| 82 | +--- |
| 83 | + |
| 84 | +## 3. Spec v3.0.0 Compliance Matrix |
| 85 | + |
| 86 | +> `@objectstack/spec` is the protocol "constitution". v3.0.0 restructured from 15 → 12 modules. |
| 87 | +> Removed: `driver`, `auth`, `hub`, `permission`. Added: `security` (RLS, Policy, Sharing, Territory). |
| 88 | +> Total: 171 Zod schemas, 7,095+ `.describe()` annotations. |
| 89 | +
|
| 90 | +### ✅ Fully Implemented |
| 91 | + |
| 92 | +| Spec Module | Mobile Hook / Component | |
| 93 | +|-------------|------------------------| |
| 94 | +| `spec/api` — CRUD, Metadata, Auth, Views | `useQuery`, `useMutation`, `useObject`, `useView` | |
| 95 | +| `spec/api` — Permissions | `usePermissions` | |
| 96 | +| `spec/api` — Workflow | `useWorkflowState` | |
| 97 | +| `spec/api` — Realtime/WebSocket | `useSubscription` | |
| 98 | +| `spec/api` — Notifications | `useNotifications` | |
| 99 | +| `spec/api` — AI (NLQ, Chat, Suggest, Insights) | `useAI` | |
| 100 | +| `spec/api` — i18n | `useServerTranslations` | |
| 101 | +| `spec/api` — Files | `useFileUpload` | |
| 102 | +| `spec/api` — Analytics | `useAnalyticsQuery` / `useAnalyticsMeta` | |
| 103 | +| `spec/api` — Automation Triggers | `useAutomation` | |
| 104 | +| `spec/api` — Package Management | `usePackageManagement` | |
| 105 | +| `spec/api` — Batch Operations | `useBatchMutation` | |
| 106 | +| `spec/ui` — Report Views | `ReportRenderer` | |
| 107 | +| `spec/ui` — SDUI Pages | `PageRenderer` | |
| 108 | +| `spec/ui` — Widgets | `widget-registry` + `WidgetHost` | |
| 109 | +| `spec/ui` — Theme Tokens | `theme-bridge.ts` | |
| 110 | + |
| 111 | +### 🟡 Gaps — To Do |
| 112 | + |
| 113 | +| Spec Module | Gap | Priority | |
| 114 | +|-------------|-----|----------| |
| 115 | +| `spec/ai` — Conversation Session | Missing session persistence, token budget | 🟡 | |
| 116 | +| `spec/ai` — RAG Pipeline | Not implemented | 🟡 | |
| 117 | +| `spec/ai` — MCP Integration | Not implemented (full MCP 2.0) | 🟡 | |
| 118 | +| `spec/ai` — Agent System | Not implemented (multi-agent groups) | 🟡 | |
| 119 | +| `spec/ai` — Cost Management | Not implemented | 🟢 | |
| 120 | +| `spec/ai` — DevOps Agent / Code Gen / Predictive | Not implemented | 🟢 | |
| 121 | +| `spec/security` — RLS | Not implemented | 🟡 | |
| 122 | +| `spec/security` — Policies | Not implemented | 🟡 | |
| 123 | +| `spec/security` — Sharing Rules | Not implemented | 🟡 | |
| 124 | +| `spec/security` — Territory | Not implemented | 🟢 | |
| 125 | +| `spec/ui` — Animation / Gesture | Not implemented | 🟢 | |
| 126 | +| `spec/ui` — Accessibility (a11y) | Not implemented | 🟡 | |
| 127 | +| `spec/ui` — Offline/Sync Config | Self-built (expo-sqlite), can align | 🟢 | |
| 128 | +| `spec/automation` — Flow Builder | Not implemented | 🟡 | |
| 129 | +| `spec/automation` — ETL / Connectors | Not implemented | 🟢 | |
| 130 | +| `spec/system` — Collaboration/CRDT | Not implemented | 🟡 | |
| 131 | +| `spec/system` — Awareness/Presence | Not implemented | 🟡 | |
| 132 | +| `spec/system` — Audit Log | Not implemented | 🟢 | |
| 133 | + |
| 134 | +Priority: 🔴 Blocks v1.0 · 🟡 Enhances compliance/UX · 🟢 Defer to post-GA |
| 135 | + |
| 136 | +--- |
| 137 | + |
| 138 | +## 4. Next: v1.0 GA Launch |
| 139 | + |
| 140 | +> **Duration**: 2–3 weeks | **Prerequisites**: Running backend + physical devices |
| 141 | +
|
| 142 | +### 4.1 E2E Test Execution 🔴 |
| 143 | + |
| 144 | +- [ ] Set up test backend, seed data |
| 145 | +- [ ] Execute 4 Maestro flows (auth, navigation, list, CRUD) |
| 146 | +- [ ] Fix integration issues |
| 147 | + |
| 148 | +### 4.2 Performance Profiling 🟡 |
| 149 | + |
| 150 | +- [ ] Build production preview via EAS |
| 151 | +- [ ] Profile on real iOS/Android devices (60fps scroll, <100ms form, <500ms API, <200MB RAM) |
| 152 | + |
| 153 | +### 4.3 App Store Launch 🔴 |
| 154 | + |
| 155 | +- [ ] Finalize app icon, splash screen, screenshots |
| 156 | +- [ ] Privacy policy, Terms of Service, content ratings |
| 157 | +- [ ] Production build → TestFlight/Play internal → Public review |
| 158 | + |
| 159 | +--- |
| 160 | + |
| 161 | +## 5. Phase 11: AI & Intelligence |
| 162 | + |
| 163 | +> **Duration**: 3–4 weeks |
| 164 | +> v3.0.0 expanded AI module from ~100 to 187 exports. |
| 165 | +
|
| 166 | +### 11.1 Conversation Session Persistence 🟡 |
| 167 | + |
| 168 | +- [ ] Extend `useAI` — session create/resume, persistent history (SQLite), token budget, `ConversationAnalytics` |
| 169 | +- [ ] Session list UI for switching conversations |
| 170 | + |
| 171 | +### 11.2 RAG Pipeline 🟡 |
| 172 | + |
| 173 | +- [ ] `hooks/useRAG.ts` — query + source citations + confidence scores |
| 174 | +- [ ] Integrate into `useAI` chat flow |
| 175 | + |
| 176 | +### 11.3 MCP Awareness 🟡 |
| 177 | + |
| 178 | +- [ ] `hooks/useMCPTools.ts` — discover/trigger MCP-connected tools via server proxy |
| 179 | +- [ ] Show tool availability in AI chat UI |
| 180 | + |
| 181 | +### 11.4 Agent Orchestration 🟡 |
| 182 | + |
| 183 | +- [ ] `hooks/useAgent.ts` — start task, monitor progress, typed agent actions (multi-agent groups) |
| 184 | +- [ ] `components/ai/AgentProgress.tsx` |
| 185 | + |
| 186 | +### 11.5 AI Cost Management 🟢 |
| 187 | + |
| 188 | +- [ ] `hooks/useAICost.ts` — cost breakdown, budget limits, alerts |
| 189 | + |
| 190 | +### 11.6 Accessibility 🟡 |
| 191 | + |
| 192 | +- [ ] Audit renderers for ARIA props, focus management, keyboard navigation, WCAG contrast |
| 193 | + |
| 194 | +--- |
| 195 | + |
| 196 | +## 6. Phase 12: Security Module |
| 197 | + |
| 198 | +> 🆕 v3.0.0 `security` module (26 exports) replaces `auth`/`permission`/`hub`. |
| 199 | +> **Duration**: 2–3 weeks |
| 200 | +
|
| 201 | +### 12.1 RLS Awareness 🟡 |
| 202 | + |
| 203 | +- [ ] `hooks/useRLS.ts` — show RLS policies, access restrictions on list/detail views |
| 204 | + |
| 205 | +### 12.2 Security Policies 🟡 |
| 206 | + |
| 207 | +- [ ] `hooks/useSecurityPolicies.ts` — password/session/network policy display |
| 208 | + |
| 209 | +### 12.3 Sharing Rules 🟡 |
| 210 | + |
| 211 | +- [ ] `hooks/useSharing.ts` — record-level sharing + `SharePanel` component |
| 212 | + |
| 213 | +### 12.4 Territory Management 🟢 |
| 214 | + |
| 215 | +- [ ] `hooks/useTerritory.ts` — territory assignments on records |
| 216 | + |
| 217 | +--- |
| 218 | + |
| 219 | +## 7. Phase 13: Advanced Platform Features |
| 220 | + |
| 221 | +> **Duration**: 3–4 weeks (can overlap with other phases) |
| 222 | +
|
| 223 | +### 13.1 Collaboration & CRDT 🟡 |
| 224 | + |
| 225 | +- [ ] `hooks/useCollaboration.ts` — sessions, cursor tracking, presence indicators |
| 226 | +- [ ] `components/realtime/CollaborationOverlay.tsx` |
| 227 | + |
| 228 | +### 13.2 Audit Log 🟢 |
| 229 | + |
| 230 | +- [ ] `hooks/useAuditLog.ts` — timeline view on record details ("History" tab) |
| 231 | + |
| 232 | +### 13.3 Flow Visualization 🟢 |
| 233 | + |
| 234 | +- [ ] `components/automation/FlowViewer.tsx` — read-only flow diagram (nodes + edges) |
| 235 | + |
| 236 | +### 13.4 State Machine Visualization 🟢 |
| 237 | + |
| 238 | +- [ ] `components/workflow/StateMachineViewer.tsx` — diagram of states + transitions |
| 239 | + |
| 240 | +--- |
| 241 | + |
| 242 | +## 8. Future Roadmap (Post v1.0) |
| 243 | + |
| 244 | +| Version | Focus | |
| 245 | +|---------|-------| |
| 246 | +| v1.1 | UX refinements (onboarding, haptic, VoiceOver/TalkBack, WidgetKit) | |
| 247 | +| v1.2 | Notification Center (categories, inline actions, activity feed, comments) | |
| 248 | +| v1.3 | Messaging & Channels (Slack/Teams pattern, DMs, threads, file sharing) | |
| 249 | +| v1.4 | Offline-First (selective sync, three-way merge, offline analytics) | |
| 250 | +| v1.5 | Platform Integration (Siri Shortcuts, deep links, Share extension, Apple Watch) | |
| 251 | + |
| 252 | +--- |
| 253 | + |
| 254 | +## 9. Decision Matrix |
| 255 | + |
| 256 | +| Task | Blocks v1.0? | Est. Time | Priority | |
| 257 | +|------|-------------|-----------|----------| |
| 258 | +| E2E Testing | ✅ Yes | 1–2 days | 🔴 | |
| 259 | +| Performance Profiling | ⚠️ Recommended | 2–3 days | 🟡 | |
| 260 | +| App Store Assets + Submit | ✅ Yes | 1–2 weeks | 🔴 | |
| 261 | +| AI Sessions (11.1) | No | 3–4 days | 🟡 | |
| 262 | +| RAG (11.2) | No | 2–3 days | 🟡 | |
| 263 | +| MCP (11.3) | No | 2 days | 🟡 | |
| 264 | +| Agents (11.4) | No | 3–4 days | 🟡 | |
| 265 | +| AI Cost (11.5) | No | 2 days | 🟢 | |
| 266 | +| a11y (11.6) | No | 3–4 days | 🟡 | |
| 267 | +| RLS (12.1) | No | 3–4 days | 🟡 | |
| 268 | +| Security Policies (12.2) | No | 2 days | 🟡 | |
| 269 | +| Sharing (12.3) | No | 3 days | 🟡 | |
| 270 | +| Territory (12.4) | No | 1–2 days | 🟢 | |
| 271 | +| Collaboration (13.1) | No | 4–5 days | 🟡 | |
| 272 | +| Audit Log (13.2) | No | 2–3 days | 🟢 | |
| 273 | +| Flow Viz (13.3) | No | 3–4 days | 🟢 | |
| 274 | +| State Machine (13.4) | No | 2 days | 🟢 | |
| 275 | + |
| 276 | +**Total Phase 11–13**: ~8–10 weeks (can overlap with v1.0 launch) |
| 277 | + |
| 278 | +--- |
| 279 | + |
| 280 | +## 10. Success Criteria |
| 281 | + |
| 282 | +### v1.0 GA |
| 283 | + |
| 284 | +1. ✅ 540+ unit/integration tests passing |
| 285 | +2. ✅ All hooks and lib modules have test coverage |
| 286 | +3. ☐ All 4 Maestro E2E flows passing |
| 287 | +4. ☐ Performance metrics within targets on real devices |
| 288 | +5. ☐ Security audit passing |
| 289 | +6. ☐ App Store readiness score ≥ 90/100 |
| 290 | +7. ☐ App Store / Play Store review approved |
| 291 | + |
| 292 | +### v1.1 (Spec v3.0.0 Full Compliance) |
| 293 | + |
| 294 | +1. ☑ Phase 9–10 complete |
| 295 | +2. ☐ Phase 11 complete (AI, a11y) |
| 296 | +3. ☐ Phase 12 complete (Security) |
| 297 | +4. ☐ Phase 13 complete (Collaboration, audit, flow) |
| 298 | +5. ☐ All new hooks exported and tested |
| 299 | + |
| 300 | +--- |
| 301 | + |
| 302 | +## 11. For SDK Team — Suggested Upstream Hooks |
| 303 | + |
| 304 | +| Mobile Hook | SDK API | Notes | |
| 305 | +|-------------|---------|-------| |
| 306 | +| `usePermissions()` | `client.permissions.*` | RBAC enforcement | |
| 307 | +| `useWorkflowState()` | `client.workflow.*` | State machine UI | |
| 308 | +| `useSubscription()` | `client.realtime.*` | WebSocket management | |
| 309 | +| `useNotifications()` | `client.notifications.*` | Push lifecycle | |
| 310 | +| `useAI()` | `client.ai.*` | NLQ, chat, suggest | |
| 311 | +| `useServerTranslations()` | `client.i18n.*` | Server translations | |
| 312 | +| `useSavedViews()` | `client.views.*` | View CRUD | |
| 313 | +| `useAutomation()` | `client.automation.*` | Automation triggers | |
| 314 | +| `usePackageManagement()` | `client.packages.*` | Package lifecycle | |
| 315 | +| `useRAG()` | `client.ai.rag?` | 🆕 Needs server RAG | |
| 316 | +| `useCollaboration()` | `client.realtime.*` | 🆕 CRDT co-editing | |
| 317 | +| `useRLS()` | `client.security?` | 🆕 RLS awareness (v3.0.0) | |
| 318 | +| `useSharing()` | `client.security?` | 🆕 Sharing rules (v3.0.0) | |
| 319 | +| `useAICost()` | `client.ai.cost?` | 🆕 AI cost tracking (v3.0.0) | |
| 320 | +| `useMCPTools()` | `client.ai.mcp?` | 🆕 MCP tool discovery (v3.0.0) | |
| 321 | + |
| 322 | +--- |
| 323 | + |
| 324 | +*Last updated: 2026-02-12* |
0 commit comments