Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 8.64 KB

File metadata and controls

67 lines (47 loc) · 8.64 KB
{AED1A75A-2EFE-4A2A-9DBA-DBF890D07B98}

U.S. Prosecutor Database (Vue + Firebase)

Updated for Agentic AI: March 24th, 2026

Modernized stack for accountability-focused prosecutor data:

  • Frontend: Vue 3 + Vite
  • Data store: Firebase Firestore
  • Hosting: Netlify
  • Goal: source-backed prosecutor campaign + incarceration trend research

Quick Start

  1. Install dependencies:
    • npm install
  2. Create env file:
    • Copy .env.example to .env
    • Fill Firebase values from your Firebase project settings
  3. Start local app:
    • npm run dev
  4. Build production bundle:
    • npm run build
  5. Scrape:
  • node ./scripts/pilot-scraping/[state-abbreviation-here]-scraper.mjs
  1. Push local CSV up to Firestore (requires Firestore Rules adjustment):
    • node ./scripts/seedFirestoreFromCsv.mjs --csv ./public/data/[csv-filename-here].csv

Netlify Deployment

This repo includes netlify.toml with:

  • Build command: npm run build
  • Publish directory: dist
  • SPA fallback redirect to index.html

In Netlify, set environment variables for all VITE_FIREBASE_* keys.

Data

  • Firestore collection: prosecutors
  • Local fallback seed: src/data/fallbackProsecutors.js
  • Optional export script:
    • npm run seed:local writes data/prosecutors.seed.json

Evidence and Safety Standard (AI written)

Records should avoid unverified accusations. Instead, track:

  • what was said (campaign statements),
  • what happened (charging/incarceration indicators),
  • where the evidence came from (URL + retrieval date + quote).

See DOCS.md for schema and AI-agent scraping workflow.

Contributors

Interested in contributing to the web app? You'll find dev notes in the DOCS.md.

License

The USPD is an open-source community project built to house data about current and previous US Prosecutors (est 2017). It is licensed under GNU GPLv3. This means you are able to use, modify, & distribute USPD as long as the following conditions are met:

  • Acknowledge the original source (this repository & its contributors)
  • Apply the same license & copyright usage
  • Make public any changes, updates, or improvements upon USPD