trustdan / resume-as-code

My resume built as a web assembly application.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Resume as Code

View my resume: cv.kylekosic.dev

After years of rewriting resumes in Microsoft Word, Adobe Photoshop, and LaTeX, I decided to start maintaining my resume as a static web page with the content stored in a simple YAML file.

The resume data file makes it easy to update resume information without messing up the formatting. Additionally, web apps separate content from styling, so many different layouts/designs can be applied to the same resume by just using a different styles.css. Storing a resume as code also benefits from Git versioning, making it possible go back in time to previous views.

Contents

Overview

  • Resume content is kept in resume_data.yaml.
  • The schema of this data is described in the protocol buffer protos/resume.proto.
  • Content from resume_data.yaml is serialized to binary protocol buffers via generated Python.
  • Rust code is auto-generated to read the binary content.
  • The resume content compiled into a rust-based web assembly app to provide some interactivity using Yew.
  • A PDF resume is rendered using headless Chrome.
  • The static web app is uploaded to S3 for hosting.

In general, the only piece that needs to be updated is resume_data.yaml for content. Occasionally wasm-app/styles.css is updated to modify the layout.

Build Instructions

Instructions for building the components of the resume. The full build pipeline (minus PDF generation and hosting) can be quickly ran with:

make all
  1. Generate the Python protobuf code in yaml-parser/. Required if changing proto/resume.proto.
make python
  1. Generate the Rust protobuf code in wasm-app/src/protos. Required if changing proto/resume.proto.
make rust
  1. Compile the resume_data.yaml into binary. Required if changing resume_data.yaml.
make build
  1. Compile the web assembly application. Required if any changes are made.
make wasm
  1. Render a PDF from the web assembly app.
make pdf

Note: this operation may sometimes not correctly render fonts/icons. Always inspect the output pdf and rerun if incorrect.

  1. Publish to S3
./scripts/sync_s3.sh <name-of-bucket>

Development Setup

The following tools are used for end-to-end building of this project:

A brief explanation of how each tool is used:

cargo

Rust's Cargo tool chain is used to compile the Rust/wasm components of this project. Can be installed following Install Rust.

wasm-pack

This tool is used to build Rust-based web assembly projects and compile to JavaScript-compatible targets. Can be installed along via cargo:

cargo install wasm-pack wasm-bindgen-cli

python

Python 3 is used to parse the YAML resume description into a binary message that is included in the compiled web assembly binary. It also is used as an HTTP server when rendering PDFs from the static wasm application. To install the required Python libraries:

pip install -r requirements.txt

protobuf

The protoc tool is used to compile the resume proto and generate the Python classes in "./yaml-parser". These can be installed following the Protocol Buffers Documentation.

rollup

Rollup is a module bundler used to package the compiled web app generated by wasm-pack into the static webpage for serving. Rollup can be installed from npm.

chrome

Headless Chrome is used to render the static page into a PDF document that is exportable from the hosted web app. This is how the PDF resume is generated.

AWS CLI

I host the compiled web app on AWS, serving it from an S3 bucket via CloudFront. AWS CLI is required to upload the compiled artifacts to S3. Can be installed from documentation, or via pip install awscli.

Docker Development

Included is a Dockerfile containing all of the above tools installed. To develop and run the build processes in a Docker container:

docker build -t resume .
docker run --rm -it -v $(pwd):/home/root resume

This will launch the Docker container with an interactive bash shell and this repo mounted to the container home directory.

About

My resume built as a web assembly application.


Languages

Language:Rust 83.4%Language:Python 6.0%Language:CSS 3.9%Language:PureBasic 3.3%Language:Shell 1.1%Language:Dockerfile 0.9%Language:Makefile 0.8%Language:HTML 0.4%Language:JavaScript 0.1%