start_portal.command → Browser opens automatically → Navigate to http://localhost:8000
Detox My Plant™ is a full-stack enterprise web platform powered by a lightweight Python REST server (server.py) and a persistent JSON database (data/portal_data.json). The single-page application (SPA) loads five JavaScript modules that handle formulas, charts, statutory report generation, AI chatbot, and the main application controller.
Double-click start_portal.command in the project root directory. It automatically frees port 8000, starts the server daemon, and opens your default web browser.
Then open: http://localhost:8000
static/index.html via file:// protocol. Modern browser security policies (CORS) block file:// JavaScript from calling local REST endpoints (/api/data). Always access via http://localhost:8000.
The persistent top header bar provides plant identity, emergency contacts, and one-click access to all 13 statutory compliance modules. It is always visible across every page of the portal.
| Icon & Module Name | Internal Tab ID | Primary Function |
|---|---|---|
| 📊 Dashboard | dashboard | Executive KPIs, risk charts, storage aging, Pareto root cause, statutory funnel. |
| 🧪 Inward Materials | inventory | Raw material inward register, purchase invoices, chemical hazard classification. |
| 📦 Department Storage | storage | Departmental storage records, consumption logs, 90-day aging countdown. |
| 🗑️ Waste Register | waste | Hazardous waste generation lots, Schedule I/II codes, disposal state. |
| 🚛 Recycling & Disposal | recycling | Rule 19 manifest dispatch tracking, vehicle numbers, destruction certificates. |
| 🏢 Authorized Vendors | vendors | SPCB/CPCB authorized recycler directory, consent validity monitoring. |
| 🎓 Safety Trainings | trainings | Workforce chemical safety drills, induction records, mock spill logs. |
| 📈 Department Summary | dept-summary | Departmental cross-tabulation of exposure, stock, and waste output. |
| ⚖️ Legal Standards | sources | Statutory compendium of Indian environmental rules, limits, and mandates. |
| 📋 Pollution Limits (CTO) | cto-compliance | SPCB Consent to Operate quota monitoring, consumption %, over-limit alerts. |
| ♻️ EPR Return Filing | epr-filing | CPCB EPR return filing hub, target ledger, document readiness pack. |
| 📄 Compliance Reports | reports | Statutory Forms hub (Forms 1–11) + EPR Dossier + CSV export hub. |
| ⚙️ Admin Console | admin | User management, audit trail log, database backup and restoration. |
The Dashboard delivers high-level visibility across toxic inventory, storage compliance, and disposal verification. It is the default landing page on portal startup.
MAT-XXXX).An algorithmically computed health score (0–100%) evaluating four weighted compliance pillars:
| # | Chart Name | Type | What It Shows |
|---|---|---|---|
| 1 | Material Risk Profile Breakdown | Doughnut | Chemical inventory by hazard level: High (Red), Medium (Amber), Low (Green), Unknown. |
| 2 | Materials vs Waste by Department | Grouped Bar | Inbound material volume vs waste generation per operational department. |
| 3 | Waste Generation Root Cause Pareto | Bar + Line | Primary waste drivers: Spent, Expired, Off-Spec, Spillage, Obsolete. |
| 4 | Storage Duration Aging Heatmap | Stacked Bar | 🟢 0–30 Days | 🟡 31–60 Days | 🟠 61–90 Days | 🔴 >90 Days (Violation). |
| 5 | Departmental Waste MT Volume | Bar | Metric Tonne waste breakdown per plant department. |
| 6 | Statutory Traceability & Closure Funnel | Funnel | 5-stage: Material Inward → Storage → Waste Generation → Dispatch → Certificate of Destruction. |
Every register features automated ID generation, relational cross-linking, search and filtering, and full audit logging. Records flow through four linked stages:
| Field Name | Type | Req? | Description / Allowed Values |
|---|---|---|---|
| Material ID | String | Auto | System-assigned primary key (MAT-XXXX). |
| Material Name | Text | Yes | Commercial chemical/material name (e.g., Industrial Hydraulic Oil ISO VG 68). |
| Material Type | Select | Yes | Raw Material, Lubricant, Solvent, Coating, Battery, Electronic, Other |
| Purchased for Department | Select | Yes | Machining, Assembly, Heat Treatment, Maintenance, etc. |
| Manufacturer / OEM | Text | Yes | Supplier name (e.g., Shell India, BASF, Pidilite, Exide). |
| Purchase Invoice Number | Text | Yes | Supplier invoice/PO reference (e.g., INV-2026/0891). |
| Quantity Purchased | Number | Yes | Total quantity procured. |
| Unit | Select | Yes | KG, Litre, ML, MT, Units, Nos. |
| Purchase Date | Date | Yes | Date received at plant gate (YYYY-MM-DD). |
| Expiry Date | Date | No | Manufacturer shelf-life expiration date. |
| Hazard Risk Level | Select | Yes | High (Red), Medium (Amber), Low (Green), Unknown |
| Can Become Waste? | Select | Yes | Yes or No flag. |
| Waste Reason | Select | No | Spent, Expired, Off-Spec, Spillage, Contaminated, Maintenance |
| Safety Data Sheet (SDS) | Select | Yes | Available or Pending / Not Available |
| Notes / Storage Specs | Text | No | Special containment conditions (e.g., Store in flame-proof cabinet below 25°C). |
MAT-0011).| Field Name | Type | Req? | Description / Allowed Values |
|---|---|---|---|
| Storage Record ID | String | Auto | Primary key (STG-XXXX). |
| Linked Material ID | Select | Yes | Dropdown of existing MAT-XXXX. Auto-populates name and unit. |
| Issued to Department | Select | Yes | Recipient store (e.g., Assembly Line 1, Paint Shop Chemical Store). |
| Date of Issue | Date | Yes | Date handed over to shop-floor. Used to calculate Storage Age. |
| Quantity Issued | Number | Yes | Initial quantity transferred from central store. |
| Quantity Utilised | Number | Yes | Consumed in manufacturing operations. |
| Quantity Waste Transferred | Number | No | Quantity transferred into hazardous waste register. |
| Storage Location / Room | Text | Yes | Specific rack/room (e.g., Flammable Store Room B, Shelf 4). |
| Linked Waste Lot ID | Text | Auto | Auto-populated when waste lot is generated (WST-XXXX). |
| Field Name | Type | Req? | Description / Allowed Values |
|---|---|---|---|
| Waste Lot ID | String | Auto | Unique lot number (WST-XXXX). |
| Source Storage Record | Select | No | Linked STG-XXXX record from which waste originated. |
| Material Name / Stream | Text | Yes | Waste description (e.g., Spent Degreasing Solvent, Used Lubricant Oil). |
| Waste Quantity | Number | Yes | Quantity generated in primary unit. |
| Primary Unit | Select | Yes | KG, Litre, ML, Units |
| Reporting Quantity (MT) | Number | Auto | Standardized Metric Tonnes (auto-calculated: KG÷1000, Litre÷1000, ML÷1,000,000). |
| Generation Date | Date | Yes | Date waste was generated and containerized. |
| Statutory Waste Code | Select | Yes | Official CPCB Schedule code (e.g., Schedule I, Cat 5.1 — Used/Spent Oil). |
| Generation Reason | Select | Yes | Spent / Used, Expired Shelf-Life, Off-Specification, Contaminated / Leakage |
| Storage Location On-Site | Text | Yes | Dedicated hazardous waste shed (e.g., HazWaste Shed Bay 2). |
| Stored Since Date | Date | Yes | Start date of secondary containment accumulation. |
| Disposal Status | Select | Yes | No (Pending On-Site) or Yes (Dispatched Off-Site) |
| Disposal Mode | Select | No | Recycling, TSDF Landfill, Co-Processing in Cement Kiln, Incineration |
| Authorized Vendor | Select | No | Linked VND-XXXX authorized recycler/TSDF. |
| Certificate Reference | Text | No | Manifest / Certificate of Destruction number. |
| Field Name | Type | Req? | Description / Allowed Values |
|---|---|---|---|
| Recycling Record ID | String | Auto | Primary key (REC-XXXX). |
| Linked Waste Lot ID | Select | Yes | Select undisposed WST-XXXX lot. Auto-fills stream and quantity. |
| Authorized Recycler | Select | Yes | Destination VND-XXXX vendor with valid SPCB authorization. |
| Handover / Dispatch Date | Date | Yes | Gate exit date (weighbridge verified). |
| Quantity Handed Over | Number | Yes | Verified weighbridge quantity dispatched. |
| Transport Vehicle No | Text | Yes | GPS-tracked hazardous goods vehicle (e.g., MH-14-GH-4921). |
| Form 10 Manifest Number | Text | Yes | Statutory 7-copy manifest number (e.g., MF-HOWM-2026-0001). |
| Certificate Received? | Select | Yes | Yes (Destruction certificate received) or Pending |
| Certificate Reference | Text | No | Official recycler destruction / recycling certificate number. |
WST-XXXX lot. Material name, quantity, and unit are automatically locked.Disposed: Yes, reconciling both the storage register and Form 4 annual return.The Pollution Limits (CTO) module tracks plant hazardous waste generation against the legally permitted caps granted by the State Pollution Control Board (MPCB/SPCB) in the Consent to Operate (CTO).
| Data Point | Description | Threshold / Rule |
|---|---|---|
| Sanctioned Limits | Consented limits per Schedule I category (e.g., Cat 5.1 Used Oil: 0.800 MT/Year). | Set during CTO grant. |
| Actual Generation | Aggregated real-time from all logged waste transactions in MT. | Auto-calculated. |
| Consumption Gauge | Utilisation % = (Actual MT ÷ Permitted MT) × 100 | Real-time formula. |
| COMPLIANT | Below 80% quota consumption. | < 80% |
| APPROACHING LIMIT | Between 80% and 100% of permitted ceiling. | 80–100% |
| CTO EXCEEDED | Exceeds 100% permitted ceiling — active statutory violation. | > 100% |
Click "Dispatch Alerts" to send instant notifications regarding quota breaches or over-storage warnings via Email and SMS to plant managers, EHS officers, and legal counsel.
The EPR Return Filing center manages Extended Producer Responsibility (EPR) compliance across E-Waste, Battery Waste, and Plastic Packaging in accordance with the centralized CPCB portal framework under E-Waste Rules 2022, Battery Waste Management Rules 2022, and Plastic Waste Management Rules 2022.
Monitors the 8 mandatory statutory audit documents required for EPR compliance filing:
Ready → In Progress → Pending CA Audit → Ready. The Document Readiness Score updates dynamically and persists to the database automatically.
TXN-CPCB-910243).Detox My Plant includes a built-in statutory reports engine generating official government forms with print-ready styling (window.print) and universal CSV exports.
| Form | Rule Mandate | Description & Format |
|---|---|---|
| Form 1 | Rule 6(1) | Application for obtaining SPCB authorization for collection, reception, treatment, transport, storage, or disposal of hazardous waste. |
| Form 2 | Rule 6(2) | Official Grant of Authorization issued by the State Pollution Control Board. |
| Form 3 | Rule 6(5) | Daily records of hazardous waste generated and stored on-site. Reconciled against Form 4 to 0.0000 MT mathematical variance. |
| Form 4 | Rule 20(2) | Mandatory Annual Return submitted to SPCB by 30th June — metric tonnes, disposal facilities, mass balance. |
| Form 8 | Rule 17 | Fluorescent yellow hazardous waste container label: sender details, hazard class, physical state, UN code. |
| Form 9 | Rule 18 | Transport Emergency (TREMCARD) for truck drivers: PPE, spill handling, first aid, and fire containment guidelines. |
| Form 10 | Rule 19 | Statutory 7-Copy Movement Manifest color-coded for Sender, Transporter, Receiver (TSDF), and SPCB sender/receiver copies. |
| Form 11 | Rule 22 | Incident investigation and accident report submitted to SPCB within 24 hours of any spillage / fire event. |
| EPR Dossier | E-WMR/BWMR 2022 | Centralized CPCB Annual Return Dossier with category target ledger, credit certificates, and CA audit trail. |
| 90-Day Audit | Rule 8 | High-priority audit dossier listing materials nearing expiration and stored waste nearing the 90-day statutory threshold. |
The platform operates a real-time formula engine (formulas.js / DetoxFormulas) mirroring the exact business logic of the validated Excel reference. All calculations execute client-side in milliseconds on every data change.
This reconciliation engine verifies that the sum of daily generation logs in Form 3 exactly equals the total waste lot quantity in Form 4. The portal flags any non-zero variance as a statutory discrepancy.
| Register | ID Format | Example |
|---|---|---|
| Inward Materials | MAT-XXXX | MAT-0001, MAT-0011 |
| Department Storage | STG-XXXX | STG-0001, STG-0015 |
| Waste Register | WST-XXXX | WST-0001, WST-0009 |
| Recycling Manifest | REC-XXXX | REC-0001, REC-0008 |
| Authorized Vendors | VND-XXXX | VND-0001, VND-0005 |
| Safety Trainings | TRN-XXXX | TRN-0001, TRN-0004 |
| EPR Categories | EPR-CAT-* | EPR-CAT-ITEW, EPR-CAT-BAT |
| EPR Credit Certificates | CPCB-CR-* | CPCB-CR-ITEW-001 |
admin@prosareco.com). Unauthorized access attempts are logged in the immutable audit trail.
Every data modification is timestamped with user identification in the system audit log (retaining the last 100 entries). Captured events include:
| Action | Endpoint | What Happens |
|---|---|---|
| Download Full JSON Backup | GET /api/export | Click "Download Backup" to save a snapshot of all 15 relational sheets as a JSON file. |
| Restore from Backup | POST /api/import | Upload an existing JSON backup to restore plant state — all current data is replaced. |
| Reset to Master Baseline | POST /api/reset | Restores the initial validated baseline dataset from Workplace_Detox_Fixed_Ultimate.xlsx. |
The floating chatbot widget at the bottom right of the portal provides instant, round-the-clock guidance on:
India's Only Integrated Toxic Waste Compliance & Management Company