$ show onyx-dot-app/onyx
Onyx is a comprehensive enterprise AI platform that provides knowledge retrieval, chat, and document indexing across 50+ third-party sources. The codebase reveals a FastAPI backend with Celery workers, PostgreSQL with Alembic migrations, OpenSearch vector search, Redis caching, and a separate model server. The frontend is a Next.js application with a custom design system (opal), alongside React Native mobile app, Go CLI, Chrome extension, and an embeddable widget. The platform supports deep research, custom agents, MCP servers, sandboxed code execution (Craft), and enterprise features like SSO, SCIM, billing, and multi-tenancy. Architecture is well-structured with clean separation of concerns, but the large codebase shows some drift: platform duplication across web/mobile/CLI, extensive Alembic migration history, and lint debt. The connector framework and design system are high-quality reusable components.
The LLM identified 3 files worth highlighting for reuse:
Defines abstract base classes (Connector, LoadConnector, PollConnector, EventConnector) and supporting types for building data source connectors. The factory pattern with dynamic import and registry enables adding new connectors without modifying core code. This is a clean, reusable pattern for any system needing pluggable data ingestion.
A highly composable Card component from the opal design system. Supports multiple variants, sizes, and states with consistent styling and accessibility. Demonstrates proper use of React composition, TypeScript generics, and CSS-in-JS patterns. Extracting this component into a standalone library would require minimal changes.
Defines an abstract CacheBackend interface with methods for get, set, delete, and clear. Concrete implementations for Redis and PostgreSQL backends are provided via a factory. This clean interface allows swapping caching strategies without changing business logic, and is easily extractable for other Python projects needing a pluggable cache layer.