How kimchi-project/wok works
Wok is a CherryPy-based web framework: a browser reaches the running daemon, which serves its HTML5 interface and REST resources that plugins can extend. The main request path runs through the server, root routing, resource handlers, domain models, and rendered responses; supporting branches provide authentication, asynchronous tasks, request logging, and notifications. The README documents plugin extensibility, while several domain modules are only named in the source index, so links to those modules are omitted where their callers are not shown.
Main entry points: wok.main.js Main interface · server.py CherryPy server · root.py Root router · base.py REST resources
Components 22
Server and Routing
- CherryPy server
src/wok/server.py - Root router
src/wok/root.py - REST resources
src/wok/control/base.py - Response rendering
src/wok/template.py
Models and Plugins
- Model base
src/wok/model/model.py - Plugin discovery
src/wok/model/plugins.py - Configuration model
src/wok/model/config.py - Peer model
src/wok/model/peers.py - Task model
src/wok/model/tasks.py - Notifications
src/wok/model/notifications.py
Browser Interface
- API client
ui/js/src/wok.api.js - Main interface
ui/js/src/wok.main.js - Data grids
ui/js/src/wok.grid.js - Lists and tables
ui/js/src/wok.list.js - Charts
ui/js/src/wok.line-chart.js
Identity and Operations
- Authentication
src/wok/auth.py - Async task queue
src/wok/asynctask.py - Request logging
src/wok/reqlogger.py - Push server
src/wok/pushserver.py - Errors and messages
src/wok/exception.py
Other components
- Browser user
- PAM / LDAP
Connections 19
- Browser user → CherryPy server: opens Wok
README.md - CherryPy server → Root router: mounts root
src/wok/server.py - CherryPy server → Model base: creates model
src/wok/server.py - CherryPy server → Request logging: starts logger
src/wok/server.py - Root router → REST resources: uses resources
src/wok/root.py - REST resources → Response rendering: renders responses
src/wok/control/base.py - REST resources → Model base: calls model
- Root router → Authentication: authenticates
src/wok/root.py - Authentication → PAM / LDAP: checks identity
- Model base → Plugin discovery: loads plugins
- Task model → Async task queue: reads task queue
src/wok/model/tasks.py - Notifications → Push server: sends notifications
src/wok/model/notifications.py - Async task queue → Request logging: records updates
src/wok/asynctask.py - Main interface → API client: uses API
- Browser user → Main interface: uses interface
- API client → CherryPy server: requests REST
- Main interface → Data grids: displays grids
- Main interface → Lists and tables: displays lists
- Main interface → Charts: displays charts