React frontend and TypeScript backend for sending messages to members of the U.S. Senate and House of Representatives.
frontend/: React + TypeScript + Vite applicationbackend/: TypeScript + Express API
The backend serves the built frontend from frontend/dist in production.
- Node.js
22.12.0or newer - npm
11or newer - A repo-root
.envfile with the backend environment variables you need
npm installRun both apps together:
npm run devThat starts:
- the backend on
http://localhost:3001 - the Vite frontend on
http://localhost:3000
You can also run them separately:
npm run dev:backend
npm run dev:frontendnpm run buildThis builds:
frontend/distbackend/dist
Set VITE_CLARITY_PROJECT_ID at frontend build time to enable Microsoft Clarity session diagnostics in the Vite frontend. Leave it unset to disable Clarity.
npm run startThe backend serves the compiled frontend and API from the same process. It listens on PORT, which defaults to 3001.