View my resume: craftycoder.com/cv
Many years have gone by since I drafted a resume. I've been very busy working, either in my own businesses or in the employ of start ups or other small firms. The last time I handed someone a resume was in the 90s. Work finds me typically.
A former colleague of mine had this cool idea of maintaining his resume as a code and I thought that sounded like a great idea for me as well. Much of this README is duplicated from his original work.
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.
- 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.
Instructions for building the components of the resume. The full build pipeline (minus PDF generation and hosting) can be quickly ran with:
make all
- Generate the Python protobuf code in
yaml-parser/
. Required if changingproto/resume.proto
.
make python
- Generate the Rust protobuf code in
wasm-app/src/protos
. Required if changingproto/resume.proto
.
make rust
- Compile the
resume_data.yaml
into binary. Required if changingresume_data.yaml
.
make build
- Compile the web assembly application. Required if any changes are made.
make wasm
- 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.
- Publish to S3
./scripts/sync_s3.sh <name-of-bucket>
The following tools are used for end-to-end building of this project:
A brief explanation of how each tool is used:
Rust's Cargo tool chain is used to compile the Rust/wasm components of this project. Can be installed following Install Rust.
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-bindgen-cli
cargo install wasm-pack --version "0.8.1"
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
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 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.
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.
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
.
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.