Busabase
Busabase is an open-source (MIT) database and workspace for AI agents — data, docs, skills, and apps in one place. Run it locally, self-host it inside your network, or use Busabase Cloud, and turn age
Trendy, energetic MPLADS monitoring platform
Translation pending
DataPython · TypeScriptGitHub @Anushka-paperOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗models.py — SQLAlchemy data model (MPs, FY ledgers, works, societies, inspections)rules_engine.py — the compliance rules engine (10 rules covering financial,
geospatial, negative-list, society, and SLA checks from the guidelines)example_check.py — standalone runnable demo (no server needed)api.py — FastAPI wrapper exposing POST /check-compliancerequirements.txtpip install -r requirements.txt
# Option A: run the standalone demo
python example_check.py
# Option B: run the API
uvicorn api:app --reload
# then POST to http://localhost:8000/check-compliance
# see `example_payload` at the bottom of api.py for the request shape
# interactive docs auto-generated at http://localhost:8000/docs
Start with the API as a microservice. Don't try to merge this logic
into your main app's codebase directly. Run it as a separate FastAPI
service. Your main app (whatever manages work recommendations) calls
POST /check-compliance whenever a work is created or edited, and
gets back APPROVED / NEEDS_REVIEW / BLOCKED plus the per-rule
breakdown. This keeps the compliance logic swappable and testable
independent of your UI/main app.
Persist real ledgers, not in-memory ones. api.py currently takes
a ledger snapshot in the request body so you can test without a DB.
For real use: point it at a real Postgres/SQLite DB using models.py,
look up the MP's actual FinancialYearLedger row by mp_id +
financial_year, and update it transactionally the moment a work is
sanctioned (increment cumulative_sanctioned, repair_renovation_sanctioned,
etc. — see the models.py docstring on why this ledger must hold running
totals rather than being recomputed from scratch each time).
Add rules incrementally, don't try to cover every para on day one.
Start with the ~10 rules already implemented (they cover the highest-
frequency checks: entitlement ceiling, minimum work amount, repair
ceiling, out-of-constituency cap, jurisdiction, negative list, society
eligibility, and two SLA timers). Add SC/ST hard quota enforcement,
calamity relief timelines, and admin expenditure caps next — each is
a new Rule subclass in rules_engine.py, nothing else needs to change.
Never auto-reject on the negative-list rule alone. It's marked
REVIEW severity on purpose. Route anything it flags to a human
reviewer queue in your UI. If you want to reduce false positives,
replace NegativeListRule._keyword_hits with a call to an LLM
classifier that reasons about the actual work description instead
of raw keyword matching — the rest of the engine doesn't need to change.
Log every check. Use the ComplianceCheckLog table in models.py
to persist every RuleResult against the work — this becomes your
audit trail when the CAG/State auditors ask "how was this work checked."
context dict (MP type, allowed districts, calamity flag,
any linked society, written justification if under ₹2.5L)ComplianceEngine().evaluate(work, ledger, context)report.overall_status:
APPROVED → proceed to sanction, update the ledgerNEEDS_REVIEW → hold, route to human reviewer with the flagged rulesBLOCKED → reject automatically, return the failing rule messages
to whoever submitted the recommendation