Web (packages/web/) | Mobile (packages/mobile/) | |
|---|---|---|
| Framework | Next.js 15 + React 19 | Expo 53 + React Native 0.79 |
| Styling | Tailwind 4 | React Native StyleSheet |
| Build | Vite | Metro |
| Navigation | Next.js App Router | React Navigation 6 |
| UI library | custom components | None (custom) |
| Shared code | None | |
Dashboard, SessionCard, SessionDetail, Terminal, ProjectSidebar, CIBadge, PRStatus, ActivityDot, DynamicFavicon
HomeScreen, OrchestratorScreen, SessionDetailScreen, CommandsScreen, SettingsScreen, TerminalScreen, SpawnSessionScreen
| Tool | Approach | Stack |
|---|---|---|
| Goose | Electron desktop + web. Single React codebase. | React 19 + Radix + Tailwind + Electron Forge + Vite |
| 1code | Electron desktop. Single React codebase serves desktop + web. | React 19 + Radix + electron-vite + electron-toolkit |
| emdash | Desktop app (Electron/Tauri). Single codebase. | Electron or Tauri |
| 1code (mobile) | PWA — Progressive Web App from same codebase | Same React app, installable on phone |
Don't try to merge React Native and Next.js. Instead:
Map which components exist in both codebases and which are platform-specific:
| Component | Web | Mobile | Shareable? |
|---|---|---|---|
| Session Card | SessionCard.tsx | HomeScreen (inline) | Yes — data + logic |
| Session Detail | SessionDetail.tsx | SessionDetailScreen.tsx | Yes — data + logic |
| Terminal | Terminal.tsx + DirectTerminal.tsx | TerminalScreen.tsx | Partial — API layer |
| Project Sidebar | ProjectSidebar.tsx | OrchestratorScreen.tsx | Yes — data + logic |
| CI Badge | CIBadge.tsx | — | Yes (missing from mobile) |
| PR Status | PRStatus.tsx | — | Yes (missing from mobile) |
| Spawn Session | — | SpawnSessionScreen.tsx | Yes (missing from web) |
packages/shared/Extract into a shared package:
useSession(), useSessions(), useProject(), useAgentStatus()packages/shared/
├── src/
│ ├── types/ # SessionConfig, AgentStatus, etc.
│ ├── api/ # AO API client (REST + WebSocket)
│ ├── hooks/ # React hooks (framework-agnostic)
│ ├── store/ # Zustand stores
│ └── utils/ # Formatters, parsers
├── package.json # @composio/ao-shared
└── tsconfig.json
@composio/ao-sharedReplace inline types, API calls, and hooks with imports from shared package. Web keeps its own UI components (Radix + Tailwind).
@composio/ao-sharedReplace mobile's inline types and API calls with shared package imports. Mobile keeps its own React Native UI components.
Make the web dashboard installable on mobile devices:
manifest.json with app name, icons, theme colorThis gives mobile users the full dashboard without maintaining a separate React Native app.
Once PWA is solid, evaluate if the React Native app is still needed. If PWA covers all use cases:
packages/mobile/Instead of PWA, you could go the React Native Web route — use Expo Web to share React Native components on web. But this means:
Not recommended. The web dashboard is more mature. Build around it, not against it.
| Sub-task | Effort |
|---|---|
| Audit components | 0.5 days |
Create packages/shared/ with types + API + hooks | 2 days |
| Migrate web to shared | 1 day |
| Migrate mobile to shared | 1 day |
| PWA support | 1-2 days |
| Total | 5-7 days |
packages/shared/ exists with types, API client, hooks@composio/ao-shared