Dev.to WebDev 🛠 Dev 👁 0 📖 3 min read

Building a readable layer over a state real-estate regulator's portal

Uttar Pradesh's real-estate regulator, UP-RERA, publishes every registered housing project: the promoter, the declared completion date, every extension, quarterly progress reports, completion certificates. It's all publi

Uttar Pradesh's real-estate regulator, UP-RERA, publishes every registered housing project: the promoter, the declared completion date, every extension, quarterly progress reports, completion certificates. It's all public. It's also spread across portal pages that were built for filing, not for reading. A buyer checking one project opens five tabs and still can't tell what changed since registration.

I built Estanzo to put each project's filings on one page, with a link back to the regulator's own record. These are the decisions that shaped it.

No scores, on purpose

The obvious product is a builder rating. I didn't build one. These are real companies, and a score is my opinion sitting on top of a public record. Once you publish an opinion as a number, every argument is about your formula instead of the filing.

So the rule is "data as reported by RERA": show what was filed, say once per page where it came from, link to the source, and compute nothing that the reader can't see. That rule ended up driving more of the architecture than any performance concern.

The shape of the data

The hierarchy is small: state, promoters, projects, then each project's quarterly reports and complaints. Promoters are first-class because the legal entity on a filing is usually a project-specific company, not the brand on the billboard. Grouping those companies under a brand is tempting and easy to get wrong, so it's left out until it can be done from evidence.

Everything is keyed on the regulator's own registration number. Re-scrapes upsert on that key, so running the same import twice changes nothing, and a record never gets a second row because a name was spelled differently this quarter.

Go for the backend

The API and the scraper are Go: chi for routing, pgx for Postgres, zap for logs. The layout is split by behaviour rather than by domain: one shared persistence layer, an ingestion package, an API package, and a small domain package that imports nothing internal. The data is one tightly linked graph that gets aggregated in many directions, so a single storage layer turned out simpler than a repository per domain.

A few rules that paid for themselves:

  • SQL lives in one package, as named constants, parameterised. Handlers parse, validate, call, write, and nothing else.
  • Enums are int-based with an explicit Unspecified zero value, generated with enumer. A zero value that silently means "registered" is a bug waiting for a missing field.
  • Internal bigint IDs never leave the database. URLs use slugs and registration numbers.

Scraping a government portal politely

The scraper runs behind an adapter interface, so the portal-specific code is one package. The part that took the most care is not parsing, it's manners:

  • The request ceiling is global across every worker. If you shard the scrape across N tasks and keep a per-task limit, you've quietly multiplied your rate by N.
  • The portal soft-blocks under load: maintenance pages, a CAPTCHA on some listings. Those are a signal to slow down, not errors to retry harder. Today that means dialling a blocked run back by hand; automatic backoff is next on the list.
  • Every record carries the date it was collected, so the page can say how fresh it is without promising a refresh schedule that might change.

Next.js on the front

The site is server-rendered Next.js with React, Tailwind and shadcn/ui. Server rendering matters because most visitors arrive from search with a project name or registration number. Types mirror the Go response shapes, and components never fetch directly; API calls live in one place.

The blog runs on Payload CMS inside the same Next.js app. Posts are written as Markdown and published through Payload's API, which converts them into its rich-text format.

What I'd do again

Deciding the editorial rule before the schema. "Show the filing, link the source, never score" removed a whole category of features, and the ones left were easier to build and easier to defend.

If you work with Indian property data, or have scraped a portal that pushes back, I'd like to hear how you handled it.

Drafted with AI assistance from my notes and the project docs.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.