- Gather requirements and clarify project scope
- Write architecture documentation in ./docs
- Update README.md with project overview and setup instructions
- Document environment variables in docs/ENV_VARIABLES.md
- Create monorepo structure with pnpm workspaces
- Set up Next.js 16.1.1 app with TypeScript and Tailwind CSS
- Configure Vitest for testing
- Create Dockerfile with FFmpeg and ImageMagick for Railway deployment
- Create .env.example file from docs/ENV_VARIABLES.md template
- Set up Supabase schema - posts table with PostGIS for geolocation
- Set up Supabase schema - media table for post attachments
- Set up Supabase schema - comments table for post comments
- Set up Supabase schema - anonymous_users table for fingerprint to ID mapping
- Set up Supabase schema - votes table for upvotes/downvotes
- Set up Supabase schema - favorites table for saved posts
- Set up Supabase schema - reports table for flagged posts
- Set up Supabase schema - subscriptions table for area notifications
- Set up Supabase schema - rate_limits table for spam prevention
- Create Supabase storage bucket configuration
- Set up 8-hour auto-deletion cron job using pg_cron
- Build fingerprint generation utility for anonymous user identification
- Build server-side API route for creating posts with rate limiting
- Build server-side API route for fetching posts by bounding box
- Build server-side API route for media upload with FFmpeg/ImageMagick processing
- Build server-side API route for area subscription management
- Build server-side API route for getting single post with media and comments
- Build server-side API route for adding comments to posts
- Build server-side API route for voting on posts
- Build server-side API route for favoriting posts
- Build server-side API route for getting user favorites
- Build server-side API route for reporting posts with email to admin
- Build server-side API route for getting current user anonymous ID
- Create map component with Leaflet and OpenStreetMap
- Implement marker clustering for map
- Create Find My Location button with geolocation API
- Build post creation form with incident type dropdown
- Build post detail page with media gallery and comments
- Build vote buttons component for upvote/downvote
- Build favorite button component
- Build report post button and modal
- Build comments section component with add comment form
- Build favorites page to display saved posts
- Create area subscription UI component
- Implement PWA manifest with icons and theme
- Implement service worker for offline support
- Implement push notification subscription for area alerts
- Write unit tests for API routes
- Write component tests for React components
See docs/ARCHITECTURE.md for full details.
- Frontend: Next.js 16.1.1, React, TypeScript, Tailwind CSS
- Maps: Leaflet + OpenStreetMap + react-leaflet
- Backend: Next.js API Routes (server-side only)
- Database: Supabase PostgreSQL with PostGIS
- Storage: Supabase Storage
- Media Processing: FFmpeg + ImageMagick (in Docker)
- Testing: Vitest
- Deployment: Railway with Docker
- 🗺️ Interactive map with marker clustering
- 📍 Find My Location geolocation
- 📸 Media upload with auto-conversion to JPEG/MP4
- 💬 Anonymous comments with random user IDs
- 👍 Upvote/downvote posts
- ⭐ Favorite posts with dedicated favorites page
- 🚩 Report posts (emails admin@icemap.app)
- 🔔 Push notifications for area alerts
- 🕐 Auto-expiring posts (7 days)
- 🚫 No authentication - completely anonymous
- 📱 PWA - installable, works offline
- 🛡️ Rate limiting - 1 post per hour per user fingerprint
- posts - Incident reports with geolocation
- media - Images/videos attached to posts
- comments - User comments on posts
- anonymous_users - Maps fingerprints to random IDs
- votes - Upvotes/downvotes on posts
- favorites - User saved posts
- reports - Flagged posts for admin review
- subscriptions - Area notification subscriptions
- rate_limits - Spam prevention tracking
| Route | Method | Description |
|---|---|---|
/api/posts |
GET | Fetch posts within bounding box |
/api/posts |
POST | Create new post with rate limiting |
/api/posts/[id] |
GET | Get single post with media, comments, votes |
/api/posts/[id]/comments |
GET | Get comments for a post |
/api/posts/[id]/comments |
POST | Add comment to a post |
/api/posts/[id]/vote |
POST | Upvote or downvote a post |
/api/posts/[id]/favorite |
POST | Add post to favorites |
/api/posts/[id]/favorite |
DELETE | Remove post from favorites |
/api/posts/[id]/report |
POST | Report a post - sends email to admin |
/api/favorites |
GET | Get user favorites list |
/api/media/upload |
POST | Upload and process media |
/api/subscriptions |
POST | Subscribe to area notifications |
/api/subscriptions |
DELETE | Unsubscribe from notifications |
/api/me |
GET | Get current user anonymous ID |