CEQA.ai Platform

Hybrid static and streaming experience for CEQA and NEPA practitioners. The site pairs an Eleventy-rendered marketing surface with a TypeScript content pipeline, Express SSE endpoints, and progressive enhancement for live news and publication feeds.

Architecture

Features

Directory Overview

.
├── .eleventy.js              # Eleventy build configuration
├── components/               # TypeScript sources for browser modules
├── build/                    # Generated by TypeScript compiler (gitignored)
├── lib/                      # Shared TypeScript content model + fetchers
├── public/                   # Client assets (terminal styles, scripts)
├── server/                   # Express server (SSE endpoints + static hosting)
├── news.njk / publications.njk / library.njk
├── news/tag.11ty.js          # Server-rendered tag pages
├── publications/tag.11ty.js  # Server-rendered tag pages
├── components/TerminalFeed.ts → public/components/TerminalFeed.js
└── tests/                    # Node test definitions

Environment Variables

Copy .env.example to .env and define the variables you need. Only one is required for the live fan-out:

CROSSREF_MAILTO=contact@ceqa.ai

This value is forwarded to Crossref as part of the User-Agent per their API policy. No secrets are exposed to the client.

Data Sources

The default fan-out pulls from:

Add or tune sources via lib/sources/ and capture source-specific transforms inside lib/content/normalize.ts.

API Endpoints

Endpoint Description Parameters
/api/news Streams curated news, policy, and case updates via Server-Sent Events (SSE) query, since, tags, type, source
/api/pubs Streams ranked publications via SSE query, since, tags, type, source

Each endpoint:

Accessibility & SEO

Commands

Command Purpose
npm run dev Watch TypeScript + Eleventy rebuilds and run Express on http://localhost:3000
npm run build Compile TypeScript (server + components) and build Eleventy
npm start Serve the compiled site + SSE endpoints (after npm run build)
npm test Compile server TypeScript and run Node tests
npm run build:components Compile browser modules (TerminalFeed)
npm run build:ts Compile Node/Express TypeScript

The Express server (server/index.ts) powers both /api/news and /api/pubs. npm run dev already starts it via Nodemon. For production, run npm run build followed by npm start.

Production Deployment (Node)

Tests & Smoke Checks

Maintenance Notes