MakeTheyArrive
AI-Powered Crowd Intelligence Platform — Know Before You Leave Home.
Inspiration
Every day, millions of people in India leave home to visit hospitals, banks, passport offices, Aadhaar centres, RTOs, government courts, diagnostic labs, and universities with no idea how crowded those places actually are.
The problem isn't the waiting itself. It's the uncertainty.
You leave at 9 AM hoping to finish by 11. You arrive to find a two-hour queue. You come back tomorrow and the same thing happens. There is no way to know in advance.
Navigation apps like Google Maps solve travel time. Nothing solves service waiting time.
Appointment systems show booking slots. Token systems show queue numbers. Neither answers the question that actually matters:
Should I leave now?
That single question became MakeTheyArrive — a platform that predicts waiting times and recommends the best departure time before you leave home, using AI, crowd intelligence, and real-time data.
What It Does
MakeTheyArrive is a full-stack, cloud-native AI crowd intelligence platform built as a Progressive Web App (PWA).
Users can search across hospitals, banks, passport offices, RTOs, government courts, post offices, diagnostic labs, Aadhaar centres, and universities across Delhi — and get intelligent predictions before they travel.
Core Features
- AI-Powered Waiting Time Prediction — Predicts crowd levels and estimated wait time for the next 24 hours using historical patterns, peak hour data, and community reports.
- Best Departure Time Recommendations — Tells users the optimal time to leave home to minimize waiting.
- Live Crowd Status — Real-time crowd level indicators (Low / Moderate / Busy / Extreme) with capacity percentages.
- Confidence Scores — Every prediction comes with a confidence rating so users know how reliable the estimate is.
- Interactive Crowd Map — Location-based venue discovery powered by Mapbox GL JS.
- Community Crowd Reports — Users submit real-time observations that feed the prediction engine.
- User Favorites & Saved Venues — Save frequently visited locations for quick access.
- Personalized Alerts — Notifications when crowd levels change at saved venues.
- Historical Congestion Trends — Charts showing crowd patterns across hours and days.
- PWA-Ready — Installable on mobile, works offline, no app store required.
Architecture

