Typesetting…
Typesetting…
Case study
Full-stack mobile platform
Abstract
A mobile-first turf booking platform for Daffodil International University hostel students. Students book daily slots fairly, join waitlists that promote automatically and see changes in real time; admins run the facility from a control room with audit trails.
Keywords — React Native · Expo SDK 54 · TypeScript · FastAPI · PostgreSQL · WebSocket · Alembic
Table 1 · At a glance
Hostel turf slots are limited and in high demand. Booking by phone and message led to double bookings, the same students taking most slots, and no record of who booked, cancelled or showed up. DIU Turf moves the rules to the server so fairness does not depend on the app or on an admin's memory.
The app never decides eligibility. Every booking runs through one server-side transaction, and a WebSocket event tells other screens to refetch the authoritative state.
| Rule | Limit | Enforced by |
|---|---|---|
| One booking per slot | 1 active booking per slot and date | Advisory lock + partial unique index |
| One booking per day | 1 active booking per student | Partial unique index + transaction |
| Weekly booking cap | 5 bookings per week | Transaction step |
| Weekly cancellation cap | 3 cancellations per week | cancel_booking() |
| Future slots only | No past slots | is_future_slot() check |
| Maintenance days | Blocked dates | Transaction step |
| Suspension | While suspension_until is active | Transaction step + login gate |
| Waitlist promotion | First in queue on cancellation | promote_from_waitlist() |
Students
Admins
The normalized schema (users, bookings, waitlists, attendance, notifications, audit logs and analytics events) records real operational behaviour. It can answer which slots have the most unmet demand, whether bookings are spread fairly, and what predicts cancellations or no-shows. Demand forecasting on this data is a planned extension.
Mobile app, FastAPI backend, migrations, CI workflow and deployment guides for Render, DigitalOcean and EAS.
View GitHub repository ↗