How mohitr1999/ats-friendly-resume works
1. This repository is a small Python PDF-generation app built around ReportLab. Its purpose is to take resume content from data files and render an ATS-friendly PDF resume as output.pdf.
2. The entry point is src/main.py. It is the orchestration layer: it likely reads configuration, loads resume data, instantiates the resume composition objects, and triggers PDF generation.
3. The data is intentionally separated from layout code. Resume content lives in src/data/input.json, while personal/contact metadata comes from a config.ini file. The README shows that the config controls fields like author, email, address, phone, and a debug flag.
4. src/constants/resume_constants.py is the central place for fixed layout/style values. This is where page sizing, spacing, colors, font names, and other shared constants would be kept so the visual design is not hardcoded across multiple modules.
5. src/sections/resume_section.py appears to define the base abstraction for resume sections. The rest of the section classes likely extend or compose this base to render uniform blocks like Experience, Projects, Education, Certifications, Achievements, and Skills.
6. The src/elements/ package contains item-level renderers for each resume domain object: resume_experience.py, resume_project.py, resume_education.py, resume_certification.py, resume_achievement.py, and resume_skill.py. These are the leaf-level builders that turn one JSON record into formatted PDF content.
7. src/resume_contact.py and src/resume_summary.py are specialized top-of-resume components. They likely render the header/contact strip and the summary paragraph separately from the main sections, because those blocks have different formatting and layout needs.
8. The data flow is one-way and simple: config and JSON input are read, mapped into resume objects, then passed into section/element renderers, which emit ReportLab drawing instructions. The final output is a single PDF file written to the working directory.
9. The res/fonts/ directory suggests custom font assets are bundled locally. That matters for architecture because the rendering layer likely registers those fonts with ReportLab to control typography and preserve consistent PDF output across environments.
10. The debug flag in configuration changes presentation behavior rather than business logic. When enabled, the PDF includes grid lines, which implies the layout layer can switch between production rendering and visual debugging.
11. The project supports two execution environments with the same core pipeline: local Python execution and containerized execution. Dockerfile and docker-compose.yml package the app so the same PDF generation path runs inside a container without manual dependency management.
12. From an architecture-diagram perspective, the main boundary is between input/configuration and rendering. Everything under src/data and config.ini is source content; everything under src/sections, src/elements, src/resume_*.py, and src/constants is the presentation engine; the only external runtime dependency that materially matters is ReportLab, which handles PDF creation.
Main entry points: resume_section.py Section Base · main.py Main · resume_contact.py Contact · resume_summary.py Summary
Components 17
Inputs
Content and runtime configuration sources
- Config · Personal/contact settings and debug flags
- Resume Data · Structured resume content consumed by the renderer
src/data/input.json
Core
Orchestration, shared styling, and top-level resume components
- Main · Entry point that loads data and drives PDF generation
src/main.py - Style Constants · Shared page, spacing, font, and color values
src/constants/resume_constants.py - Section Base · Common abstraction for uniform resume sections
src/sections/resume_section.py - Contact · Top-of-resume contact and identity block
src/resume_contact.py - Summary · Top-of-resume summary paragraph renderer
src/resume_summary.py
Elements
Leaf renderers for resume domains
- Experience · Renders work history entries
src/elements/resume_experience.py - Projects · Renders project entries
src/elements/resume_project.py - Education · Renders education entries
src/elements/resume_education.py - Certifications · Renders certification entries
src/elements/resume_certification.py - Achievements · Renders achievement entries
src/elements/resume_achievement.py - Skills · Renders skill lists and categories
src/elements/resume_skill.py
Connections 23
- Main → Config: reads · Loads runtime metadata and debug settings
- Main → Resume Data: loads · Reads structured resume content
- Main → Style Constants: uses · Applies shared layout and style values
- Main → Contact: builds · Creates the header/contact block
- Main → Summary: builds · Creates the summary block
- Main → Section Base: orchestrates · Coordinates section construction and rendering
- Section Base → Experience: renders · Uses entry renderer for experience items
- Section Base → Projects: renders · Uses entry renderer for project items
- Section Base → Education: renders · Uses entry renderer for education items
- Section Base → Certifications: renders · Uses entry renderer for certification items
- Section Base → Achievements: renders · Uses entry renderer for achievement items
- Section Base → Skills: renders · Uses entry renderer for skill items
- Experience → ReportLab: draws with · Emits PDF drawing instructions
- Projects → ReportLab: draws with · Emits PDF drawing instructions
- Education → ReportLab: draws with · Emits PDF drawing instructions
- Certifications → ReportLab: draws with · Emits PDF drawing instructions
- Achievements → ReportLab: draws with · Emits PDF drawing instructions
- Skills → ReportLab: draws with · Emits PDF drawing instructions
- Contact → ReportLab: draws with · Renders the contact header into the PDF
- Summary → ReportLab: draws with · Renders the summary into the PDF
- Fonts → ReportLab: registers · Provides local font assets to the PDF engine
- Container → Main: runs · Packages the same entry point in a container
- ReportLab → PDF Output: writes · Produces the final PDF artifact