System Overview
User / Browser
↓
Next.js 16 (App Router) — deployed on Vercel
↓
API Routes (/api/*)
↓
lib/db.ts — IAM Pool (pg + @aws-sdk/rds-signer + @vercel/functions/oidc)
↓
Amazon Aurora PostgreSQL (IAM auth, SSL, PGSSLMODE=require)
↓
7 normalized tables — venues, crowd_readings, ai_predictions,
peak_hours, community_reports, user_ratings, user_favorites
Frontend — Vercel / Next.js
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) |
| UI | React 19.2 · Tailwind CSS · shadcn/ui · Framer Motion |
| Map | Mapbox GL JS |
| State | React hooks · Server Actions |
| PWA | next-pwa · Web App Manifest |
| Analytics | @vercel/analytics |
Backend — Serverless API
| Layer | Technology |
|---|---|
| API | Next.js Route Handlers (REST) |
| ORM | Drizzle ORM |
| Auth | Custom JWT (jose) · bcryptjs |
| AI | Vercel AI SDK · prediction engine |
| DB Client | node-postgres (pg) Pool |
Infrastructure — AWS
| Service | Role |
|---|---|
| Amazon Aurora PostgreSQL | Primary database (7 tables, 12+ indexes) |
| AWS IAM | |
| @aws-sdk/rds-signer | IAM token generation for DB connection |
| @vercel/functions/oidc | awsCredentialsProvider for secure role assumption |
| AWS_ROLE_ARN | IAM role with rds-db:connect permission |
Database Schema
venues — All service centers (hospitals, banks, RTOs, courts...)
crowd_readings — Real-time crowd observations (level, wait, capacity %)
ai_predictions — 24-hour ahead forecasts with confidence scores
peak_hours — Historical peak hour patterns by day and hour
community_reports — User-submitted crowd updates
user_ratings — Star ratings and reviews (1-5)
user_favorites — Saved venues per user
API Endpoints
GET /api/venues Search venues with filters
GET /api/venues/[id] Venue details + crowd data
GET /api/venues/[id]/crowd Live crowd level and trends
POST /api/venues/[id]/crowd Submit a crowd reading
GET /api/venues/[id]/predictions 24-hour AI forecast
GET /api/venues/[id]/reports Community reports
POST /api/venues/[id]/reports Submit community report
GET /api/venues/[id]/ratings Venue reviews
POST /api/venues/[id]/ratings Submit a rating
GET /api/favorites User's saved venues
POST /api/favorites Add to favorites
DELETE /api/favorites Remove from favorites
POST /api/admin/migrate Initialize schema
GET /api/admin/migrate Check migration status
POST /api/auth/register User registration
POST /api/auth/login JWT login
GET /api/ai/predict AI prediction endpoint
How We Built It
We designed MakeTheyArrive from the ground up as a production-ready, cloud-native system — not a hackathon prototype.
Architecture & Database Design We modeled the crowd prediction problem as a time-series data challenge. The schema captures crowd readings across multiple dimensions: hour of day, day of week, venue type, city, source (user vs. system), and confidence score. This allows meaningful pattern extraction even with sparse early data.
Frontend & AI Prediction Layer We built the dashboard, interactive map, search interface, and community reporting system. The AI prediction engine combines historical crowd patterns, peak hour weights, day-of-week seasonality, and live community reports to generate hourly crowd forecasts with confidence scores.
PWA, Auth, and Polish We added JWT-based authentication, bcrypt password hashing, user favorites, personalized alerts, and PWA support so the platform installs natively on mobile devices.
Challenges We Ran Into
1. Connecting Vercel to Aurora with IAM Auth
AWS Aurora doesn't accept password-based connections when IAM auth is enabled. Vercel's serverless functions use OIDC tokens to assume an IAM role, which then generates short-lived RDS Signer tokens. Getting this chain correct — @vercel/functions/oidc → awsCredentialsProvider → @aws-sdk/rds-signer → pg.Pool — took significant debugging, including discovering that VERCEL_OIDC_TOKEN is only injected at Vercel runtime (not available locally).
2. Environment Variable Conflicts
The v0 database viewer expected a NEON_DATABASE_URL (Neon-specific variable), while our stack used individual PG* AWS variables. We had to build a robust fallback chain so the connection worked regardless of which variables were present.
3. Predicting Without Enough Data Building an AI prediction engine that works meaningfully before real user data accumulates required careful schema design: storing synthetic historical patterns at seed time, weighting them against live readings, and outputting confidence scores that honestly reflect data sparsity.
4. Scalable Schema for Extensibility
Designing a schema that could scale from 20 venues (MVP) to 2 million venues across India without structural changes meant heavy use of indexing on FK columns, crowd level enums, time-based partitioning design, and a separate peak_hours table that captures learned patterns independently of raw readings.
5. PWA on Serverless Making next-pwa work correctly with Next.js App Router and Vercel's edge network required careful configuration of service worker scope, manifest asset paths, and offline fallback routing.
Accomplishments We're Proud Of
- Complete end-to-end prediction pipeline — from raw crowd submissions to AI-generated hourly forecasts with confidence scores.
- 14 API endpoints covering the full CRUD surface for venues, crowd data, community reports, ratings, favorites, auth, and migrations.
- 20 pre-seeded Delhi venues across hospitals, banks, RTOs, courts, passport offices, and post offices — ready for real users from day one.
- PWA with offline support — users can access saved venues and recent data without an internet connection.
- Production-ready security — parameterized SQL queries, JWT sessions with jose, bcrypt password hashing, SSL-enforced DB connections, automatic IAM credential rotation.
What We Learned
Building MakeTheyArrive taught us that the hardest part of an AI product is rarely the model itself — it's the data infrastructure that feeds it.
Key technical lessons:
- IAM auth on serverless is harder than it looks — the OIDC token chain requires precise scoping of trust policies, OIDC provider configuration, and runtime token injection.
- Drizzle ORM + Aurora is a powerful combination but requires careful pool management in serverless environments to avoid connection exhaustion.
- Crowd prediction without crowd data is solvable through synthetic seeding + honest confidence scoring — don't fake precision, surface uncertainty.
- Database schema is product strategy — the choices we made in the schema directly determine what AI features are possible in the future.
Broader lessons:
- The most impactful AI products solve problems people experience every single day, not edge cases.
- A polished, reliable user experience beats impressive-sounding but broken features every time.
- Cloud-native architecture is a competitive advantage — not just infrastructure overhead.
What's Next for MakeTheyArrive
Near-term (3 months)
- Anonymous user check-ins via UUID tracking (no login required to submit crowd readings)
- Machine learning models trained on accumulated crowd_readings data (LSTM / time-series forecasting)
- Real-time crowd heatmaps rendered in Mapbox
- Push notification system for crowd alerts at saved venues
- Weather and public holiday integration into predictions
Medium-term (6-12 months)
- Expansion from Delhi to Mumbai, Bangalore, Chennai, Hyderabad, and Kolkata
- Mobile apps (React Native) with background location-based alerts
- Institutional partnerships with hospitals and government offices for official data feeds
- Admin dashboard for venue managers to post service disruptions and announcements
Long-term Vision Become the world's first large-scale Crowd Intelligence Network — a layer of real-world waiting time intelligence sitting on top of every high-demand public service, in every city, in every country.
Imagine a future where checking crowd levels before leaving home is as automatic as checking traffic. That's the future MakeTheyArrive is building toward.
Try It
Live Demo: maketheyarrive.vercel.app
GitHub: github.com/ansonj-dev/maketheyarrive
MakeTheyArrive — Know Before You Leave Home.
Built With
- amazon-aurora
- aws-iam
- aws-rds-signer
- bcryptjs
- drizzle-orm
- framer-motion
- jose
- mapbox
- next-pwa
- next.js
- node-postgres
- postgresql
- react
- shadcn-ui
- tailwind-css
- typescript
- vercel
- vercel-ai-sdk
Log in or sign up for Devpost to join the conversation.