GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - strdst7/BantuRakyat-AI: šŸ‡²šŸ‡¾ AI-powered platform helping Malaysians discover government aid programs and check eligibility. Built for the KRACKED DEVS Ɨ PasarAPI Mini Bounty.

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
.planning/codebase
.planning/codebase
 
 
src
src
 
 
v1
v1
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
banturakyat-preview.html
banturakyat-preview.html
 
 
banturakyat-update.patch
banturakyat-update.patch
 
 
drizzle.config.ts
drizzle.config.ts
 
 
eslint.config.mjs
eslint.config.mjs
 
 
next.config.ts
next.config.ts
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
postcss.config.mjs
postcss.config.mjs
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

šŸ‡²šŸ‡¾ BantuRakyat-AI

An eligibility checker for Malaysian public aid programmes, with plain-language explanations in BM and English.

Built with Next.js, TypeScript, Drizzle ORM / PGlite, and OpenDOSM open data.


Next.js TypeScript License


Important

This is not an official government service. It is an independent, open-source project. Every eligibility result and ringgit figure is an estimate produced by this application's own rules — never an official determination. Always confirm with the relevant agency before applying.


✨ What it does

A user enters their state, household income, household size, employment status, and any special indicators (OKU, warga emas, single parent, youth). The app then:

  1. Filters a catalogue of aid programmes against those inputs.
  2. Returns the programmes the user appears to qualify for, with an estimated annual value.
  3. Explains each match in Malay and English, and lists the documents needed.
  4. Shows the user's income relative to their state's median household income, using DOSM data.
  5. Lets the user mark programmes they already receive, to surface unclaimed support.
  6. Copies an action plan to the clipboard for offline use.

šŸ” What is real, and what is an estimate

Being precise about this matters more than sounding impressive.

Element Status
State household income, low-income CPI Live from api.data.gov.my (OpenDOSM), cached 5 minutes, with a bundled DOSM 2024 fallback
State poverty rates Bundled DOSM 2024 figures — not fetched live
Aid programme catalogue Curated by hand in src/db/seed-data.ts; editable via the admin API
Eligibility matching Deterministic rules in src/lib/aid-engine.ts
Explanations (BM/EN) Templated strings chosen by programme code — no language model is called
Estimated annual values Heuristic (base amount plus a household-size adjustment), clearly labelled EST.
Payout calendar dates Indicative only — not sourced from any API; the UI says so
Notification delivery Not implemented. Contact registration records interest only

The banner on screen and the status field in /api/pasarapi/snapshot reflect the real state of the live feed (online / partial / fallback). If OpenDOSM is unreachable, the app says so instead of claiming to be live.


🧠 Why rules instead of an LLM

Eligibility outcomes here need to be explainable and reproducible. A deterministic engine means:

  • The same input always produces the same output.
  • Every match can be traced to a specific rule and reason string.
  • No personal financial data leaves the server to a third-party model provider.

The trade-off is that the catalogue and rules need manual upkeep as schemes change. That is deliberate.


āš ļø Known limitations

  • Notification alerts are not delivered. /api/alerts stores a keyed hash and a masked contact; nothing sends email or SMS yet. The UI says this explicitly.
  • Serverless storage is ephemeral. On Vercel, PGlite runs in memory, so scan history and alert registrations do not survive a cold start. Point DATABASE_URL at a networked Postgres for durable storage.
  • Programme data ages. Thresholds and payout dates are hardcoded and must be reviewed each budget cycle.
  • No automated tests yet. The eligibility engine is the highest-value place to add them.
  • v1/ is a legacy prototype, excluded from typecheck and lint.

šŸš€ Quick start

Requires Node.js 20+.

npm install
npm run dev

Open http://localhost:3000.

npm run build    # production build
npm run start    # serve the build
npm run lint
npm run typecheck

šŸ” Environment variables

Variable Required Purpose
ADMIN_API_KEY For admin use Unlocks /api/admin/*. If unset in production, those routes return 404.
ALERT_HASH_SECRET Recommended Key for the HMAC used to hash alert contacts. A dev-only fallback is used if unset.
DATABASE_URL For drizzle-kit only Runtime uses PGlite; this is for migration tooling.

The admin dashboard is at /admin; paste the key there to unlock it. The key is kept in sessionStorage only.


šŸ“ Project structure

src/
ā”œā”€ā”€ app/                    # Next.js App Router (page, admin, API routes)
ā”œā”€ā”€ lib/
│   ā”œā”€ā”€ aid-engine.ts       # deterministic eligibility rules
│   ā”œā”€ā”€ pasarapi.ts         # OpenDOSM client + provenance tracking
│   └── admin-auth.ts       # admin key gate
└── db/                     # Drizzle schema, PGlite bootstrap, seed catalogue

šŸ† Built for the KRACKED DEVS Ɨ PASARAPI Mini Bounty

Created for a community challenge encouraging Malaysian developers to build practical, AI-assisted applications using real-world open data.

  • 🌐 KRACKED DEVS Bounty: https://krackeddevs.com/code/bounty/pasarapi-bounty
  • šŸ”Œ PasarAPI: https://pasarapi.xyz/

Thanks to both teams for running the initiative.


šŸ“„ License

MIT — see LICENSE.


🌐 Live preview

https://bantu-rakyat-ai.vercel.app

Made with ā¤ļø using Next.js + TypeScript

About

šŸ‡²šŸ‡¾ AI-powered platform helping Malaysians discover government aid programs and check eligibility. Built for the KRACKED DEVS Ɨ PasarAPI Mini Bounty.

bantu-rakyat-ai.vercel.app

Topics

aidrizzlenextjssocial-goodtypescript

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.