No description
Find a file
Deco Vander 5e56d59bbd Add map/table toggle view for current reports
 New Features:
- Toggle between map and table view for current reports
- Table view shows location, details, reported time, and time remaining
- Color-coded time remaining: urgent (red), warning (orange), normal (green)
- Responsive design with mobile-optimized table layout
- Real-time updates work in both map and table views
- Sorted by most recent reports first

🎨 UI Improvements:
- Professional toggle buttons with active state
- Clean table design with hover effects
- Accessibility-friendly with proper titles and tooltips
- Mobile-responsive layout adjustments

🚀 Better UX:
- Easy switching between visual map and detailed table
- Time remaining countdown helps prioritize urgent reports
- Searchable and scannable table format for quick review
- Maintains all existing functionality while adding new view
2025-07-03 01:07:17 -04:00
.github/workflows Fix S3 upload: remove ACL parameters for bucket without ACL support 2025-07-03 00:11:08 -04:00
public Add map/table toggle view for current reports 2025-07-03 01:07:17 -04:00
scripts Fix rate limiting block syntax for caddy-ratelimit plugin 2025-07-03 01:00:07 -04:00
.env.example Initial commit: ICE Watch Michigan community safety tool 2025-07-02 23:27:22 -04:00
.gitignore Initial commit: ICE Watch Michigan community safety tool 2025-07-02 23:27:22 -04:00
package-lock.json Initial commit: ICE Watch Michigan community safety tool 2025-07-02 23:27:22 -04:00
package.json Initial commit: ICE Watch Michigan community safety tool 2025-07-02 23:27:22 -04:00
README.md Update clone URLs to use SSH and correct repository name 2025-07-03 00:24:01 -04:00
s3-bucket-policy.json Fix S3 bucket name and create deployment bucket 2025-07-03 00:02:52 -04:00
server.js Initial commit: ICE Watch Michigan community safety tool 2025-07-02 23:27:22 -04:00

ICE Watch Michigan

A community-driven web application for tracking ICE activity locations in Michigan. Reports automatically expire after 24 hours to maintain current information.

Features

  • 🗺️ Interactive Map - Real-time location tracking centered on Grand Rapids
  • Fast Geocoding - Lightning-fast address lookup with MapBox API
  • 🔄 Auto-Expiration - Reports automatically removed after 24 hours
  • 👨‍💼 Admin Panel - Manage and moderate location reports
  • 📱 Responsive Design - Works on desktop and mobile devices
  • 🔒 Privacy-Focused - No user tracking, community safety oriented

Quick Start

Prerequisites

  • Node.js 18+
  • MapBox API token (free tier available)

Local Development

  1. Clone the repository:

    git clone git@github.com:deco/ice.git
    cd icewatch
    
  2. Install dependencies:

    npm install
    
  3. Configure environment variables:

    cp .env.example .env
    # Edit .env with your MapBox token
    
  4. Start the server:

    npm start
    
  5. Visit the application:

    http://localhost:3000
    

Environment Variables

# Required for fast geocoding
MAPBOX_ACCESS_TOKEN=pk.your_mapbox_token_here

# Admin panel access
ADMIN_PASSWORD=your_secure_password

# Server configuration
PORT=3000

Deployment

Automated Deployment (Debian 12 ARM64)

  1. Run the deployment script on your server:

    curl -sSL https://ice-puremichigan-lol.s3.amazonaws.com/scripts/deploy.sh | bash
    
  2. Deploy your application:

    git clone git@github.com:deco/ice.git /opt/icewatch
    cd /opt/icewatch
    npm install
    
  3. Configure environment:

    cp .env.example .env
    nano .env  # Add your API keys
    
  4. Start services:

    sudo systemctl enable icewatch
    sudo systemctl start icewatch
    sudo systemctl enable caddy
    sudo systemctl start caddy
    

Manual Deployment

See docs/deployment.md for detailed manual deployment instructions.

API Endpoints

  • GET /api/locations - Get active location reports
  • POST /api/locations - Submit new location report
  • GET /api/config - Get API configuration
  • GET /admin - Admin panel (password protected)

Technology Stack

  • Backend: Node.js, Express.js, SQLite
  • Frontend: Vanilla JavaScript, Leaflet.js
  • Geocoding: MapBox API (with Nominatim fallback)
  • Reverse Proxy: Caddy (automatic HTTPS)
  • Database: SQLite (lightweight, serverless)

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Security

  • API keys are stored in environment variables
  • Admin routes are password protected
  • Database queries use parameterized statements
  • HTTPS enforced in production

License

MIT License - see LICENSE file for details

Support

This is a community safety tool. For issues or questions:

  • Create a GitHub issue
  • Check existing documentation
  • Review security guidelines

⚠️ Safety Notice: This tool is for community awareness. Always prioritize personal safety and know your rights.