A public, machine-readable directory of libraries in North Macedonia: addresses, contacts, opening hours, COBISS holdings and statistical coverage, compiled from public sources with per-record provenance.
Data is compiled from the Ministry of Culture (МКТ), COBISS, the Central Registry, the State Statistical Office (ДЗС), Wikipedia, zk.mk, loc.mk, CompanyWall and other public registers, in a fixed order of precedence.
tsx) with ExcelJS and Zodnode:test runnerNode.js >= 20.9 (CI uses Node 24) and npm.
npm install
npm run dev # http://localhost:3000
| Command | What it does |
|---|---|
npm run dev |
Start the development server. |
npm run build |
Regenerate the data, then export the static site to out/. |
npm run data:build |
Validate the workbook and regenerate src/data/ and public/data/. |
npm run data:check |
Fail if the committed derived data is out of date. |
npm run data:test |
Run the data tests (node:test). |
npm run typecheck |
tsc --noEmit. |
npm run check |
data:check + tests + typecheck — the suite CI runs. |
master_biblioteki_mk.xlsx at the repository root is the single source of truth and is never
edited by the scripts. Everything else is derived from it:
scripts/build-data.ts validates every row (Zod), normalises text (Cyrillic
transliteration for slugs, dashes, quotation marks), computes aggregates and writes the
JSON/CSV files plus the client search index.src/data/ (used by the app at build time) and public/data/
(published for download). They are committed so the site builds without touching the
workbook.tests/data.test.ts assert counts, taxonomy, verification levels, URL schemes,
coordinates, provenance and that the committed files match a fresh run.Do not hand-edit src/data/ or public/data/ — change the workbook or the pipeline and run
npm run data:build.
app/ App Router routes (all statically exported)
components/ shared UI (header, footer, cards, directory, maps, analytics)
lib/ data access, SEO/JSON-LD, formatting, opening hours, link helpers
scripts/ workbook → JSON/CSV pipeline
src/data/ generated data, committed
src/lib/ schemas and taxonomy
public/data/ published JSON/CSV exports
tests/ data and pipeline tests
npm run build produces a fully static site in out/ (output: 'export', trailing slashes,
unoptimised images). Any static host can serve it.
.github/deploy.yml contains the GitHub Actions build-and-publish workflow for GitHub
Pages; GitHub only discovers workflows under .github/workflows/, so the file has to be
moved there to run automatically.public/_redirects keeps 301s for the legacy /gradovi/* and /o-proektu/* paths, and
public/_headers sets the correct Content-Type for the generated Open Graph images.
These files are used by hosts that support that format (Cloudflare Pages, Netlify).Visit statistics are collected with Matomo Tag Manager in cookieless mode: no cookies are
set, nothing is stored on the visitor’s device and no personal profiles are kept. The loader
lives in components/analytics.tsx and starts after hydration.
The code and the published dataset are licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). Reuse is allowed with attribution to the project.
The registry was built by Goce Mitevski and Boris Ristovski.