The register search with a Number or words from the title or text field, counts of 2934 orders and 2164 resolutions, filters by register, year, status, field and date, and a list of the latest resolutions with their status and electronic signature mark

Programming

Local law register: five thousand acts in one search engine

Orders and resolutions were scattered across the BIP public information bulletin, signed packages from the document management system, a network drive and a paper archive. I built a register that joins these sources, shows each act's status, electronic signature and Official Journal publication, and points out gaps in the numbering.

05/11/2026

Laws enacted in local government are mainly orders from the mayor and resolutions from the council. Every employee will eventually ask: does this order still apply, and what changed it?

The answer required searching in several places and reading through various acts. So, I built a register of local and internal law that consolidates everything in one search engine.

The register search with a Number or words from the title or text field, counts of 2934 orders and 2164 resolutions, filters by register, year, status, field and date, and a list of the latest resolutions with their status and electronic signature mark(enlarge)
Register search with filters and the latest acts

Starting point: acts in four places

Before the register, acts were scattered:

  • BIP, the public information bulletin, with gaps and numbering errors and scans without a text layer,
  • the electronic document management system, with signed packages of acts,
  • a network drive with resolutions from two terms of office,
  • paper archive.

A typical situation looked like this. An employee looks for the rules on using official cars and finds an order from 2019 in BIP. They do not know that two years later another order changed its fuel accounting rules, and a third one repealed the part about vehicle logbooks. To work this out, they have to read several acts and ask around in the secretariat.

Three sources, one truth

The register automatically links data from three sources:

  • BIP through its API: a full import of over 3,400 acts takes about 2.5 minutes,
  • packages from electronic document circulation: metadata, text, attachments and signature data,
  • the regional Official Journal through the ELI API: status, item, text and final printed version.

When sources differ, the editorial correction takes precedence, followed by the signed package, and finally BIP. The manually corrected field is not overwritten during subsequent imports. The register never changes signed packages.

The Official Journal allowed us to backfill the register all the way to 1999. We added 853 older resolutions, filled in 73 gaps, and the statuses 'in force' and 'repealed' come directly from the Official Journal.

Search

The register currently contains 5,098 acts: 2,164 resolutions since 1999 and 2,934 orders since 2017. Simply enter a number, such as XII/170/2024, or a few words from the title or content.

Search is full text and shows the matching fragment. Over 3,100 acts have their text in the register. Results can be narrowed by register, year, status, field and date range.

Act card

Each act has a card with a complete set of information:

  • the content of the act and a list of files with their formats and sizes,
  • data points: number, date, term, session, body, field,
  • status: in force, repealed or undetermined,
  • publication in the Official Journal with a link to the final print version,
  • the data from the electronic signature read from the package: who signed it, when, with which certificate, and whether the files match the signature.
The card of a resolution amending a local zoning plan: status In force, the text of the act, a list of PDF files with sizes, an Act details box, an Electronic signature box with the name blurred, and a link to the Official Journal publication(enlarge)
Resolution card with content, files, publication and signature

Numbering gaps

The register knows which numbers should exist, so it also shows the missing ones. For example, if the register holds orders 41/2025 and 43/2025, number 42/2025 goes on the list of gaps. Staff see these gaps in a separate view, together with internal acts, and can resolve them one by one.

An act that is not subject to publication does not disappear from the register. Its number, date, issuing authority and title are visible, with a note indicating it is not subject to publication instead of the content.

The staff view filtered by Numbering gap: a list of 46 missing order numbers from 2026, each with the note No act with this number in the register and a Numbering gap badge(enlarge)
Staff view: missing order numbers from one year

A local language model as an assistant

The field of the act and whether a person's name is mentioned in the title are suggested by a small language model running locally in LM Studio. The data does not leave my infrastructure.

The model must respond in the specified JSON format. Gemma proved to be the best choice, while Polish Bielik was discarded because it does not support enforced response formatting in LM Studio. The name in the title is additionally verified by a simple rule, and the model's result is only a proposal for approval.

I also tried OCR on scanned documents, but it produced too many errors. I decided that text from scans wouldn't go into the register, and such acts would only have a PDF file.

Automation and access for other applications

  • every night, the registry fetches new resolutions and status changes from the Official Journal,
  • files from BIP and the Official Journal are copied to my own S3 storage, so they don't depend on other people's servers,
  • other applications and AI assistants use an API that works only with a key,
  • a new version deploys itself once a tag is pushed to the repository.

Accessibility

The register has a dark mode, high contrast, three text sizes, and text-to-speech functionality. The automatic axe-core audit checks all types of pages in five display modes and does not report any violations of the WCAG 2.2 AA standards.

A register of law does not need to invent anything. It simply needs to collect what already exists, honestly show the gaps, and answer the question of what is currently in force.

- Aleksander Kowal

What's next

  • an editorial panel: entering acts, filling gaps, and "repeals" and "amends" relations,
  • logging in with one account through Authentik,
  • the public version of the register for residents.

Stack

  • Astro 7 with server-side rendering, Tailwind v4, DaisyUI v5 and Lucide,
  • NocoBase 2.2 as an administrative panel and PostgreSQL 16 with full-text search,
  • RustFS as an S3-compatible file storage solution,
  • importers in Node.js, a local model in LM Studio, axe-core audits, Docker.

Click or scroll to zoom in. Drag to move around.Double tap or pinch to zoom in.

Was this useful?

New posts by e-mail

Every now and then, when a new post or project goes up. No ads.

Got an idea, a question or a comment? Write to me:Enable JavaScript to see the e-mail address