How zenika/sensei works
Main Components
a) CLI Layer
• Entry point for user interactions
• Handles commands like 'serve' and 'pdf'
b) Build System
• Webpack configuration and custom loaders
• Transforms training materials into web-ready content
• In the middle layer
c) Output Applications
• Web Application (Slides & Labs)
• PDF Generator
• As parallel end products
d) Source Content Handlers
• Markdown processors
• JSON configuration parsers
• As input handlers
Key Relationships to Highlight
• Data flow from source content through loaders to final outputs
• Webpack build pipeline flow
• Relationship between served content and browser
Specific Implementation Details
• RevealJS integration (for slides)
• Puppeteer (for PDF generation)
• Webpack Dev Server (for serving content)
• Custom loaders (json-parts, main-title, revealjs, workbook-toc)
[Input Layer]
Training Materials (MD/JSON) → Custom Loaders
[Processing Layer]
Webpack Build System
• ↓
[Output Layer]
Web App (Slides/Labs) | PDF Generator
Important Elements
• Docker container boundary (as this is a primary deployment method)
• Port mapping (8080 default)
• Volume mounting points
• Watch/Hot Reload mechanism
• Browser interaction points
Technical Details to Note
• Separation between development and production flows
• Hot reload capabilities
• PDF generation requirements (especially for M1/M2 Macs)
• Configuration points (SENSEI_PORT, SENSEI_WATCH_POLL)
• Container boundaries
• Configuration points