Skip to content

About

Citizen-first RTI guidance and filing prototype for India

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

RTI Saathi

RTI Saathi is a citizen-facing hackathon prototype that guides a person from an everyday information need to a clearly worded, correctly routed RTI request, then demonstrates tracking and appeal states with synthetic data.

Public app: https://rtisaathi.vercel.app

Run the app

npm install
npm run dev

The supplied .env.example documents the required frontend variables. Keep the real .env uncommitted.

Supabase

The browser uses only the project URL and publishable key. The database schema, indexes, grants, and row-level security policies are in supabase/migrations/20260825173000_citizen_workspace.sql.

Apply the migration from the Supabase SQL Editor, or link the local CLI and run:

npx supabase login
npx supabase link --project-ref acuglcofkkrvvqwxhfbp
npx supabase db push

Do not put a database password, personal access token, or secret/service-role key in .env or client code. The checked-in Supabase configuration disables mandatory email confirmation for the hackathon prototype, so judge-created accounts can sign in immediately after npx supabase config push. If a future deployment enables confirmation again, registration still works immediately on the current device and cloud sync activates after confirmation and sign-in.

The optional request-improvement feature runs through the authenticated analyze-rti-request Edge Function. Deploy it with:

npx supabase functions deploy analyze-rti-request

Set OPENAI_API_KEY and optional OPENAI_MODEL=gpt-5-nano as Supabase secrets from your own terminal. Never put the OpenAI key in .env, a VITE_ variable, source code, screenshots, or chat. Without the secret, the app keeps the citizen's text and uses clearly labeled offline guidance.

gpt-5-nano is the default because this small, structured classification and rewriting task benefits from the lowest-cost model. The function disables response storage, enables no tools, accepts only authenticated requests, and validates every authority ID against the app's curated directory. AI runs only after the citizen presses the improvement button.

RTI Copilot and WebMCP

The ordinary website is complete without an AI browser. On the Need, Authority, Review, case-detail and appeal routes, RTI Saathi progressively registers only the site tools relevant to the visible page when the browser exposes document.modelContext.

The seven tools can understand the saved need, apply approved wording, compare or select a validated authority, review completeness, explain the open case, and prepare appeal guidance. They cannot submit an RTI, pay a fee, upload a document, file an appeal, delete a case, or choose an authority that was not returned by the current validated analysis. Draft-changing tools require the analysis ID and exact current draft revision, so a suggestion prepared before a citizen edit is refused.

Case tools expose only allowlisted status, deadline, payment, transfer and next-action fields. Applicant details and the request text are not returned. Tool registration itself uses no API key. A signed-in, deliberate request-analysis invocation can reuse the same server-side Supabase Edge Function described above; otherwise the safe offline guidance remains available.

Prototype data behavior

  • Every browser or Supabase account has an isolated workspace.
  • Registered judges begin with no seeded cases. The Ananya account alone receives the complete walkthrough. Its Supabase session authorizes optional live AI guidance, while its seeded cases remain device-local and resettable.
  • Registration accepts only the clearly fictional identity value 0000 0000 0000. It is validated on that screen and is never added to the profile, local storage, Supabase, or AI requests.
  • Device accounts persist locally. Cloud-authenticated accounts hydrate from Supabase before uploading merged changes.
  • Standard-fee submission requires a completed fictional payment state. Payment failures, cancellation, transaction references, receipts, and submissions survive refresh.
  • Language and accessibility choices persist on the device; their menus close after a choice so the citizen returns directly to the task.
  • Every new fictional RTI, transaction, and receipt receives a unique Web Crypto based reference.
  • Discard draft, Cancel demo payment, and Archive from My RTIs affect only prototype data. They never claim to cancel or withdraw a real RTI.
  • Reset is visible only in the seeded Ananya workspace and does not delete registered citizen accounts or accessibility settings.

Translation

npm run translation:start
Invoke-RestMethod http://localhost:5000/ready

The hosted cache-only gateway at https://rti-saathi-translate.vercel.app currently offers English, Hindi, Bengali, and Urdu, matching the English pairs available in the pinned LibreTranslate/Argos package index. Docker is used only to author the approved cache. The deployed app does not depend on a laptop or a live translation model container.

Verify

Vercel is connected to this GitHub repository. Pull requests receive preview deployments, and every merge to main updates rtisaathi.vercel.app.

npm test
npm run build
npm run test:e2e

Push-Location services/translation/gateway
python -m pytest tests
Pop-Location

All submissions, payments, OTPs, case events, references, people, and documents shown by the product are simulated or synthetic. No government system is contacted.

About

Citizen-first RTI guidance and filing prototype for India

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages