Genie Helper is built on AnythingLLM with custom extensions. This guide covers the codebase organization, key directories, and file structure to help you navigate the project effectively.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Kismetkanceled/geniehelper/llms.txt
Use this file to discover all available pages before exploring further.
Directory Overview
Core Server (server/)
The server directory contains all backend logic built on top of AnythingLLM’s Express server.
API Endpoints (server/endpoints/api/)
| File | Route | Purpose |
|---|---|---|
genieChat.js | /api/genie/stream-chat | Content gate + node RAG injection + SSE proxy to AnythingLLM |
credentials.js | /api/credentials/* | AES-256-GCM encrypted platform credential storage/retrieval |
queue.js | /api/queue/* | BullMQ job enqueue + stats API |
captions.js | /api/captions/generate | AI caption generation endpoint |
register.js | /api/register | Invite-gated registration proxy |
impersonate.js | /api/impersonate/* | Admin impersonation (session swap) |
rbacSync.js | /api/rbac-sync/* | Directus ↔ AnythingLLM user sync |
onboarding.js | /api/onboarding | State machine GET/PATCH + zip upload webhook |
userProxy.js | /api/users/* | User profile + file upload admin-token proxy |
usage.js | /api/usage/* | Plan usage tracking |
Utilities (server/utils/)
| Directory/File | Purpose |
|---|---|
actionRunner/ | Action flow executor (see Custom Actions) |
credentialsCrypto.js | AES-256-GCM encryption for platform credentials |
boot/ | MCP server auto-boot on AnythingLLM startup |
nodeRag.js | Node RAG pipeline — top-15 weighted persona nodes, 5-min cache |
cache/ | Extract cache and taxonomy cache implementations |
actionBus.js | BullMQ ActionBus interface |
CREDENTIALS_ENC_KEY_B64 environment variable (base64 of 32 bytes).
MCP Servers (scripts/)
MCP (Model Context Protocol) servers expose external services as tools to the AI agent.
| File | Tools | Purpose |
|---|---|---|
directus-mcp-server.mjs | 17 tools | CRUD collections, trigger flows, manage users/files |
ollama-mcp-server.mjs | 3 tools | generate, chat, list-models |
stagehand-mcp-server.mjs | 9 tools | Browser automation (sessions, navigate, act, extract, cookies, screenshot) |
Dashboard (dashboard/)
React 18 SPA served from dashboard/dist/ at geniehelper.com/.
Key Files
| File | Purpose |
|---|---|
src/utils/api.js | Axios client — all Directus + AnythingLLM calls |
src/utils/crypto.js | Client-side encryption utilities |
src/components/AgentWidget/ | Custom chat popup (replaces embed widget) |
src/components/Brand/ThemeApplier.jsx | CSS custom property injector from brand settings |
src/components/Layout/Sidebar.jsx | Nav sidebar + persona theme loader |
src/pages/* | Route pages (Dashboard, MediaLibrary, Settings, etc.) |
Routes
Public routes:/— Home/pricing,/about,/register,/login
/app/dashboard— Main dashboard/app/media— Media library/app/calendar— Content calendar/app/fans— Fan management/app/analytics— Performance analytics/app/platforms— Platform connections/app/settings— User settings
/admin— Directus + AnythingLLM iframes/view-as— User impersonation
Build Process
serve dashboard/dist/ (pm2 name: genie-dashboard).
Media Worker (media-worker/)
BullMQ consumer that processes background jobs:
scrape_profile— Stagehand OF login + data extractionpublish_post— Stagehand-based cross-platform postingapply_watermark— ImageMagick watermarkingcreate_teaser— FFmpeg video preview generationpost_scheduler— Pollsscheduled_postsevery 60s
media-worker).
Storage (storage/)
AnythingLLM persistent data:
plugins/anythingllm_mcp_servers.json— MCP server configuration (see Extending MCP)- Document vectors, user data, workspaces
Related Files Reference
Agent & AI
server/utils/nodeRag.js—getOnboardingState()+getNodeContext()Nodes/Universe/taxonomy_graph.json— 3,205-node taxonomy graphNodes/User/— Per-user persona node storage
Planning & Tracking
.claude/todos— Phase backlog with agent assignments.claude/sessions/— EOD session logsdocs/nginx/— Nginx config references
Next Steps
Custom Actions
Create custom Action Runner flows
Extending MCP
Add new MCP tools and servers
