Loading…
Loading…
Flagship Full-Stack Booking Platform
A mobile-first turf booking platform for hostel students of Daffodil International University, combining fair-use reservation rules, real-time slot updates, waitlists, role-based administration, and a production FastAPI and PostgreSQL backend.
Placeholder screenshots are shown for now and will be replaced with actual project visuals later.
DIU Turf is a mobile-first turf booking platform developed for hostel students of Daffodil International University. It replaces manual booking through calls, messages, and informal records with a structured system for viewing available slots, making reservations, joining waitlists, and reviewing booking activity.
The central problem is fair allocation of a limited university facility. Without server-enforced rules, the same slot can be requested by multiple students, frequent users can dominate availability, and administrators have little reliable history of bookings, cancellations, attendance, or overrides.
The platform combines a React Native application with a FastAPI backend and PostgreSQL database. Students receive a live booking experience, while administrators manage slots, maintenance days, students, bookings, attendance, announcements, and audit records.
The mobile application handles student and administrator interaction, while the backend owns authentication, eligibility checks, booking transactions, waitlist promotion, notifications, and authorization.
The production backend is deployed and accessible over a secure HTTPS connection. The application uses environment-specific API configuration, and the Android build must be regenerated when production endpoint settings change.
React Native Mobile App
Typed API Services
FastAPI Backend
Booking Transaction Layer
PostgreSQL
WebSocket and Notifications
Student and Admin Interfaces
The project’s deployment work included backend hosting, database migrations, HTTPS configuration, API verification, EAS Android builds, and production-device testing.
| Layer | Technology |
|---|---|
| Mobile | React Native, Expo SDK 54, TypeScript |
| Backend | FastAPI, Pydantic, Uvicorn |
| Data | PostgreSQL, asyncpg, Alembic |
| Real-time | Authenticated WebSocket events |
| Delivery | GitHub Actions, Render, EAS Android builds |
A working browser endpoint did not initially guarantee a working installed application. The final mobile build required the correct production API URL, HTTPS configuration, rebuild, and device retesting.
The booking workflow is supported by a normalized PostgreSQL schema designed for transaction integrity, waiting order, administrative accountability, and future analysis.
The schema is managed through Alembic migrations 001–009. Primary identifiers use UUIDs, production timestamps use TIMESTAMPTZ, and email uniqueness is case-insensitive through PostgreSQL citext.
| Entity | Purpose |
|---|---|
| users | Accounts, profiles, roles, authentication state, and suspension status |
| turfs | Bookable facility definitions |
| slot_templates | Configurable time windows for each turf |
| bookings | Reservation records and booking lifecycle |
| waitlists | First-come-first-served queues for full slots |
| maintenance_days | Dates blocked from booking |
| attendance | Session attendance recorded by administrators |
| notifications | Per-user notification inbox |
| activity_logs | User-facing operational history |
| audit_logs | Administrative action history |
| analytics_events | Append-only analytical telemetry |
| token_revocations | Invalidated JWT sessions |
| user_push_tokens | Expo push tokens |
| rate_limit_buckets | Shared authentication rate-limit counters |
Relationship Architecture:
The mobile interface does not decide booking eligibility. Fair-use and conflict rules are enforced by the backend transaction layer and PostgreSQL constraints. When a booking is cancelled, the first eligible waitlisted student can be promoted automatically and notified.
| Rule | Enforcement |
|---|---|
| One active booking per slot and date | Advisory transaction lock plus partial unique index |
| One active booking per student per day | Transaction check plus partial unique index |
| Weekly booking cap | Five bookings per week |
| Weekly cancellation cap | Three cancellations per week |
| Maintenance dates | Blocked during booking validation |
| Suspended students | Rejected by authentication and booking checks |
| Waitlist order | First eligible student promoted after cancellation |
Transaction Execution Workflow:
Student selects a date and slot.
The app shows an optimistic booking state.
The backend acquires the booking transaction lock.
Eligibility, maintenance, suspension, cap, and conflict rules are checked.
The booking is committed and activity or notification records are created.
A WebSocket event tells affected screens to refresh authoritative server data.
The platform separates roles to coordinate bookings, manage access boundaries, and enforce credentials protection across the application client and backend API.
User roles are strictly divided into student, admin, and super_admin:
DIU Turf uses authenticated WebSocket events to keep booking screens synchronized after bookings, cancellations, waitlist changes, maintenance updates, and announcements. The event acts as a refresh signal; clients then retrieve authoritative state from the backend.
Verified user-facing notification features include:
The platform also produces normalized operational data suitable for analysis of slot demand, waiting queues, cancellation behavior, attendance, and resource-allocation fairness. Advanced analytics notebooks and demand forecasting remain planned extensions.
| Question | Data source |
|---|---|
| Which slots have the highest unmet demand? | Bookings and waitlists |
| Are opportunities distributed fairly? | User booking frequency and weekly limits |
| What predicts cancellation or absence? | Booking history, cancellation timing, and attendance |
| How should capacity be planned? | Occupancy, waitlist depth, and slot popularity |
Implementation integrity is maintained through automated tests, typed serialization, and strict schema management.
| Capability | Status |
|---|---|
| Mobile application | Implemented |
| Backend API | Implemented |
| Booking and waitlist workflow | Implemented |
| Real-time synchronization | Implemented |
| Role-based administration | Implemented |
| Backend automated testing | Implemented |
| Frontend automated testing | Planned |
| Google Play publication | In progress |
| Advanced demand forecasting | Planned |
DIU Turf currently has 26 active users. The initial adoption target is 100 users, and the target must be presented as a future objective rather than an achieved result.
The Android application is progressing through the Google Play publication process. The mobile application and production backend are functioning, but the portfolio must not describe the app as publicly available through Google Play until approval is complete and a verified store URL exists.
| Item | Status |
|---|---|
| Mobile application | Functional |
| Production backend | Implemented |
| Current active users | 26 |
| Initial user target | 100 |
| Google Play publication | In progress |
| Verified public Play Store URL | Not yet available |