Evidence-first energy-audit software for Indian audit teams. Trancense is decision support: it does not certify an audit, determine compliance, or guarantee savings.
After sign-in and onboarding, the workspace is organized around a short audit loop:
- Add a monthly bill or meter reading in one form, or import up to 500 monthly rows from a CSV.
- Review draft readings before they enter trusted calculations.
- Use approved data in analysis, findings, recommendations, and draft reports.
- Add supporting evidence, equipment, and preliminary solar scenarios as the audit progresses.
The post-login navigation keeps the primary workflow visible—Dashboard, Data, Analyse, Actions, and Reports. Secondary tools are grouped under “More tools” so the workspace stays focused on the next audit decision.
CSV imports retain the original file as private evidence. Supported columns include month (or billing_month), quantity (or kwh), and optional source, unit, cost, provider, and notes.
-
Use Node 22 LTS for local verification and deployment. The checked-in Supabase CLI version requires Node 22; some lint and browser tooling also no longer supports Node 18.
-
Copy
.env.exampleto.env.localand set:NEXT_PUBLIC_SUPABASE_URL=https://your-project-ref.supabase.co NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=sb_publishable_... NEXT_PUBLIC_APP_URL=http://localhost:3000NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYmust match the application variable name. The current application does not require a service-role key; never expose one in browser code or commit it. -
Log in to the Supabase CLI, link the project, and apply migrations in timestamp order:
supabase login supabase link supabase db push
-
In Supabase Auth, enable email/password and add these Redirect URLs for local and production domains:
http://localhost:3000/auth/callback?flow=signuphttp://localhost:3000/reset-passwordhttps://trancense.vercel.app/auth/callback?flow=signuphttps://trancense.vercel.app/reset-password
-
Start the app with
npm run devand openhttp://localhost:3000.
The seed creates a fictional Meridian Components audit with approved electricity records, an excluded diesel record with a missing conversion factor, a reviewed finding, and a recommendation in review.
-
Create and confirm a dedicated demo-only account in Supabase Auth. Use a password that is never stored in this repository.
-
In the same Supabase SQL Editor session, set its email before running the seed:
select set_config('app.demo_email', 'confirmed-demo-account@example.com', false);
-
Run
supabase/seed/jury_demo.sqlin the Supabase SQL Editor. -
Sign in at
/sign-in. -
Upload
demo/fixtures/jury-energy-register.csvat/app/evidenceor use/app/importto exercise the bulk monthly import flow. -
Walk through
/app/energy,/app/analysis,/app/findings,/app/recommendations, and/app/reports.
For the complete presentation sequence, see JURY_DEMO_RUNBOOK.md.
For a plain-language explanation of every post-login tab, see POST_LOGIN_WORKSPACE_GUIDE.md.
The GitHub repository is Kashyep/Trancense. Configure the Vercel Production Branch intentionally for the active release branch.
- In Settings → Environment Variables, set these Production values:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEYNEXT_PUBLIC_APP_URL=https://trancense.vercel.appNEXT_SERVER_ACTIONS_ALLOWED_ORIGINS=trancense.vercel.app
- Redeploy after environment changes;
NEXT_PUBLIC_*variables are embedded at build time. - Test sign-up confirmation, password reset,
/sign-in, and protected/approutes after deployment is Ready.
Never commit .env.local, Supabase service-role keys, reset links, or passwords.
The UI uses Exo 2 for headings, Open Sans for detailed UI, and Kanit for labels with semantic light/dark tokens. Theme selection is manual only: the next-themes provider defaults to light, stores the explicit choice under trancense-theme, and never follows the operating system.
Email/password users receive a confirmation route at /account-verified after a successful sign-up confirmation. Users without a completed audit route to the protected, two-step workspace and boundary setup flow. Google OAuth is intentionally not rendered until provider configuration exists.
npm install
npm test
npm run typecheck
npm run lint
npm run build
npm run devsrc/app: public, auth, onboarding, and protected App Router routes plus server actions.src/components: shared UI, minimal post-login navigation, theme, data-entry, import, equipment, solar, and review workflow forms.src/domain: deterministic calculation, monthly-period, CSV-import, solar-model, and recommendation workflow rules.src/lib/supabase: SSR/browser clients and session refresh helpers.supabase/migrations: schema, RLS, private bucket, Storage policies, and workflow hardening.supabase/seed: fictional jury-demo data.demo/fixtures: uploadable fictional source register.
All tenant records are workspace-scoped. RLS resolves access through workspace_memberships, never editable profile metadata. Evidence and reports remain in private buckets; authorized download routes issue 60-second signed URLs only after a scoped metadata check. Permanent public URLs are not used. Only approved normalized records enter trusted calculations, and missing factors produce an unavailable state rather than zero.
The P0 pilot limit is one workspace per account. Preserve existing data and direct expansion requests to /contact.
Before deployment, follow DEPLOYMENT_READINESS.md, PRE_DEPLOYMENT_CHECKLIST.md, execute SECURITY_TEST_PLAN.md against a disposable Supabase project, and review SECURITY_AUDIT.md.
Supply factual identity, legal, pilot, and proof material in CONTENT_REQUIRED.md before public launch. PITCH_READINESS.md separates implementation claims that can be demonstrated today from claims requiring evidence.