How I built GateUndo using Next.js, Supabase, Mapbox, PWA support, and community feedback.
Building GateUndo: A mobile-first railway gate status app for Kerala
GateUndo started from a very local problem in Kerala:
Is the railway gate open, closed, or should I expect a delay?
In many Kerala towns, railway gates are part of everyday travel. A few minutes of uncertainty can change whether someone waits, reroutes, or leaves earlier next time.
So I built GateUndo, a no-login, mobile-first web app for railway gate status, missing gate suggestions, and local gate verification.
Live app:
What GateUndo does
The current beta supports:
- District-wise railway gate list
- Map view using Mapbox
- Open / Closed / Unknown community reports
- One-tap reporting flow
- PWA install support
- Missing gate suggestions
- Community confirm/wrong voting for suggestions
- Admin review before suggestions become live gates
- Inactive/obsolete gate state for ROB-replaced or removed crossings
- Nearby railway station hints
- Conservative safety messaging
The app is currently focused on Kannur first instead of trying to cover all Kerala with weak data.
Tech stack
Frontend:
- Next.js 14 App Router
- TypeScript
- Tailwind CSS
- Lucide icons
- Mapbox GL JS
- PWA manifest + service worker
Backend:
- Supabase Postgres
- Supabase Row Level Security
- Supabase Edge Functions
- SQL views for public app data
- Admin-only review views
Other tools:
- Cloudflare Turnstile for bot protection
- PostHog for privacy-conscious analytics
- Vercel for deployment
Why I chose no login
For this kind of app, login felt like too much friction.
A user may be sitting near a railway gate with poor mobile data. The app should open fast and allow reporting quickly.
So GateUndo uses anonymous reporting, but with guardrails:
- Server-side rate limits
- Anonymous device hash
- Turnstile checks
- GPS proximity validation
- Report freshness windows
- Admin review for suggested gates
This is not perfect anti-spam, but it keeps the experience simple while reducing obvious abuse.
Status calculation
A basic “latest report wins” model is risky.
So GateUndo uses a more conservative approach:
- Recent reports matter more
- Old reports decay
- If reports conflict too much, the status becomes less confident
- If there is no fresh signal, the gate returns to Unknown
- Nearby reports are treated as more trustworthy
- The app avoids saying anything is “safe”
This matters because a false “open” signal near a railway crossing is not a normal product bug. It can create real-world risk.
Gate suggestions
One important feature is missing gate suggestions.
Users can:
- Select a district
- Place a marker on the map
- Add a road/place name
- Optionally add nearby station context
- Submit the suggestion
Other users can confirm or mark it wrong.
A suggestion does not automatically become a live gate. It needs enough community signal and then admin approval.
This helps avoid fake or badly placed gates becoming official-looking records.
Inactive gates
Local feedback showed that some old gates may no longer exist because of road overbridges.
Instead of deleting them immediately, GateUndo can mark them as inactive.
Inactive gates:
- Show as
INACTIVE - Do not accept reports
- Return no live status
- Stay visible only as local context until reviewed
This is useful when users recognize the place but the crossing is no longer active.
Train movement hints
A few users suggested using train movement data to predict gate closures.
That is a strong idea, but I am not adding automatic prediction yet because I do not currently have a reliable official public live train API that I can safely depend on.
For now, GateUndo supports nearby station hints. For example, a gate can show that train activity near a station may affect it, and users can manually check official railway enquiry sources.
Automatic train activity hints may come later if a reliable data source is validated.
Biggest learning
The biggest lesson so far:
Local utility apps need local truth.
The hard part is not only building the UI. It is verifying whether a gate exists, whether the marker is exactly correct, whether a crossing was replaced by an ROB, and whether users trust the data.
Community feedback has already shaped the product direction.
GateUndo is moving from “live gate status app” toward:
A community-built Kerala railway gate intelligence layer.
That feels more honest and more useful.
What is next
Planned improvements:
- Verify more Kannur gates
- Add missing gates from local feedback
- Improve admin review tools
- Add favourite/nearby gates
- Improve station hints
- Explore route-level delay intelligence later
GateUndo is still beta, but the direction is getting clearer with every piece of local feedback.
App:

Top comments (0)