How esteban-crln/git-train works
This is a browser-based Git teaching simulator: users enter Git-like or shell commands, the simulator updates an immutable JSON state, and the UI presents command output, commit history, and Git zones. The parser dispatches specialized remote, history-rewrite, stash, and tag commands; the engine supplies shared repository behavior. The README documents broader command coverage than the sampled excerpts, so those capabilities are represented at subsystem level. Edges reflect shown calls/import references or README statements; unsampled details are not inferred.
Main entry points: main.js App coordinator · parser.js Command parser · engine.js Git state engine · terminal.js Command terminal
Components 12
Browser interface
- App coordinator
js/main.js - Command terminal
js/terminal.js
Git simulation
- Command parser
js/parser.js - Git state engine
js/engine.js
History features
- History rewriting
js/rewrite.js - Stash operations
js/stash.js - Tag operations
js/tags.js
Remote simulation
- Remote and forge
js/remote.js
State display
- Commit graph
js/graph.js - Git zones panel
js/main.js
Other components
- Learner
- Browser storage
Connections 18
- Learner → Command terminal: enters commands
js/terminal.js - Command terminal → App coordinator: submits input
js/terminal.js - App coordinator → Command parser: executes commands
js/main.js - Command parser → Git state engine: dispatches Git commands
js/parser.js - Command parser → Remote and forge: dispatches remote commands
js/parser.js - Command parser → History rewriting: dispatches rewrite commands
js/parser.js - Command parser → Stash operations: dispatches stash commands
js/parser.js - Command parser → Tag operations: dispatches tag commands
js/parser.js - Remote and forge → Git state engine: uses shared state helpers
js/remote.js - History rewriting → Git state engine: uses merge and state helpers
js/rewrite.js - Stash operations → Git state engine: uses repository helpers
js/stash.js - Tag operations → Git state engine: uses repository helpers
js/tags.js - App coordinator → Git state engine: reads and updates state
js/main.js - App coordinator → Command terminal: renders command output
js/main.js - App coordinator → Commit graph: renders commit graph
js/main.js - Commit graph → Git state engine: reads commit data
js/graph.js - App coordinator → Git zones panel: renders Git zones
js/main.js - App coordinator → Browser storage: saves simulator state
README.md