How areium/ark-tavern works
Ark Tavern is a local-first LLM-driven story and game platform. The main workflow is to create or select a save, enter an immersive conversation, and have the backend advance narrative using session context, worldbook material, and an LLM; the session can also hand encounters to a selected combat mode and receive outcomes. The README documents additional content-management and recovery capabilities. Backend and frontend call relationships are based on the supplied excerpts and README; unsampled subsystem wiring is not inferred.
Main entry points: useApi.ts API client hook · SceneManager.py Scene manager · App.tsx Application shell · WorldBookManager.tsx Worldbook workbench
Components 25
Client experience
- Application shell
frontend/src/App.tsx - Session hall
frontend/src/components/session/SessionManagerView.tsx - Conversation views
frontend/src/components/ChatView.tsx - Worldbook workbench
frontend/src/components/WorldBookManager.tsx - API client hook
frontend/src/hooks/useApi.ts - Combat views
frontend/src/components/combat/CombatView.tsx - Configuration UI
frontend/src/components/SettingsPanel.tsx
Sessions and story
- Scene manager
src/SceneManager.py - Character agent
src/CharacterAgent.py - Session manager
src/session_manager.py - Story memory
src/memory.py - Plot graph
src/plot_graphs.py
Content libraries
- Worldbook engine
src/world_book.py - Worldbook storage
src/worldbook_folder_store.py - Character content
src/character_card.py
Combat modes
- Combat endpoints
src/blueprints/combat.py - Tactical engine
src/combat_engine/engine.py - Sideview battle
src/sideview_combat.py
Backend services
- Session endpoints
src/blueprints/sessions.py - Chat endpoints
src/blueprints/chat.py - LLM routing
src/llm_backend_manager.py - Model providers
src/providers/base.py
Other components
- Player
- Cloud model API
- Ollama
Connections 29
- Player → Application shell: uses
- Application shell → Session hall: opens
- Application shell → Conversation views: opens
- Application shell → Worldbook workbench: opens
- Application shell → Combat views: opens
- Session hall → API client hook: requests
- Conversation views → API client hook: requests
- Worldbook workbench → API client hook: requests
- API client hook → Session endpoints: calls
- API client hook → Chat endpoints: calls
- Session endpoints → Session manager: manages saves
- Chat endpoints → Scene manager: routes chat
- Scene manager → Character agent: routes dialogue
- Scene manager → Worldbook engine: resolves context
- Scene manager → LLM routing: requests generation
- Scene manager → Story memory: uses summaries
- Scene manager → Plot graph: uses plot beats
- Worldbook engine → Worldbook storage: reads entries
- Worldbook workbench → Worldbook storage: manages books
- LLM routing → Model providers: creates clients
- Model providers → Cloud model API: sends prompts
- Model providers → Ollama: sends prompts
- Combat views → API client hook: requests
- API client hook → Combat endpoints: calls
- Combat endpoints → Tactical engine: runs turns
- Combat endpoints → Sideview battle: dispatches mode
- Configuration UI → API client hook: updates config
- API client hook → LLM routing: configures models
- Character content → Session manager: supplies roster