How suryanshswarn09/git-doc works
Git-doc is a browser-based Markdown and LaTeX editor for live preview, document preparation, and PDF/HTML export, with GitHub integration for importing files and publishing drafts or commits. The user edits Markdown in the app, reviews its rendered preview, then exports or uses the GitHub panel to move content to a repository. The graph preserves documented GitHub and print capabilities; some detailed flows are documented in the README but their implementation was not fully sampled.
Main entry points: App.jsx Editor application · githubApi.js GitHub API client · GitHubModal.jsx GitHub panel · TemplateModal.jsx Template picker
Components 22
Editor and preview
- Editor application
src/App.jsx - Markdown renderer
src/App.jsx - Document templates
src/utils/templates.js - Template picker
src/components/TemplateModal.jsx - React entry point
src/main.jsx
Document publishing
- Print options
src/components/PrintModal.jsx - Print layout config
src/utils/printOptions.js - Export utilities
src/utils/exportUtils.js
GitHub integration
- GitHub panel
src/components/GitHubModal.jsx - GitHub API client
src/utils/githubApi.js - Repository browser
src/components/RepoFileTree.jsx - Change review
src/components/DiffViewer.jsx
Editor support
- Code highlighting
src/utils/highlighter.js - Math sanitization
src/utils/mathSanitizer.js - Document statistics
src/utils/documentStats.js - Editor shortcuts
src/utils/editorKeyHandlers.js - TOC generation
src/utils/tocGenerator.js - Scroll sync
src/utils/scrollSync.js - Theme settings
src/utils/themeUtils.js
Other components
- Document author
- GitHub REST API
- Browser storage
Connections 25
- Document author → React entry point: opens editor
src/main.jsx - React entry point → Editor application: renders
src/main.jsx - Editor application → Markdown renderer: renders preview
src/App.jsx - Markdown renderer → Code highlighting: highlights code
src/App.jsx - Editor application → Math sanitization: sanitizes math
src/App.jsx - Editor application → Document statistics: computes stats
src/App.jsx - Editor application → Editor shortcuts: handles shortcuts
src/App.jsx - Editor application → TOC generation: generates TOC
src/App.jsx - Editor application → Scroll sync: stores preference
src/App.jsx - Editor application → Theme settings: stores theme
src/App.jsx - Editor application → Template picker: opens picker
src/App.jsx - Template picker → Document templates: loads templates
src/components/TemplateModal.jsx - Editor application → Print options: opens settings
src/App.jsx - Print options → Print layout config: uses presets
src/components/PrintModal.jsx - Editor application → Print layout config: generates print CSS
src/App.jsx - Editor application → Export utilities: exports document
src/App.jsx - Editor application → GitHub panel: opens panel
src/App.jsx - GitHub panel → GitHub API client: requests GitHub actions
src/components/GitHubModal.jsx - Repository browser → GitHub API client: fetches repository tree
src/components/RepoFileTree.jsx - GitHub panel → Change review: renders review
src/components/GitHubModal.jsx - GitHub API client → GitHub REST API: calls REST API
src/utils/githubApi.js - GitHub API client → Browser storage: stores token
README.md - Editor application → Browser storage: stores preferences
src/App.jsx - GitHub REST API → GitHub API client: returns API results
README.md - GitHub panel → GitHub REST API: imports, saves, commits
README.md