The project is a "Resume-as-Code" application built with Spring Boot. It allows users to define their professional identity in a structured YAML format and programmatically generate high-quality, professional PDFs using customizable themes.
The project is designed with a modular, scalable architecture, focusing on performance, resilience, and API integrity. It transitions traditional resume building into a developer-centric workflow.
-
Framework: Spring Boot 3.5.9
-
Language: Java 21
-
Build Tool: Maven
-
Parsing: Jackson YAML Dataformat
-
Templating: Thymeleaf
-
PDF Engine: OpenHTMLToPDF (based on Apache PDFBox)
-
Boilerplate: Project Lombok
Implemented a centralized error-handling strategy to ensure a robust contract with the frontend.
-
Structured API Errors: All exceptions return a standardized JSON response containing a timestamp, error code, and field-level validation details.
-
Validation: Utilizes
jakarta.validationto enforce strict schema requirements on the YAML input before processing. -
JSON Serialization: Customized Jackson configuration to handle Java 8 Date/Time types (
LocalDateTime) and global formatting.
Optimized for production speed by minimizing Disk I/O and handling external assets safely.
-
Font Memory Cache: Fonts (Source Sans 3 and Roboto) are pre-loaded into a
ConcurrentHashMapat application startup, reducing PDF generation time significantly. -
Resilient Image Fetching: A dedicated
ResourceServicefetches remote profile photos and converts them to Base64 with built-in error handling to prevent rendering crashes if a URL is broken. -
Data Sanitization: Implemented recursive sanitization to handle XML-sensitive characters (like
&) across all nested YAML data structures.
The rendering engine is Schema-Agnostic, allowing for maximum user flexibility.
-
Dynamic Layouts: Users can control the order of sections and their placement (Main vs. Sidebar) via the
layoutDTO in the YAML. -
Polymorphic Rendering: Templates automatically adapt their visual style based on data shape—supporting multi-line paragraphs, simple bullet lists, and complex nested maps.
-
Deep Customization: Supports user-defined colors for names, section titles, entry headers, and subtitles.
-
Rich Formatting: Enabled
th:utextsupport, allowing users to include standard HTML tags like<b>(bold) and<i>(italic) directly in their YAML content.
src/main/java/com/praj/rendercv/
├── config/ # Jackson & Spring configurations
├── controller/ # REST Endpoints
├── dto/ # Data Transfer Objects & Schema definitions
├── exception/ # Global Exception Handler & Custom Exceptions
├── service/ # Business Logic & Asset Management
└── util/ # Helper utilities
src/main/resources/
├── fonts/ # TTF Font resources (Roboto, Source Sans 3)
└── templates/themes/ # Thymeleaf HTML Themes (Classic, Modern, Sidebar)
POST /api/v1/resume/test-parse
-
Input: Raw YAML string.
-
Output: Returns the parsed
ResumeRequestobject or detailed validation errors.
POST /api/v1/resume/render
-
Input: Raw YAML string.
-
Output: Returns a downloadable/viewable PDF file with
Content-Disposition: attachment.
| Theme | Type | Key Features |
|---|---|---|
| Classic | Single Column | Professional, academic style with right-aligned dates. |
| Modern | Two-Column | Clean, vertical split with customizable header and entry colors. |
| Sidebar | Two-Column | Fixed left sidebar with a distinct background for contact and skills. |
- JDK 21 or higher
- Maven 3.x
- Clone the repository.
git clone <repository-url>- Install dependencies:
mvn clean install- Run the application:
mvn spring-boot:run