Back to work
Campus bus tracking
RFID logs every bus through the college gate, and a driver app reports where each bus is.
Parts
- Gate service
- Python on a Raspberry Pi 5. It reads UHF tags from a Chainway UR4 reader over TCP, works out whether a bus is entering or leaving, and writes to SQLite first. It syncs to Supabase afterwards, so a dropped network loses nothing.
- Driver app
- Expo and React Native. Expo Location and Task Manager keep GPS running in the background, and an AsyncStorage queue holds positions while the phone is offline.
- Web portals
- React 18 and Vite apps for admin, student and gate staff. Leaflet draws the live map and Tailwind handles the styling.
- Backend
- Supabase on PostgreSQL with PostGIS for location queries, Realtime for live updates and Deno Edge Functions for server logic.
- Sign-in
- Students receive a one-time code through a Telegram bot and swap it for a custom JWT. Drivers use a phone OTP. Row Level Security limits what each role can read.
Built with
PythonReactReact NativeSupabasePostgreSQLRaspberry Pi 5