← Project journal

The site now runs on Cloudflare

Every law, ruling and gazette page is now a static file served from Cloudflare's network. Search, the API and filters run in one container next to it. The whole build lives in the public repository.

View the source on GitHub

About 760,000 pages, built from the open data.

The pages you read are no longer rendered by a server on every visit. A GitHub workflow builds them from the data/ folder of the public repository, in 8 parallel jobs, and stores them in Cloudflare R2. A small Cloudflare Worker serves each page from the nearest Cloudflare location and answers old addresses with one redirect. Court ruling PDFs are served the same way.

Search and the API in one container.

Anything that needs a database, such as search, the JSON API at /api/v1/, filtered lists and gazette scans, goes to one Cloudflare Container. It holds PostgreSQL with the database built in and the same Go server as before. Repeated API requests are answered from Cloudflare's cache, and a rate limit per address keeps one client from slowing it down for everyone.

One public repository.

The code that used to live in a private repository, including the scraper, the build pipeline, the website and the MCP server, is now in github.com/taktekhq/lebanese-legislation. The workflows that build the pages, the container and the search vectors are there too, so anyone can see how the site is made and rebuild it.

What stays the same

Every address still works, and old addresses still redirect to the right page. The API, the MCP server at lebaneselegislation.com/mcp and the open data on Hugging Face keep the same formats. If a page looks wrong or a search finds less than before, tell us through the contribute page.

Sources

Read the developer documentation