How erishen/lume works
Lume is a C11 interpreter-backed web framework: developers write .lume business scripts, and the runtime parses, checks, and executes them to serve web pages, JSON APIs, and registered tools. The README also documents native SQLite, SSE chat/LLM agent tools, SSR, and multi-file modules. The graph includes documented demo branches as well as sampled runtime layers; agent-httpd is a documented submodule but is absent from the supplied tree, so its internals are not expanded.
Main entry points: interp.c Interpreter · parser.c Parser · main.tsx Resident SSR server · main.c Runtime entry
Components 23
Language runtime
- Runtime entry
src/main.c - Lexer
src/lexer.c - Parser
src/parser.c - Statement parser
src/parser_stmt.c - Type checker
src/typecheck.c - Interpreter
src/interp.c - Values and types
src/value.c - Built-ins
src/builtins.c
Web and integrations
- HTTP bridge
src/bridge.c - HTTP/chat service
- SQLite database
Product demonstrations
- Portfolio assistant UI
frontend/src/invest/app.tsx - Capability hub UI
frontend/src/hub/hub-home.tsx - ABAC demo UI
frontend/src/abac/app.tsx - Modules tax UI
frontend/src/modules/app.tsx
React SSR demo
- React route app
frontend/react-ssr/App.tsx - Resident SSR server
frontend/react-ssr/server/main.tsx - SSR renderer
frontend/react-ssr/server/render.tsx - Hydration client
frontend/react-ssr/client.tsx
Other components
- Script author
- Lume script
- LLM provider
- Browser user
Connections 25
- Script author → Lume script: writes
- Lume script → Runtime entry: runs
- Runtime entry → Lexer: lexes
- Lexer → Parser: tokens
- Parser → Statement parser: parses statements
- Parser → Type checker: AST
- Type checker → Interpreter: checked program
- Interpreter → Values and types: evaluates
- Interpreter → Built-ins: dispatches
- Interpreter → HTTP bridge: registers routes
- HTTP bridge → HTTP/chat service: configures
- HTTP/chat service → Browser user: serves pages and APIs
- Browser user → Portfolio assistant UI: uses
- Browser user → Capability hub UI: uses
- Browser user → ABAC demo UI: uses
- Browser user → Modules tax UI: uses
- Browser user → HTTP/chat service: sends chat requests
- HTTP/chat service → LLM provider: requests generation
- HTTP/chat service → SQLite database: accesses
- Browser user → Resident SSR server: requests page
- Resident SSR server → SSR renderer: renders
- SSR renderer → React route app: renders tree
- Resident SSR server → Browser user: streams HTML
- Browser user → Hydration client: loads client
- Hydration client → React route app: hydrates