Skip to content
Saarrthi Rana

Software / October 2026

Avatar Documents

A quoting tool I built for the staff at Avatar Solutions, an IT services company in Kampala. You fill in a form, see a live A4 preview and download a print-ready PDF.

Role
Lead Developer (Contract)
Team
Avatar Solutions, Kampala, remote from Toronto
When
October 2026
Next.js 16TypeScriptPrismaZodPlaywrightVitest
Avatar Documents editor with the client form on the left and a live quote preview on the right
Overview

Every quote used to be rebuilt by hand in a design tool. Long ones broke the layout, and old quotes could change when a client's details were edited.

It's a private web app for the staff at Avatar Solutions, an IT services company in Kampala. They pick a client, add services and prices, turn sections on or off and watch a live A4 preview. The PDF they download looks exactly like the preview, and its text can be selected.

What I did
  1. Built the whole app, with 12 database tables, 21 API routes behind a login, and form checks that work the same in the browser and on the server.
  2. Made the server render each PDF in headless Chrome from the same template as the live preview, so the download always matches the screen.
  3. Built the code that lays everything out across A4 pages, keeping related blocks together and repeating table headers on each page.
  4. Gave every quote its number safely inside the database.
  5. Saved a copy of each quote when it's sent, so a sent quote never changes.
  6. Tested it with 37 automated tests, screenshot comparisons against approved versions, and one test that runs the whole app from login to PDF.
How it works

Laying out the pages

Each block is measured, then placed on the first page with room for it. Page one has less space because of the header. If a group is too big for a page, it's split across pages and the text stays the same size.

Next project

Borealis Tours

A trip booking site and staff admin tool for a guided camping tour business.