A web application that allows users to report crimes in their local area using an interactive map.
├── backend/
│ ├── database/
│ │ ├── migrations.ts # Database schema setup
│ │ └── queries.ts # Database query functions
│ ├── routes/
│ │ ├── reports.ts # Crime report API endpoints
│ │ └── static.ts # Static file serving
│ └── index.ts # Main Hono server
├── frontend/
│ ├── components/
│ │ ├── App.tsx # Main React component
│ │ ├── CrimeMap.tsx # Interactive map component
│ │ └── ReportForm.tsx # Crime reporting form
│ ├── index.html # Main HTML template
│ ├── index.tsx # Frontend entry point
│ └── style.css # Custom styles
├── shared/
│ └── types.ts # Shared TypeScript types
└── README.md
GET /api/reports - Get all crime reports (with optional location filtering)POST /api/reports - Submit a new crime reportGET /api/reports/stats - Get crime statistics by type and areaid - Primary keycrime_type - Type of crime reporteddescription - Detailed descriptionlatitude - Location latitudelongitude - Location longitudeaddress - Human-readable addressreporter_name - Reporter name (optional for anonymous reports)reporter_contact - Contact information (optional)is_anonymous - Boolean flag for anonymous reportsstatus - Report status (pending, reviewed, resolved)created_at - Timestamp of report creationThe app automatically serves static files and provides a REST API for crime reports. The database is initialized on first run.