Bilingual environmental intelligence platform prototypeV21.3 Supabase EPA Cache Sync: Community Reports + EPA ECHO + EPA TRI data layers
V21.3 Supabase EPA Cache Sync Bilingual Environmental Intelligence Database

Community Signals + Public EPA Records

EcoSignal separates community incident reports, EPA ECHO compliance records, and EPA TRI toxic release inventory data into distinct intelligence layers for screening, research, and responsible referral.

What changed in V21.2?

V21.3 adds Supabase EPA cache sync on top of the live EPA display and cache layer: live ECHO results can be saved as structured cached records, reviewed in a cache table, exported for audit, and later synchronized into Supabase without confusing public regulatory records with community complaints.

Static bilingual demo with production-ready data model. Live EPA connection requires backend connector, scheduled jobs, caching, and source attribution.

Three-Layer Data Architecture

The commercial value comes from integrating multiple trusted data layers while keeping each source type clear and defensible.

Community Reports

Field Observations

Structured reports from residents, NGOs, or local organizations. Best for early signals, local awareness, and potential case leads.

EPA ECHO

Regulatory & Compliance Layer

Facility compliance, inspections, violations, and enforcement context from EPA public records.

EPA TRI

Toxic Release Layer

Facility-reported toxic chemical release and waste management data for long-term risk profiling.

Report an Environmental Incident

Submit observable facts. Do not speculate or accuse without evidence.

Latitude
Longitude
Enter an address or use your current location.
No files selected
For emergencies, chemical exposure, fire, injury, or immediate public safety concerns, contact 911 or local authorities immediately.
Report submitted successfully. Your report and photo links have been saved to the Community Reports database.

V21.1.1 Intake Principle

Community reports remain open and low-friction, while EPA records are imported separately through verified public data connectors.

Anonymous reporting remains available

Do not force registration at the reporting stage. Registration should be optional for tracking, following cases, and receiving alerts.

EPA data is not a complaint

ECHO/TRI records are public regulatory records. They should support context and risk screening, not be treated as direct allegations.

Integrated Intelligence Workspace

Environmental Intelligence Database

Filter community reports, ECHO regulatory records, and TRI toxic release records in one database while preserving source identity and evidence logic.

0Records Shown
0Community
0EPA ECHO
0EPA TRI
0Avg Trust
All records displayed

United States Integrated Environmental Layer

Color = source layer. Click a marker or row to open record detail.

CommunityECHOTRI
IDSourceTitle / FacilityLocationCategoryStatusEvidenceTrustKey DataLast Updated

Select a record

Click a marker or table row to inspect record source, evidence, trust score, and interpretation limits.

Evidence
Trust
Source
Status

Interpretation Limit

Community reports are signals; ECHO records are compliance context; TRI records are facility-reported release inventory data. Do not merge them into a single allegation.

EPA ECHO + TRI Connector Blueprint

V21.3 adds Supabase EPA cache sync on top of the live EPA display and cache layer on top of live EPA ECHO search so selected public records can be stored, reviewed, exported, and later synchronized into Supabase with clear source attribution.

V21.3 Supabase EPA Cache Sync

Search Nearby EPA Facilities

Enter an address, city, or ZIP code to screen for nearby EPA-regulated facilities and compliance context. This V21.3 module queries EPA ECHO through the EcoSignal Cloudflare Worker and displays live public compliance context.

Ready to search live EPA ECHO through the EcoSignal Cloudflare Worker. V21.3 can cache live EPA results in the browser and sync cached records into Supabase when the epa_cached_records table and RLS policies are configured.
Source discipline: EPA ECHO records are regulatory and compliance context. They should not be presented as new community complaints or acute pollution incidents.
EPA Cache Layer

Cached EPA Records

Save selected live EPA search results into a reviewable cache, then sync the cached records into Supabase.

FacilityLocationCompliance MetricsSourceCached At
Supabase Sync Layer

Sync Cached EPA Records to Supabase

V21.3 prepares real database ingestion. Create the epa_cached_records table first, then sync cached EPA records.

Required Supabase table

create table if not exists public.epa_cached_records ( id text primary key, facility_name text, registry_id text, program text, location text, violations text, inspections text, enforcement text, query text, radius text, source text, cached_at timestamptz, raw jsonb, created_at timestamptz default now() );

Temporary demo RLS policy

alter table public.epa_cached_records enable row level security; create policy "public read epa cache" on public.epa_cached_records for select using (true); create policy "public insert epa cache" on public.epa_cached_records for insert with check (true); create policy "public upsert epa cache" on public.epa_cached_records for update using (true);
For a real public website, do not leave public insert open permanently. Use Edge Functions or authenticated admin sync before production.

EPA ECHO

Use ECHO as a facility compliance and enforcement context layer. It should not be labeled as a new pollution incident.

/api/echo/facilities?state=CA&county=Los%20Angeles fields: registry_id, facility_name, program, inspections, violations, enforcement_actions

EPA TRI

Use TRI as an annual toxic release and waste management inventory layer. It supports risk screening and trend analysis.

