A modern, templated government portal for Philippine Local Government Units (LGUs). This template supports both municipalities and provinces, automatically adapting terminology and structure based on your configuration.
Attribution: This project is a fork and template adaptation of BetterSolano, originally developed by Ramon Logan Jr. and the BetterSolano community as part of the BetterGov.ph civic-tech initiative.
- LGU Type Support: Configure for either municipality or province
- Multi-language: English, Filipino, and Ilocano translations with template variable interpolation
- CMS-Ready: All configuration stored in JSON files for easy editing
- Responsive Design: Mobile-first, accessible design
- Dynamic Content: Statistics, officials, barangays/municipalities, hotlines, and history from config
- SEO Optimized: Dynamic metadata based on LGU configuration
- Next.js 14 • React 18 • TypeScript
git clone https://github.com/BetterGov/bettergov-lgu-template.git
cd bettergov-lgu-template
npm installnpm run setup-lguThe wizard will guide you through configuring:
- LGU type (municipality or province)
- Basic information (name, province, region)
- Contact information
- Social media links
- Map coordinates
- Theme color
Edit the JSON files in the config/ directory:
| File | Description |
|---|---|
site.json |
Basic site configuration (LGU type, name, contact, social) |
officials.json |
Executive and legislative officials |
subdivisions.json |
Barangays (municipality) or municipalities/cities (province) |
hotlines.json |
Emergency, medical, and government hotlines |
history.json |
Historical timeline and facts |
statistics.json |
Population, land area, income class, etc. |
translations.json |
Translation overrides (optional) |
Replace the logo files in public/assets/images/logo/:
logo.svg- Main logo (dark background)logo-white.svg- White version (for footer)favicon.svg- Browser favicon
npm run devVisit http://localhost:3000 to see your site.
The template automatically adapts based on lguType in config/site.json:
| Feature | Municipality | Province |
|---|---|---|
| Leader Title | Mayor | Governor |
| Vice Leader | Vice Mayor | Vice Governor |
| Legislative Body | Sangguniang Bayan (SB) | Sangguniang Panlalawigan (SP) |
| Members | SB Members | Board Members |
| Subdivisions | Barangays | Municipalities/Cities |
| Department Prefix | Municipal | Provincial |
| Main Building | Municipal Hall | Provincial Capitol |
For a Municipality:
{
"lguType": "municipality",
"municipality": "Solano",
"province": "Nueva Vizcaya",
"region": "Region II",
"siteId": "bettersolano",
"domain": "bettersolano.org",
"tagline": "Your digital gateway to LGU services",
"themeColor": "#1a5f2a"
}For a Province:
{
"lguType": "province",
"municipality": "",
"province": "Nueva Vizcaya",
"region": "Region II",
"siteId": "bettersolano",
"domain": "bettersolano.org",
"tagline": "Your digital gateway to Provincial Government of Nueva Vizcaya services",
"themeColor": "#1a5f2a"
}{
"executive": [
{
"id": "mayor",
"name": "Juan Dela Cruz",
"position": "mayor",
"title": "Municipal Mayor",
"email": "mayor@example.gov.ph",
"phone": "(02) 123-4567"
}
],
"legislative": [
{
"id": "sb-member-1",
"name": "Maria Santos",
"position": "sb_member",
"title": "SB Member",
"committees": "Finance, Health"
}
],
"departments": [
{
"id": "treasurer",
"slug": "municipal-treasurer",
"department": "Municipal Treasurer's Office",
"abbreviation": "MTO",
"description": "Tax payments and revenue collection",
"icon": "bi-cash-coin"
}
]
}{
"type": "barangay",
"count": 22,
"items": [
{
"id": "barangay-1",
"name": "Poblacion",
"leader": "Kap. Juan Santos",
"leaderTitle": "Punong Barangay",
"phone": "0917-123-4567"
}
]
}The translation system supports template variables that are automatically filled in:
| Variable | Description | Example |
|---|---|---|
{{lguName}} |
LGU name based on type | "Real" or "Quezon" |
{{municipality}} |
Municipality name | "Real" |
{{province}} |
Province name | "Quezon" |
{{lguType}} |
"Municipality" or "Province" | "Municipality" |
{{leaderTitle}} |
"Mayor" or "Governor" | "Mayor" |
{{hallName}} |
"Municipal Hall" or "Provincial Capitol" | "Municipal Hall" |
Example translation:
{
"hero-welcome": "Welcome to Better{{lguName}}.org",
"hero-subtitle": "Services for the people of {{municipality}}, {{province}}."
}npm run buildThe built site can be deployed to any static hosting service:
- Vercel (recommended for Next.js)
- Netlify
- GitHub Pages
- Any web server
├── config/ # LGU configuration files
│ ├── site.json # Basic site configuration
│ ├── officials.json # Government officials
│ ├── subdivisions.json # Barangays or municipalities
│ ├── hotlines.json # Emergency numbers
│ ├── history.json # Historical timeline
│ ├── statistics.json # LGU statistics
│ └── translations.json # Translation overrides
├── public/
│ └── assets/
│ └── images/logo/ # Logo files (replace these)
├── scripts/
│ └── setup-lgu.js # Setup wizard
├── src/
│ ├── app/ # Next.js pages
│ ├── components/ # React components
│ ├── contexts/ # React contexts
│ ├── lib/ # Config loader
│ └── types/ # TypeScript types
└── package.json
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
See CONTRIBUTING.md for detailed guidelines.
This project is dual-licensed:
| License | Applies To | Details |
|---|---|---|
| MIT License | Source Code | Free to use, modify, and distribute |
| CC BY 1.0 | Content | Attribution required for content reuse |
See LICENSE for full details.
This template would not be possible without:
- BetterSolano - The original project this template is based on
- Ramon Logan Jr. - Original developer of BetterSolano
- BetterGov.ph - The civic-tech initiative driving government transparency in the Philippines
- All contributors and volunteers who dedicate their time to civic technology
All public information templates are designed to work with official government data:
| Source | URL | Data Type |
|---|---|---|
| Bureau of Local Government Finance | blgf.gov.ph | Budget, Financial Reports |
| Philippine Statistics Authority | psa.gov.ph | Demographics, Census |
| DTI CMCI Portal | cmci.dti.gov.ph | Competitive Index |
| DPWH Transparency Seal | dpwh.gov.ph | Infrastructure Projects |
Made with ❤️ by the BetterGov Community
Forked from BetterSolano • Part of the BetterGov.ph initiative