Lex Terrae
Which laws apply here?
A library of Canadian law, sorted by where it applies. Name a place and Lex Terrae lists every document that covers it, from the local by-law up to federal statute.
- Year
- 2026
- Type
- Web app
- Built with
- React, Cloudflare Workers, Neon Postgres
- Status
- Live
One place for every layer of law
Canadian law comes in layers. Parliament makes federal law, the provinces and territories make their own, and regional districts, municipalities and First Nations add by-laws on top. Each government publishes on its own website, in its own way.
Lex Terrae puts those layers in one place and organizes them by geography. Pick a place and you see its own documents, then those of every jurisdiction that contains it: Squamish, then the Squamish-Lillooet Regional District, then British Columbia, then Canada.
Start from where you are
-
The place, not the government
Most people know where they are, not which level of government regulates what. One search answers the question for every jurisdiction that matters there.
-
Nesting handled for you
A British Columbia statute applies in Squamish; a Squamish by-law doesn’t apply in the rest of the province. Each document is tagged once, where it belongs, and shows up everywhere inside that jurisdiction.
-
Ready to hand to an AI
One button bundles every applicable document into a single reference file for Claude, ChatGPT or Gemini, with an estimate of whether it’s small enough to read in full. The assistant answers from the actual text, not from memory.
-
Your location stays yours
“Use my location” works out your jurisdiction inside the browser from the map boundaries. Only the jurisdiction is sent to the server, never your coordinates.
From a map to a reading list
-
01
Find a place
Search about 4,800 municipalities, regional districts, provinces, territories and First Nations, or let the browser find you. The list is built from Statistics Canada’s census boundaries.
-
02
Tag documents on the map
Behind the scenes, editors upload a document (PDF, Word, Excel, plain text and more) and mark where it applies on a map of Canada. Federal law covers the whole country, and Quebec is set apart as the civil-law province. Anyone can look things up; only approved editors can add to the library.
-
03
Drill down to the town
Zoom into a province to tag a single region, municipality or Indigenous land. British Columbia alone has 630 of them. If one is missing, an editor can add it.
How it’s built
- Front end
- React and TypeScript, with D3 and TopoJSON drawing the maps
- Back end
- Hono on a single Cloudflare Worker that also serves the app
- Data
- Neon Postgres, with uploaded files in Cloudflare R2
- Boundaries
- Statistics Canada census subdivisions, under the Open Government Licence – Canada