/api/tri/releases?year=2024&chemical=Toluene fields: facility_id, chemical, release_year, air, water, land, waste_management
V21.1.1 EPA Data Connector Dashboard

EPA Data Connector Dashboard

A production-facing blueprint for importing EPA ECHO and EPA TRI data into EcoSignal through backend sync jobs, normalized database tables, and source-aware interpretation rules.

2EPA Sources
3Database Tables
1Unified View
7Field Groups
PostGISGeo Ready

Connector Status

V21.2 uses a Cloudflare Worker to query EPA ECHO live, then caches selected EPA records with source attribution before Supabase ingestion.

Ready for Backend

EPA ECHO Connector

Facility compliance, inspections, violations, and enforcement context. Recommended sync: daily or weekly depending on usage.

GET /api/connectors/echo/sync?state=CA&county=Los%20Angeles Target table: epa_echo_records Mode: scheduled import + cache
Demo Mode

EPA TRI Connector

Annual toxic release and waste-management data. Recommended sync: annual full refresh plus correction update checks.

GET /api/connectors/tri/import?year=2024 Target table: epa_tri_records Mode: CSV bulk import + validation
Planned Production Layer

Unified Intelligence View

Community reports, ECHO records, and TRI records remain separate tables, then appear together through a normalized geospatial intelligence view.

SELECT * FROM environmental_intelligence_view WHERE source_layer IN ('Community','EPA ECHO','EPA TRI');

Recommended Data Pipeline

This is the pipeline that keeps the platform credible, fast, and defensible.

1

Fetch

Call EPA API or download CSV files from authoritative sources.

2

Validate

Check required fields, coordinates, dates, and duplicate facility identifiers.

3

Normalize

Convert ECHO/TRI fields into EcoSignal's shared record model.

4

Store

Save raw source data and normalized records in PostgreSQL/PostGIS.

5

Display

Expose clean API endpoints to the website map, table, and detail pages.

Field Mapping

The key design rule: do not force ECHO, TRI, and community reports into the same meaning. Normalize them for search and mapping, but preserve interpretation limits.

EcoSignal FieldCommunity ReportsEPA ECHOEPA TRIPurpose
source_layerCommunity ReportEPA ECHOEPA TRIPrevents mixing complaints with regulatory records.
record_typeIncident SignalCompliance / Enforcement RecordToxic Release Inventory RecordClarifies what the record actually represents.
facility_idOptional / unknownEPA registry or facility identifierTRI facility identifierSupports facility-level aggregation.
categoryWater / Air / Dumping / SpillAir / Water / RCRA / SDWA complianceChemical release mediaAllows filtering without implying identical data type.
geomReporter-provided locationFacility coordinatesFacility coordinatesEnables map display and radius search.
interpretation_limitUnverified public signalRegulatory context, not a new incidentAnnual self-reported release inventoryReduces legal and scientific overstatement.

Suggested Database Schema

Use separate source tables and a unified read-only view. Keep raw imports for auditability.

community_reports epa_echo_records epa_tri_records source_import_logs VIEW environmental_intelligence_view AS SELECT normalized fields FROM each source table;

Website API Endpoints

The front-end should query your own API, not EPA directly.

GET /api/records?source=EPA%20ECHO&state=CA GET /api/records/radius?lat=34.05&lng=-118.24&meters=10000 GET /api/facilities/:facilityId/context POST /api/admin/sync/echo POST /api/admin/sync/tri

Example Sync Log

A production dashboard should show when each connector last ran, how many records were imported, and whether validation passed.

EPA ECHO
Last simulated sync: 2026-06-07 · 128 records staged · 0 critical errors
Passed
EPA TRI
Last simulated import: 2026-06-07 · 84 records staged · 3 records need coordinate review
Review
Professional warning: TRI releases are not the same as acute pollution incidents, and ECHO compliance records are not the same as community complaints. The platform must preserve these distinctions in every table, map layer, and public explanation.

How the Platform Works

The key is not collecting more noise. The key is separating, scoring, and interpreting environmental signals responsibly.

1. Collect

Accept public reports and import authoritative public datasets.

2. Normalize

Convert records into a shared schema: source, location, category, date, evidence, trust, and interpretation limits.

3. Score

Apply evidence quality and trust scoring differently for community reports, ECHO records, and TRI data.

4. Map

Display records on geographic layers without claiming every public record is an active incident.

5. Analyze

Identify hot zones, repeated patterns, facility context, and possible referral candidates.

6. Refer

Route high-quality signals to NGOs, attorneys, consultants, or researchers when appropriate.

About EcoSignal V21.2

EcoSignal is an independent bilingual environmental intelligence platform prototype. V21.2 demonstrates how public reporting, EPA compliance data, and toxic release inventory data can be fused into a disciplined environmental risk intelligence database.


The goal is not to replace regulators or emergency services. The goal is to organize public signals and records into reviewable, searchable, and responsibly interpreted environmental information.

Important Disclaimer

EcoSignal does not provide emergency response, legal representation, environmental remediation, or regulatory enforcement. EPA ECHO and TRI records are public data sources and must be interpreted with care. For emergencies, call 911 or local authorities.