A full-stack web application for managing railroad crossing inventory data, built for Metra commuter rail operations. Features interactive maps, FRA GCIS API integration, field data collection, and comprehensive reporting.
- Dashboard - Overview of crossing inventory with key metrics and charts
- Crossing Management - Full CRUD for railroad crossing records with detailed views
- Interactive Map - Mapbox GL-powered map with crossing markers, filtering, and popups
- FRA Data Integration - Query the FRA GCIS (Grade Crossing Inventory System) API to look up and import crossing data
- Field Collection - Mobile-friendly interface for on-site data collection
- Reports - Generate reports on crossing conditions, warning devices, and compliance
- Admin Panel - User management and application settings
- Drag & Drop - Sortable interfaces powered by dnd-kit
- Framework: React Router v7 (SSR)
- Database: Neon (serverless Postgres) + Drizzle ORM
- Maps: Mapbox GL JS
- Charts: Recharts
- UI Components: Radix UI + Tailwind CSS v4 + shadcn/ui
- Tables: TanStack Table
- External API: FRA GCIS Public API
- Validation: Zod
- Node.js 20+
- A Neon database (or any Postgres)
- A Mapbox access token
- An FRA API token
npm installCreate a .env file:
DATABASE_URL=postgresql://user:password@host/database
VITE_MAPBOX_TOKEN=your_mapbox_access_token
VITE_FRA_API_TOKEN=your_fra_api_tokenPush the schema to your database:
npx drizzle-kit pushnpm run devOpen http://localhost:5173.
npm run build
npm startapp/
routes/
_index.tsx # Dashboard
crossings/ # Crossing CRUD routes
map.tsx # Interactive map view
fra.tsx # FRA GCIS API browser
field-collection.tsx# Field data collection
reports.tsx # Reporting
sync.tsx # Data sync
admin/ # Admin settings & users
components/
crossingMap.tsx # Mapbox map component
app-sidebar.tsx # Navigation sidebar
ui/ # shadcn/ui components
lib/
db.ts # Database connection
MIT