DataAmble: AI-Powered Multi-Tenant Carbon Accounting & ESG Disclosure Platform (Scope 1/2/3 GHG Tracking with Gemini-Bas
by KUSHALAVA KAVURI · raised 0 credits · spent 0 credits · pool 0 credits
Build a production-grade, multi-tenant SaaS web application called DataAmble for automated GHG emissions accounting and regulatory ESG reporting, targeting mid-market enterprises (100–5,000 employees). Use the following stack and specifications exactly: STACK Frontend: React (Vite), Tailwind CSS, React Query, React Router v7 Backend: Node.js using Hono framework, deployed as Netlify Functions (serverless) Database: PostgreSQL via Neon Serverless, fully org-scoped multi-tenant schema (every table has org_id FK, no global/shared rows) Auth: Standalone fetch-based session auth (no third-party platform SDKs), JWT or session-cookie based, with AUTH_SECRET and AUTH_URL env vars AI: Google Gemini API for (a) emissions data taxonomy/classification, (b) Scope 3 spend-based emission estimation, (c) anomaly detection in submitted activity data Deployment: Netlify, SPA mode, drag-and-drop compatible build output CORE DATA MODEL Design and migrate a PostgreSQL schema covering: organizations, users (with roles: admin/member/viewer via RBAC), facilities/sites, emission sources, activity data entries (fuel, electricity, travel, procurement, etc.), emission factors (versioned, sourced from EPA eGRID 2024, DEFRA 2024, IPCC AR6, USEEIO v2.0 — research and scrape/import current published factor tables into seed data), calculated emissions records (Scope 1/2/3, by category per GHG Protocol), reporting periods, audit logs, and file uploads/batch ingestion jobs. FEATURES TO IMPLEMENT Auth & RBAC: signup/login/session management; admin/member/viewer permission enforcement on all API routes. Data ingestion: CSV/XLSX batch upload (with row-count limits), manual entry forms, and field mapping UI; server-side validation, sanitization, and row-level error reporting. Emission factor engine: store versioned factor datasets (research current EPA eGRID 2024, DEFRA 2024, IPCC AR6 GWP values, USEEIO v2.0 — scrape/download official published tables and structure as seed JSON/CSV), apply correct factors by activity type, region, and reporting period. Scope 1 & 2 calculation engine: deterministic calculations from fuel/energy activity data using the factor tables above. Scope 3 AI estimation: use Gemini to classify procurement/spend line items into GHG Protocol Scope 3 categories (1–15) and apply USEEIO spend-based factors; include confidence scoring and human-review queue for low-confidence classifications. Anomaly detection: Gemini-based review of submitted activity data flagging outliers vs. historical/peer benchmarks. Reporting module: generate audit-ready reports mapped to SEC Climate Disclosure rules, CSRD (ESRS E1), GHG Protocol Corporate Standard, SASB, and TCFD frameworks — research each framework's current required disclosure fields/structure and build report templates accordingly; export as PDF and DOCX. Dashboard: org-level emissions overview by scope/category/facility/time period, trend charts, target tracking. Audit logging: immutable log of all data changes, calculations, and report generations, queryable by admins. RESEARCH REQUIREMENTS (perform live web research before/during build) Pull current EPA eGRID 2024 subregion emission factors, DEFRA 2024 conversion factors, IPCC AR6 GWP-100 values, and USEEIO v2.0 sector factors; structure into normalized seed datasets with source/version metadata. Pull current field-level requirements for SEC Climate Disclosure, CSRD/ESRS E1, GHG Protocol Corporate Standard, SASB (relevant sector standards), and TCFD recommendations; map each to internal data model fields for report generation. NON-FUNCTIONAL REQUIREMENTS No hardcoded org/user IDs anywhere — all queries org-scoped via authenticated session. All inputs validated/sanitized server-side. Environment-driven config only (DATABASE_URL, AUTH_SECRET, AUTH_URL, GEMINI_API_KEY). No dependency on any proprietary low-code platform SDKs — fully portable Node.js/React codebase. DELIVERABLE Complete, runnable codebase (frontend + Netlify Functions backend + DB migrations + seed data for emission factors + reporting templates), with setup instructions, ready to deploy to Netlify with a Neon Postgres database.