# sb2nov/resume architecture

> Architecture diagram of the GitHub repository sb2nov/resume, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sb2nov/resume
- Repository: https://github.com/sb2nov/resume

## Overview

##### Project type and purpose
- This is an open-source LaTeX resume template project. Its purpose is to provide a single-page, one-column resume format for software developers, with a clear structure (education, experience, projects) and easy customization via LaTeX commands and templates.

##### File structure
- Top-level files:
- `sourabh_bajaj_resume.tex` – the main LaTeX source
- `build.sh` – a simple shell script to build locally
- `Dockerfile` – defines a containerized LaTeX build environment
- `.github/workflows/docker-image.yml` – GitHub Actions CI pipeline
- Other files:
- `README.md` – project description and instructions
- `LICENSE`, `.gitignore` – project metadata
- `resume_preview.png` – preview artifact (referenced in README)
- PDF and TeX resume in root

##### README for additional insights
- Describes motivation, quick start, Docker-based build instructions, and Overleaf link.

##### Main components of the system
a. Developer Workstation (Local Environment)
- Source files (.tex, images, shell script)
- Local build script (`build.sh`)
b. Containerized Build Environment
- Docker image (LaTeX toolchain)
- `Dockerfile` definition
c. Continuous Integration (GitHub Actions)
- Workflow defined in `.github/workflows/docker-image.yml`
- Steps: checkout → build Docker image → run pdflatex → store artifacts
d. Artifacts / Outputs
- `sourabh_bajaj_resume.pdf`
- `resume_preview.png` (preview)
e. External Services
- Docker Hub (optional push/pull of LaTeX image)
- Overleaf (hosted template link, optional external integration)

##### Relationships and interactions
- Developer edits `.tex` and runs `./build.sh` locally → invokes Docker container → runs `pdflatex` → outputs PDF.
- On push to GitHub: GitHub Actions triggers → uses `Dockerfile` to build image → runs LaTeX compile → uploads PDF as CI artifact (or deploys).
- Optionally, users import the template into Overleaf via a link.

##### Architectural patterns and design principles
- Separation of concerns: source content (TeX) is separate from build logic (shell script, Dockerfile).
- Containerization: Ensures reproducible builds across environments.
- CI/CD pipeline: Automates validation and artifact generation on each push.

##### Must-have elements
- Clear labels on all containers, subprocesses, and artifacts

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Local Development Environment
    subgraph "Local Development Environment"
        Dev("Developer Workstation"):::local
        BS["build.sh"]:::local
        Tex["sourabh_bajaj_resume.tex"]:::local
        DockerContainer["Docker Container"]:::local
        PDF["sourabh_bajaj_resume.pdf"]:::artifact
        Dev -->|edits| Tex
        Dev -->|runs| BS
        BS -->|invokes Docker| DockerContainer
        DockerContainer -->|pdflatex compile| PDF
    end

    %% Source Repository
    subgraph "Source Repository (GitHub)"
        Repo("GitHub Repo"):::repo
        README["README.md"]:::repo
        License["LICENSE"]:::repo
        Gitignore[".gitignore"]:::repo
        Workflow[".github/workflows/docker-image.yml"]:::ci
        Dockerfile["Dockerfile"]:::ci
        Preview["resume_preview.png"]:::artifact
        SourceTex["sourabh_bajaj_resume.tex"]:::repo
        BuildScript["build.sh"]:::repo
        Repo -->|contains| README
        Repo -->|contains| License
        Repo -->|contains| Gitignore
        Repo -->|contains| Workflow
        Repo -->|contains| Dockerfile
        Repo -->|contains| SourceTex
        Repo -->|contains| BuildScript
        Repo -->|contains| Preview
    end

    %% Continuous Integration
    subgraph "Continuous Integration (GitHub Actions)"
        CIWorkflow["GitHub Actions Workflow"]:::ci
        DockerImageCI["Docker Image"]:::ci
        PDF_CI["sourabh_bajaj_resume.pdf (CI)"]:::artifact
        ArtifactStorage["CI Artifact Storage"]:::artifact
        CIWorkflow -->|checkout source| Repo
        CIWorkflow -->|build image| DockerImageCI
        DockerImageCI -->|run build| CIWorkflow
        CIWorkflow -->|compile pdflatex| PDF_CI
        PDF_CI -->|upload artifact| ArtifactStorage
    end

    %% External Services
    subgraph "External Services"
        Hub("Docker Hub"):::external
        Overleaf("Overleaf"):::external
    end

    %% Interactions
    Repo -->|push triggers| CIWorkflow
    CIWorkflow -->|push image| Hub
    Repo -->|template link| Overleaf

    %% Click Events
    click BS "https://github.com/sb2nov/resume/blob/master/build.sh"
    click Tex "https://github.com/sb2nov/resume/blob/master/sourabh_bajaj_resume.tex"
    click BuildScript "https://github.com/sb2nov/resume/blob/master/build.sh"
    click SourceTex "https://github.com/sb2nov/resume/blob/master/sourabh_bajaj_resume.tex"
    click Dockerfile "https://github.com/sb2nov/resume/tree/master/Dockerfile"
    click Workflow "https://github.com/sb2nov/resume/blob/master/.github/workflows/docker-image.yml"
    click README "https://github.com/sb2nov/resume/blob/master/README.md"
    click License "https://github.com/sb2nov/resume/tree/master/LICENSE"
    click Gitignore "https://github.com/sb2nov/resume/blob/master/.gitignore"
    click PDF "https://github.com/sb2nov/resume/blob/master/sourabh_bajaj_resume.pdf"

    %% Styles
    classDef local fill:#E3F2FD,stroke:#90CAF9
    classDef ci fill:#FFF3E0,stroke:#FFB74D
    classDef external fill:#E8F5E9,stroke:#A5D6A7
    classDef artifact fill:#F3E5F5,stroke:#CE93D8,stroke-dasharray: 5 2
    classDef repo fill:#FFEBEE,stroke:#EF9A9A
```
