Lessons from building MERN ERPs
Production status, a separate .NET PDF service, user-based S3 organization, and the boundaries of my ERP work.
I developed a JSON-configurable PDF generator in response to a client requirement. It generates documents directly in the browser, without a server-side PDF rendering service. The tool was developed independently and later integrated into another project.
My work included JSON-driven document configuration, reusable template schemas, and page-level settings. Configuration files currently live in the repository. This is not a visual template editor: the template is defined through configuration rather than a drag-and-drop interface.
The generator supports images, tables, custom fonts, explicit page breaks, and multipage documents. These different content types make page placement a meaningful part of the implementation. A document description has to become a sequence of elements that can be placed on actual pages.
The central engineering challenge was page overflow. I implemented pagination around the remaining available space on the current PDF page. For each element, the logic calculates the remaining space and determines whether the next element fits. If placing it would make that remaining space negative, the element moves to the next page. Processing then continues through the document.
That describes the confirmed placement rule, not every edge case. The exact measurement implementation and the handling of an element taller than a whole page are not independently documented. I would need to verify those details before publishing a code example or claiming that every possible document layout is supported.
The implementation uses JavaScript/TypeScript, html2canvas for browser-side content rendering, and jsPDF for PDF generation. It also uses Web Workers for processing larger documents. The precise division of work between rendering and worker tasks is not documented here, so I am not claiming that DOM rendering itself happens inside a worker.
No benchmark is attached to the worker implementation. Supporting a processing path for larger documents is different from demonstrating a measured speedup or a particular maximum document size. Those claims would need their own evidence.
This browser tool is separate from the ASP.NET Core and QuestPDF service I developed for Next Web Business. Business integrates with an external document API; this generator produces its PDF output in the browser. They solve related document problems through distinct implementations.
The browser generator’s repository remains private, it is not open source, and there is no public demo. An original diagram can explain the remaining-space rule without exposing client code. Any sample output still needs approval and must exclude confidential information before publication.
Production status, a separate .NET PDF service, user-based S3 organization, and the boundaries of my ERP work.
My path from learning to code in March 2023 through freelance work, an internship, personal projects, and an MCA.