How cptc-computer-programming/rubber-duck-webui works
Open WebUI is a self-hosted, provider-agnostic AI platform for local Ollama and OpenAI-compatible models. Users submit prompts through the chat interface; the backend handles chat and model requests, optionally enriching them with library documents or web results, then returns responses for rendering and persistence. The product also includes administration, collaboration, voice, files, and workspace features. The graph reflects README capabilities and indexed module references; where source excerpts do not show runtime wiring, relationships are omitted rather than inferred.
Main entry points: +layout.svelte Web interface · Chat.svelte Chat experience · main.py HTTP application · db.py Database engine
Components 25
User experience
- Web interface
src/routes/(app)/+layout.svelte - Chat experience
src/lib/components/chat/Chat.svelte - Workspace features
src/routes/(app)/workspace/+layout.svelte
Application runtime
- HTTP application
backend/open_webui/main.py - Chat endpoints
backend/open_webui/routers/chats.py - Model endpoints
backend/open_webui/routers/models.py - Model providers
backend/open_webui/routers/openai.py - Realtime sockets
backend/open_webui/socket/main.py - Analytics and evaluation
backend/open_webui/routers/analytics.py
Identity and collaboration
- Authentication
backend/open_webui/utils/auth.py - Users and groups
backend/open_webui/models/users.py - Access grants
backend/open_webui/models/access_grants.py - Team channels
backend/open_webui/models/channels.py
Knowledge and integrations
- Document retrieval
backend/open_webui/routers/retrieval.py - Content loaders
backend/open_webui/retrieval/loaders/main.py - Vector search
backend/open_webui/retrieval/vector/main.py - Web search
backend/open_webui/retrieval/web/main.py - Tools and plugins
backend/open_webui/utils/plugin.py - External apps
backend/open_webui/routers/apps.py
Persistence
- Database engine
backend/open_webui/internal/db.py - Chat records
backend/open_webui/models/chats.py - Messages
backend/open_webui/models/messages.py - Configuration
backend/open_webui/models/config.py - File storage
backend/open_webui/storage/provider.py
Other components
- User
Connections 27
- User → Web interface: uses
README.md - Web interface → Chat experience: opens chat
src/routes/(app)/+layout.svelte - Chat experience → HTTP application: submits prompts
- HTTP application → Chat endpoints: registers routes
backend/open_webui/main.py - HTTP application → Model endpoints: registers routes
backend/open_webui/main.py - HTTP application → Authentication: uses authentication
backend/open_webui/main.py - Chat endpoints → Chat records: accesses chats
- Chat endpoints → Messages: accesses messages
- Model endpoints → Model providers: uses providers
- Chat experience → Document retrieval: requests retrieval
README.md - Document retrieval → Content loaders: loads documents
- Document retrieval → Vector search: searches vectors
README.md - Chat experience → Web search: requests web search
README.md - Chat experience → Tools and plugins: invokes extensions
README.md - Web interface → Workspace features: opens workspace
README.md - Web interface → Realtime sockets: connects realtime
README.md - Realtime sockets → Team channels: serves channels
backend/open_webui/socket/main.py - Authentication → Users and groups: resolves users
backend/open_webui/utils/auth.py - Users and groups → Access grants: checks permissions
backend/open_webui/models/access_grants.py - HTTP application → Database engine: initializes database
backend/open_webui/main.py - Chat records → Database engine: stores chat state
backend/open_webui/models/chats.py - Messages → Database engine: stores messages
backend/open_webui/models/messages.py - Configuration → Database engine: stores settings
backend/open_webui/models/config.py - Chat experience → File storage: attaches files
README.md - Web interface → External apps: manages apps
README.md - Web interface → Analytics and evaluation: views analytics
README.md - HTTP application → Configuration: loads settings
backend/open_webui/main.py