Arshiya Sayyed
← Projects

On-device LLM · Solo build

Days Gone

I built Days Gone while preparing my own citizenship application. IRCC's calculator needs every trip outside Canada, but those dates live in booking emails, loyalty exports, and scattered notes, not a ready-made list. The tool turns that mess into confirmed trip rows in the browser, including a local WebLLM path when rules are not enough.

WebLLMWebGPUNext.jsTypeScript
Open tool

The problem

The hard part is not the day math. It is reconstructing travel history from real records, then typing each row into IRCC by hand. I wanted something that could extract dates from a paste, let me review them, and never upload immigration data to a server.

Constraints

Pasted booking emails and timeline exports are immigration data. A server-side LLM would have been the easy path, and the wrong one. Inputs are messy too: mixed date formats, prose, footers wrapped around one useful line. Extraction had to stay in the browser, and still work when WebGPU is missing.

What I shipped

A wizard with two entry paths: full eligibility (dates + absences + 1,095-day math), or parse-only for people who just need trip rows. Both use a dual parser. Structured pastes hit a rules engine first (instant, no GPU). Everything else can fall through to WebLLM: weights download once, cache in the browser, and inference runs on-device over WebGPU, returning trip fields as JSON.

Both parsers feed the same review UI. Parsed trips are proposals until you confirm them. State stays in memory for the visit only. Partial rows (departure without return) stay editable in place so you can paste a second confirmation without restarting.

First parse downloads the local model over WebGPU. Progress stays on-device; nothing is uploaded.

Why those choices

WebLLM was the technical center of the build: prove that a useful extraction model can run fully client-side for sensitive data. Server extraction would have shipped faster, but it would break the privacy constraint and make the project a thin UI over someone else's API.

Rules stay first-class so common airline emails still work on machines without WebGPU, and so the happy path does not wait on a model download. The LLM covers the long tail the rules cannot. Review stays human-gated either way, because citizenship dates are not something you want auto-committed.

The flow

Same steps as the app. Eligibility path shown; parse-only skips Your dates.

  1. 01

    Start

    Pick a path: check eligibility, or parse travel dates only. Browser-only, no account.

  2. 02

    Your dates

    Application date and PR date. Sets the IRCC window before trips.

  3. 03

    Add trips

    Paste travel text. Rules first, WebLLM on WebGPU when needed, then review.

  4. 04

    Results

    Edit confirmed rows, check totals, copy into IRCC's calculator.

Tech stack

On-device AI

WebLLMWebGPURules parser

App

Next.jsTypeScriptIn-memory state

Try it yourself

Free and local-only. Optional WebLLM parsing runs in your browser over WebGPU; nothing uploads.

Open Days Gone