How eees0/jakupsil works
Jakupsil is a browser-based document editor that turns formatted editor content into downloadable DOCX or PDF files. The main flow is authoring and formatting in the editor, posting its JSON content to the Spring API, generating the selected file, and downloading it in the browser. The graph also shows the request model and the editor’s server-wakeup ping. PDF generation is present in the source and UI flow, although the README still lists it as planned; unsampled HTML wiring and implementation details are omitted.
Main entry points: main.js Editor runtime · ApiController.java Document API · ContentNode.java Content nodes · CreateDocx.java DOCX generator
Components 15
Web editor
- Editor runtime
src/main/resources/static/js/editor/main.js - Formatting toolbar
src/main/resources/static/js/editor/toolbar.js - Editor theme
src/main/resources/static/js/editor/theme.js - Download client
src/main/resources/static/js/editor/download.js - Server wakeup ping
src/main/resources/static/js/editor/server.js
API boundary
- Document API
src/main/java/io/github/EEES0/docxeditor/controller/ApiController.java
File generation
- DOCX generator
src/main/java/io/github/EEES0/docxeditor/service/CreateDocx.java - PDF generator
src/main/java/io/github/EEES0/docxeditor/service/CreatePdf.java
Document model
- JSON request model
src/main/java/io/github/EEES0/docxeditor/dto/createFile - Content nodes
src/main/java/io/github/EEES0/docxeditor/dto/createFile/ContentNode.java - Text and marks
src/main/java/io/github/EEES0/docxeditor/dto/createFile/TextNode.java - Node attributes
src/main/java/io/github/EEES0/docxeditor/dto/createFile/Attrs.java - Mark attributes
src/main/java/io/github/EEES0/docxeditor/dto/createFile/MarkAttrs.java
Other components
- Document author
- Downloaded file
Connections 19
- Document author → Editor runtime: writes in
- Editor runtime → Formatting toolbar: initializes
src/main/resources/static/js/editor/main.js - Editor runtime → Editor theme: initializes
src/main/resources/static/js/editor/main.js - Editor runtime → Download client: initializes
src/main/resources/static/js/editor/main.js - Editor runtime → Server wakeup ping: initializes
src/main/resources/static/js/editor/main.js - Formatting toolbar → Editor runtime: formats content
src/main/resources/static/js/editor/toolbar.js - Download client → Document API: posts JSON
src/main/resources/static/js/editor/download.js - Server wakeup ping → Document API: pings
src/main/resources/static/js/editor/server.js - Document API → JSON request model: accepts
src/main/java/io/github/EEES0/docxeditor/controller/ApiController.java - Document API → DOCX generator: calls for DOCX
src/main/java/io/github/EEES0/docxeditor/controller/ApiController.java - Document API → PDF generator: calls for PDF
src/main/java/io/github/EEES0/docxeditor/controller/ApiController.java - DOCX generator → Content nodes: reads
src/main/java/io/github/EEES0/docxeditor/service/CreateDocx.java - PDF generator → Content nodes: reads
src/main/java/io/github/EEES0/docxeditor/service/CreatePdf.java - Content nodes → Node attributes: uses
src/main/java/io/github/EEES0/docxeditor/dto/createFile/ContentNode.java - Content nodes → Text and marks: contains
src/main/java/io/github/EEES0/docxeditor/dto/createFile/ContentNode.java - Text and marks → Mark attributes: uses marks
- DOCX generator → Downloaded file: returns bytes via API
- PDF generator → Downloaded file: returns bytes via API
- Downloaded file → Document author: downloads in browser