How va-desai-dev/engraiserver works
ENGRAISERVER hosts local text and image inference behind an authenticated gateway and browser console. The main workflow is console sign-in and model selection, gateway orchestration of profiles and a private engine worker, then inference responses to clients. Separate product branches provide model discovery/downloads, Ledger memory, Card Studio authoring, and SymLink sharing. Edges follow shown imports/calls or README descriptions; several unsampled subsystems are represented at their supported paths, with only documented or clearly evidenced relationships drawn.
Main entry points: main.py HTTP Gateway · Control.tsx Web Console · router.py Card Studio · service.py Ledger Service
Components 20
Console and Gateway
- Web Console
ui/src/modes/Control.tsx - API Client
ui/src/lib/api.ts - HTTP Gateway
src/engrai_server/main.py - Session Auth
src/engrai_server/auth.py
Models and Engines
- Model Profiles
src/engrai_server/profiles.py - Deployment Contracts
src/engrai_server/domain/deployments.py - Text Inference
src/engrai_server/llamacpp.py - Image Inference
src/engrai_server/image_engine.py - Worker Supervision
src/engrai_server/engines/worker.py - Model Browser and Pulls
src/engrai_server/model_downloads.py
Inference Features
- Card Studio
src/engrai_server/cardgen/router.py - Card Library
src/engrai_server/cardgen/store.py - Card Studio Browser
src/engrai_server/cardgen/web/src/scripts/main.js
Ledger
- Ledger API
src/engrai_server/ledger/router.py - Ledger Service
src/engrai_server/ledger/service.py - Recall Index
src/engrai_server/ledger/index.py
Cards and Sharing
- SymLink API
src/engrai_server/symlink/router.py - Peer Store
src/engrai_server/symlink/store.py
Other components
- Operator
- Chat and Image Clients
Connections 22
- Operator → Web Console: uses
README.md - Web Console → API Client: requests
ui/src/modes/Control.tsx - API Client → HTTP Gateway: calls endpoints
ui/src/lib/api.ts - HTTP Gateway → Session Auth: checks sessions
src/engrai_server/main.py - HTTP Gateway → Model Profiles: reads profiles
src/engrai_server/main.py - Model Profiles → Deployment Contracts: uses contracts
src/engrai_server/profiles.py - HTTP Gateway → Text Inference: routes text
src/engrai_server/main.py - HTTP Gateway → Image Inference: routes images
src/engrai_server/main.py - Text Inference → Worker Supervision: supervises worker
src/engrai_server/llamacpp.py - Image Inference → Worker Supervision: supervises worker
src/engrai_server/image_engine.py - Chat and Image Clients → HTTP Gateway: sends inference
README.md - Web Console → Model Browser and Pulls: browses and downloads
- HTTP Gateway → Model Browser and Pulls: serves model tools
src/engrai_server/main.py - HTTP Gateway → Card Studio: mounts routes
src/engrai_server/main.py - Card Studio → Card Library: reads and writes
src/engrai_server/cardgen/router.py - Card Studio Browser → Card Studio: calls API
- HTTP Gateway → Ledger API: mounts routes
src/engrai_server/main.py - Ledger API → Ledger Service: delegates
src/engrai_server/ledger/router.py - Ledger Service → Recall Index: reads and writes
src/engrai_server/ledger/service.py - HTTP Gateway → Ledger Service: injects recall
- HTTP Gateway → SymLink API: mounts routes
src/engrai_server/main.py - SymLink API → Peer Store: reads and writes
src/engrai_server/symlink/router.py