Why a Directory of 7,800+ Local Offices
story product
- Built with
- PHP
- MariaDB
Most people cannot say which local office covers their street. That small gap is the reason I built อปท.com, a directory of Thai local-government offices. The goal is simple: you type where you live, and you land on the right office.
The problem in one line
Thailand has thousands of local offices. They handle water, roads, waste, permits and help after a disaster. The information about them is spread across many separate sites, and it is hard to tell which office is yours.
What I built
The directory lists more than 7,800 offices in 76 provinces. Each office has its own page with an address, a map, weather and local news. You can search by name, browse by province and district, or find the nearest office to you. I describe the whole project on the case study page, and the stack is listed on the demo page.
The site is built for the person who has one question: which office is mine, and where is it? Search, browse and "nearest to me" are three ways into the same answer, so you can use whichever fits what you already know. If you know the name, search. If you know the province and district, browse. If you know nothing but where you stand, ask for the nearest one.
One page per office
The idea is simple: one office, one page, one address. A page that has its own address can be found by search, shared in a chat and checked by the office itself. The directory works because every office gets the same shape of page. A visitor learns the shape once and can read any office.
The same shape also helps the offices. Address, map, weather and news sit in the same places on every page, so a resident who has seen one page knows where to look on the next.
Names are not unique
Office names repeat. As of October 2026, hundreds of names are shared by more than one office, so a name alone does not point to one office.
So a name page shows a choose-one list when the name is shared, and each office also has its own address with the province in it. Wrong guesses return a not-found page instead of a random office. A clear "not found" is better than sending someone to the wrong place.
The toy below shows the idea with made-up data. Pick a sample province, then an office. One sample name appears in two provinces, and the card tells you.
Interactive · toy
What a directory page shows for one office.
- Each office has its own page: name, type, area, contact and a map pin.
- A name shared by several offices leads to a choose-one list.
- Each office also has its own address that includes the province.
- A wrong province gives not-found, never a random office.
Public data, kept honest
The data is public and refreshed on a schedule. If a source fails, the page keeps the last data and says when it was updated, instead of hiding the section. The site is independent and says so on every page: it is not a government site.
That matters for trust. A visitor can see what is shown, that it comes from public sources, and that the site does not speak for any office.
What it is now
The directory is the base. On top of it sit warning maps, trip ideas, news and an AI assistant that answers questions in Thai and carries a notice that AI can be wrong. The AI part is there to answer real questions about the offices and the data, not to decorate the site. For another story about building a product from a small irritation, read why I created Plaazaa.
If you have public data and want a searchable site with maps and scheduled updates, tell me what you have. I reply with a one-page recommendation first.
Book the free consult