How rayane-kahlaoui/souls-overlay works
Souls Overlay is an Electron desktop companion backed by a FastAPI service: players can chat for lore-aware guidance, maintain character context, and track bosses and NPC quests. The chat handler owns retrieval and response generation; account/profile endpoints persist player data and chat history in SQLite. A separate wiki-ingestion path scrapes and cleans lore, while the RAG service provides retrieval. The README documents hybrid retrieval and frontend checklist capabilities beyond the sampled implementation. Frontend-to-API wiring and some ingestion internals were not shown, so those links are left unverified.
Main entry points: main.py FastAPI service · scraper.py Wiki scraper · rag.py Hybrid lore retrieval · chat.js Companion chat
Components 19
Desktop companion
- Floating overlay
frontend/main.js - Companion chat
frontend/scripts/chat.js - Character profile
frontend/scripts/profile.js - Boss checklist
frontend/scripts/bosses.js - NPC questlines
frontend/scripts/npcs.js
API and player state
- FastAPI service
backend/main.py - Authentication
backend/core/auth.py - Player profile
backend/main.py - Chat orchestration
backend/main.py - Account and chat store
backend/core/database.py
Lore and AI
- Hybrid lore retrieval
backend/core/rag.py - Lore vector store
backend/core/rag.py - Persona response generation
backend/core/llm.py - OpenRouter models
Lore ingestion
- Wiki source
- Wiki scraper
backend/core/scraper.py - Scraped lore files
backend/data - Lore cleaning and extraction
backend/core/processing.py
Other components
- Player
Connections 24
- Player → Floating overlay: uses
README.md - Floating overlay → Companion chat: hosts
- Player → Companion chat: asks
README.md - Player → Character profile: updates
README.md - Player → Boss checklist: tracks
README.md - Player → NPC questlines: follows
README.md - Companion chat → FastAPI service: sends chat
- Character profile → FastAPI service: updates profile
- FastAPI service → Authentication: validates identity
backend/main.py - FastAPI service → Player profile: serves profile
backend/main.py - FastAPI service → Chat orchestration: routes chat
backend/main.py - FastAPI service → Wiki scraper: starts scraping
backend/main.py - Authentication → Account and chat store: loads users
backend/core/auth.py - FastAPI service → Account and chat store: reads and writes
backend/main.py - Chat orchestration → Hybrid lore retrieval: retrieves lore
backend/main.py - Chat orchestration → Persona response generation: generates answer
backend/main.py - Chat orchestration → Account and chat store: loads history
backend/main.py - Persona response generation → OpenRouter models: streams completion
backend/core/llm.py - Hybrid lore retrieval → Lore vector store: reads documents
backend/core/rag.py - Wiki source → Wiki scraper: provides pages
- Wiki scraper → Scraped lore files: saves pages
backend/core/scraper.py - Wiki scraper → Lore cleaning and extraction: cleans and extracts
- Lore cleaning and extraction → Scraped lore files: processes files
- Hybrid lore retrieval → Scraped lore files: ingests corpus