How lucasnevespereira/resumme-builder works
Main Components
• User Interface / Templates: Represented by the “ui” folder, which contains various templates (basic, classic, figacy, modern, oldman, simple, stackoverflow) used to generate the visual resume.
• Input & Data Layer: A JSON resume is provided (examples/example.resume.json) which acts as the data source. Also include the data validation and parsing layers encapsulated in internal/pkg/parser and internal/models.
• Service Layer: The business logic is mostly in internal/services (e.g., resume processing) and internal/api/handlers that manage HTTP API requests.
• PDF Generation and HTML Template Management: Located in internal/pkg/pdf and internal/pkg/template.
• API & CLI Entry Points: Two main entry points are in the “cmd” directory:
• cmd/local handles local CLI-based resume building.
• cmd/server handles the API server which receives requests.
• Utility Components: The project also includes utility packages (inside internal/utils for file operations, JSON handling, language internationalization with locales, and logging).
Relationships/Interactions
• For local usage, the CLI (cmd/local) reads the JSON file (using fs and json utilities) → parses the resume data into defined models → hands off to the service layer to apply the appropriate template (from ui/*) → uses the template manager and PDF generator to produce the output files (saved in an output folder).
• For API usage, the process is similar, except that HTTP requests (using internal/api/router and handlers) trigger the same processing pipeline and return the generated PDF as a response.
Important Architectural Patterns & Design Principles
• Layered Architecture / Separation of Concerns: Different layers for API handling, business logic, and utility functions.
• Modularity: The clear separation between internal packages (API, models, parser, pdf, template, utils, etc.) makes it easier to isolate changes.
• Command Pattern / Multi-Entry Points: Two command entry points (local and server) that both invoke a common core.
• Extensibility: The “ui” folder structure supports multiple resume templates, while internal/utils/lang supports multiple languages.
Relevant Technologies & Frameworks
• Primary language is Go.
• Use of standard Go package structure with “internal” for private packages.
• Docker for containerized deployment (supported by Dockerfile and make targets).
• External JSON Resume standard (supported through examples and parsing logic).
• “CLI (cmd/local)” and “API Server (cmd/server)”
• “JSON Resume Data Source”
• “Parser & Models (internal/pkg/parser, internal/models)”
• “Service Layer (internal/services/resume)”
• “Template Management (internal/pkg/template)”
• “PDF Generator (internal/pkg/pdf)”
• “UI Templates (ui/ directory with subfolders for each style)”
• “Utility Layer (internal/utils – fs, json, lang, logger)”
• Data flow from the JSON resume data → Parser/Models → Service Layer
• Processing flow from the Service Layer → both the HTML generator (via Template Manager) and PDF Generator
• Interaction paths from the user commands/API request to the processing components.
• Annotations describing that both CLI and API use a shared core processing engine.
• Output components (e.g., generated HTML/PDF files)