Open Genie
Open Genie is a self-hosted AI home server that connects your devices (phones, tablets, TVs) through a unified platform powered by local LLM inference. It provides real-time communication via WebSockets, an extensible action/skill system, camera vision monitoring, media management, and a persistent memory system — all running on your own hardware.
What It Does
- AI Chat — Multi-turn conversations powered by Ollama with tool-calling capabilities. The assistant can execute actions, query memories, control media playback, and more.
- Device Management — Pair and communicate with phones, tablets, and TVs over WebSocket. Each device gets its own conversation history.
- Camera Vision — Monitor RTSP/HTTP camera streams with periodic AI-powered scene analysis. Define alert rules that trigger notifications when conditions are met.
- Media Library — Automatically index, thumbnail, and serve video, audio, image, and document files. Organize content into playlists with playback position tracking.
- Memory System — Long-term knowledge storage with automatic fact extraction from conversations. A "soul" file defines the assistant's personality.
- Automation — Cron-based job scheduling and webhook-triggered actions. Extensible through a skill/plugin system.
- Notifications — Push notifications via Firebase and Expo, with WebSocket fallback for online devices.
Tech Stack
| Layer | Technology |
|---|---|
| HTTP framework | Hono (routes in apps/web/server/routes/) |
| Frontend | Vite SPA — React + React Router v7 |
| Runtime | Node.js with custom HTTP/WS server |
| Database | PostgreSQL via Drizzle ORM |
| AI/LLM | Ollama (local inference) |
| Real-time | WebSocket (ws library) |
| Auth | Google OAuth + jose (web), JWT access+refresh tokens (devices) |
| Media | Sharp, FFmpeg, music-metadata |
| Push | Firebase Admin SDK, Expo SDK |
| Scheduling | node-cron |
| Styling | Tailwind CSS v4 |
Project Layout
open-genie/
├── apps/web/
│ ├── server.ts # CLI entry — delegates to lib/boot/start-server.ts
│ ├── server/ # Hono API app
│ │ ├── index.ts # createApiApp() — mounts all routes
│ │ ├── auth/ # Google OAuth routes + middleware
│ │ └── routes/ # REST API handlers (one file per domain)
│ ├── client/ # Vite SPA
│ │ ├── main.tsx # React entry point
│ │ ├── routes.tsx # React Router v7 route table
│ │ └── pages/ # Page components
│ ├── lib/ # Core server-side logic
│ │ ├── boot/ # startup: migrations, preflight, server init
│ │ ├── db/ # Database schema and client (Drizzle)
│ │ ├── ws/ # WebSocket connections, router, handlers
│ │ ├── auth/ # JWT signing/verification, middleware
│ │ ├── actions/ # Action registry and built-in actions
│ │ ├── chat/ # Conversation management, prompts, memory extraction
│ │ ├── camera/ # Capture worker, vision analysis, alert rules
│ │ ├── media/ # File indexer, watcher, metadata, thumbnails
│ │ ├── notifications/ # Notification delivery and push
│ │ ├── plugins/ # Plugin runtime (loader, watcher, OAuth, secrets)
│ │ ├── skills/ # Skill manifest loader
│ │ ├── net/ # Public-URL detection, trusted proxy, kill switch
│ │ └── scheduler.ts # Cron job scheduler
│ └── drizzle/ # Database migrations
├── apps/phone/ # Expo iPhone app
├── apps/tablet/ # Expo iPad app
├── apps/tv/ # Apple TV (react-native-tvos)
├── packages/ # @genie/* shared libraries
├── data/ # Runtime data (skills, files, SOUL.md, MEMORY.md)
└── docs/ # This documentation site