Skip to content

sinak/democracy.io

Repository files navigation

Democracy.io

React frontend and TypeScript backend for sending messages to members of the U.S. Senate and House of Representatives.

Repo Layout

  • frontend/: React + TypeScript + Vite application
  • backend/: TypeScript + Express API

The backend serves the built frontend from frontend/dist in production.

Prerequisites

  • Node.js 22.12.0 or newer
  • npm 11 or newer
  • A repo-root .env file with the backend environment variables you need

Install

npm install

Development

Run both apps together:

npm run dev

That 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:frontend

Build

npm run build

This builds:

  • frontend/dist
  • backend/dist

Production

npm run start

The backend serves the compiled frontend and API from the same process. It listens on PORT, which defaults to 3001.

About

democracy.io

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors