How bettergovph/bettergov works
BetterGov.ph is a citizen-facing Philippine government information portal, with a companion Cloudflare Worker serving weather and foreign-exchange data. The main user workflow is browsing the portal’s routed pages to find services, government information, and travel guidance; the services directory supports finding services by category and search. Other documented branches include flood-control project exploration and Philippine reference information. The graph follows visible routes and calls; many listed pages and integrations were not sampled, so their internal connections are omitted.
Main entry points: App.tsx Route application · index.ts Worker entry · index.tsx Services directory · weather.ts Weather API
Components 21
Portal experience
- Route application
src/App.tsx - Home page
src/pages/Home.tsx - Site navigation
src/components/layout/Navbar.tsx - Navigation data
src/data/navigation.ts - Service highlights
src/components/home/ServicesSection.tsx - Search page
src/pages/Search.tsx - Weather display
src/lib/weather.ts - Forex display
src/lib/forex.ts
Services and government
- Services directory
src/pages/services/index.tsx - Government directory
src/pages/government - Government branch pages
src/pages/government/legislative/[chamber].tsx
Travel and Philippines
- Travel information
src/pages/travel/visa/index.tsx - Visa details
src/pages/travel/visa-types/[type].tsx - Philippines reference
src/pages/philippines
Public project data
- Flood project explorer
src/pages/flood-control-projects/index.tsx
Data API
- Worker entry
functions/index.ts - Weather API
functions/api/weather.ts - Forex API
functions/api/forex.ts - Weather KV
- Forex KV
Other components
- Website visitor
Connections 20
- Website visitor → Route application: opens portal
- Route application → Home page: routes to
src/App.tsx - Route application → Services directory: routes to
src/App.tsx - Route application → Government directory: routes to
src/App.tsx - Route application → Travel information: routes to
src/App.tsx - Route application → Flood project explorer: routes to
src/App.tsx - Route application → Search page: routes to
- Home page → Service highlights: renders
src/pages/Home.tsx - Site navigation → Navigation data: reads
src/components/layout/Navbar.tsx - Service highlights → Services directory: links to
src/components/home/ServicesSection.tsx - Services directory → Search page: searches within
- Government directory → Government branch pages: includes
- Travel information → Visa details: links to
- Worker entry → Weather API: dispatches
functions/index.ts - Worker entry → Forex API: dispatches
functions/index.ts - Weather API → Weather KV: reads and writes
functions/api/weather.ts - Worker entry → Weather API: schedules
functions/index.ts - Worker entry → Forex API: schedules
functions/index.ts - Weather display → Worker entry: requests data
- Forex display → Worker entry: requests data