2026-02-26 21:55:41 -05:00
# Timmy Chat — Mobile App
2026-02-26 23:58:53 -05:00
A mobile chat interface for Timmy, the sovereign AI agent. Built with **Expo SDK 54 ** , **React Native ** , **TypeScript ** , and **NativeWind ** (Tailwind CSS).
2026-02-26 21:55:41 -05:00
## Features
- **Text Chat** — Send and receive messages with Timmy's full personality
- **Voice Messages** — Record and send voice notes via the mic button; playback with waveform UI
- **Image Sharing** — Take photos or pick from library; full-screen image viewer
- **File Attachments** — Send any document via the system file picker
- **Dark Arcane Theme** — Deep purple/indigo palette matching the Timmy Time dashboard
2026-02-26 23:58:53 -05:00
## Architecture
2026-02-26 21:55:41 -05:00
2026-02-26 23:58:53 -05:00
The mobile app is a **thin client ** — all AI processing happens on the Timmy dashboard backend (FastAPI + Ollama). The app communicates over two REST endpoints:
```
Mobile App ──POST /api/chat──► FastAPI Dashboard ──► Ollama (local LLM)
──POST /api/upload──► File storage
──GET /api/chat/history──► Chat history
```
No separate Node.js server is needed. Just point the app at your running Timmy dashboard.
2026-02-26 21:55:41 -05:00
## Project Structure
```
mobile-app/
├── app/ # Expo Router screens
│ ├── _layout.tsx # Root layout with providers
│ └── (tabs)/
│ └── index.tsx # Main chat screen
├── components/
│ ├── chat-bubble.tsx # Message bubble (text, image, voice, file)
│ ├── chat-header.tsx # Header with Timmy status
│ ├── chat-input.tsx # Input bar (text, mic, attachments)
│ ├── empty-chat.tsx # Empty state welcome screen
│ ├── image-viewer.tsx # Full-screen image modal
│ └── typing-indicator.tsx # Animated dots while Timmy responds
├── lib/
2026-02-26 23:58:53 -05:00
│ ├── chat-store.tsx # React Context chat state + API calls
│ └── _core/theme.ts # Color palette definitions
2026-02-26 21:55:41 -05:00
├── shared/
│ └── types.ts # ChatMessage type definitions
2026-02-26 23:58:53 -05:00
├── hooks/
│ ├── use-colors.ts # Current theme color palette hook
│ └── use-color-scheme.ts # System color scheme detection
├── constants/
│ └── theme.ts # Theme re-exports
2026-02-26 21:55:41 -05:00
└── tests/
└── chat.test.ts # Unit tests
```
## Setup
### Prerequisites
- Node.js 18+
- pnpm 9+
- Expo CLI (`npx expo` )
- iOS Simulator or Android Emulator (or physical device with Expo Go)
2026-02-26 23:58:53 -05:00
- **Timmy dashboard running** (provides the chat API)
2026-02-26 21:55:41 -05:00
2026-02-26 23:58:53 -05:00
### Install & Run
2026-02-26 21:55:41 -05:00
```bash
cd mobile-app
pnpm install
2026-02-26 23:58:53 -05:00
# Set your Timmy dashboard URL (your computer's IP on the local network)
export EXPO_PUBLIC_API_BASE_URL=http://192.168.1.100:8000
2026-02-26 21:55:41 -05:00
2026-02-26 23:58:53 -05:00
# Start the app
npx expo start --ios # iPhone simulator
npx expo start --android # Android emulator
npx expo start --web # Browser preview
2026-02-26 21:55:41 -05:00
```
### Backend
2026-02-26 23:58:53 -05:00
The app connects to the Timmy Time dashboard backend. Make sure it's running:
2026-02-26 21:55:41 -05:00
2026-02-26 23:58:53 -05:00
```bash
# From the project root
make dev
# Dashboard starts on http://localhost:8000
```
2026-02-26 21:55:41 -05:00
2026-02-26 23:58:53 -05:00
The mobile app calls these endpoints on the dashboard:
- `POST /api/chat` — Send messages, get Timmy's replies
- `POST /api/upload` — Upload images/files/voice recordings
- `GET /api/chat/history` — Retrieve chat history
- `DELETE /api/chat/history` — Clear chat
2026-02-26 21:55:41 -05:00
## Theme
2026-02-26 23:58:53 -05:00
Dark arcane palette:
2026-02-26 21:55:41 -05:00
| Token | Color | Usage |
|-------|-------|-------|
2026-02-26 23:58:53 -05:00
| `primary` | `#a855f7` | Accent, user bubbles |
2026-02-26 21:55:41 -05:00
| `background` | `#080412` | Screen background |
2026-02-26 23:58:53 -05:00
| `surface` | `#110820` | Cards, Timmy bubbles |
| `foreground` | `#ede0ff` | Primary text |
| `muted` | `#6b4a8a` | Secondary text |
| `border` | `#3b1a5c` | Dividers |
| `success` | `#00e87a` | Status indicator |
2026-02-26 21:55:41 -05:00
| `error` | `#ff4455` | Recording state |
## License
Same as the parent Timmy Time Dashboard project.