A comprehensive safety monitoring platform for Indonesia that tracks protests, hoaxes, road closures, and safety incidents in real-time.
- 🗺️ Interactive Map: Real-time map showing civil unrests across Indonesia
- 🤖 AI Chat Assistant: Ask questions about current safety situations
- 📰 News Monitoring: Automatically processes news articles and social media
- 🚧 Road Closures: Track and report road closure incidents
- 🔍 Hoax Detection: Monitor and search fact-checked hoax information
- 📱 Mobile-First: Optimized for mobile devices
- Frontend: Next.js 15, React 19, TypeScript, TailwindCSS
- Backend: Next.js API Routes
- Database: Neon PostgreSQL with Prisma ORM
- Cache: Upstash Redis
- AI: OpenRouter (GPT models)
- Maps: Mapbox GL JS
- Real-time: Server-Sent Events
git clone <repository-url>
cd jktsafe
npm installCheck env-template.txt
npx prisma generate
npx prisma migrate devnpm run devVisit http://localhost:3000
- Events: Protest incidents, demonstrations, civil unrest
- Hoaxes: Fact-checked misinformation tracking
- Road Closures: Traffic and infrastructure incidents
- Warning Markers: Social media-based safety alerts
- Location Extraction: AI identifies locations from text and images
- Content Analysis: Processes Indonesian news and social media
- Smart Geocoding: Converts location names to coordinates with caching
- Duplicate Prevention: Geocoding cache prevents same location processing twice
- Vector Search: Semantic search for hoax content
- Interactive Map: Real-time incident visualization
- Chat Assistant: Natural language queries about safety
- Mobile Responsive: Optimized for mobile devices
- Admin Tools: Content management
GET /api/events- Fetch safety incidentsPOST /api/events- Report new incidentGET /api/chat- AI chat interfaceGET /api/hoax/search- Search hoax databaseGET /api/road-closures- Road closure dataGET /api/events/stream- Real-time updates
- Connect repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy with default Next.js settings
- iOS Safari Fix: Input fields use 16px font to prevent zoom
- Touch-Friendly: Large tap targets and gestures
- Responsive Design: Adapts to all screen sizes
- Offline Support: Cached data for basic functionality
- Rate Limiting: API endpoints protected
- Input Validation: All user inputs sanitized
- Secure Storage: API keys in environment variables
- CORS Configuration: Proper cross-origin setup
- Smart Caching:
- Redis for frequently accessed data
- Geocoding cache prevents duplicate API calls
- 30-day cache validity with usage tracking
- Database Indexing: Optimized queries with proper indexes
- Image Optimization: Next.js automatic optimization
- CDN: Vercel Edge Network
- Rate Limiting: API call throttling to prevent overuse
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details.
Safe Indonesia - Keeping communities informed and safe through real-time monitoring and AI-powered insights.
