TeamUp
Connecting Players. Creating Opportunities.
Created on 22nd June 2025
â˘
TeamUp
Connecting Players. Creating Opportunities.
The problem TeamUp solves
đ ď¸ The Problem It Solves
Our platform tackles the daily challenges faced by recreational players and turf owners, making local sports more accessible, organized, and reliable.
đ For Players
- Easily find and join pickup games nearby without relying on outdated WhatsApp groups or word of mouth.
- Create your own match groups, set time, location, and player requirementsâno more last-minute cancellations.
- Book turfs instantly, see live availability, and split payments with teammates.
- Stay connected with in-app chat, match reminders, and player reviews.
đď¸ For Turf Owners
- List available time slots with live availability and pricing.
- Reach active players directly, filling slots that would otherwise go unused.
- Manage bookings, schedules, and payments through a simple, centralized dashboard.
- Build trust and visibility with player ratings and feedback.
Challenges we ran into
Designing a Scalable Relational Schema
Defining how players, turfs, matchâgroups, bookings, and reviews relate was more complex than it first appeared. We needed junction tables (e.g.,
match_participants
) to represent manyâtoâmany relationships, and careful use of foreign keys to enforce referential integrity. Balancing normalization (to avoid redundant data) with query performance took significant iteration.Establishing Table Connections & Migrations
Writing and maintaining database migrations (using FlaskâMigrate/Alembic) was errorâprone at first: missing constraints, circular dependencies, and orderâofâexecution issues forced us to drop and reâcreate tables multiple times. We had to learn how to write âofflineâ batch migrations and ensure that each change would apply cleanly in both our local and production environments.
Optimizing Query Performance
As we joined multiple tables to display composite data (e.g., a turfâs upcoming bookings alongside owner info and location), we ran into N+1 query problems. Integrating FlaskâSQLAlchemyâs
joinedload
and writing custom index hints improved response times drastically, but required careful profiling and understanding of the ORMâs lazy/eager loading options.Handling Geospatial Data in the Database
To support proximity searches (âfind turfs within 5âŻkmâ), we experimented with storing latitude/longitude as plain floats versus using PostGIS. The latter offered builtâin indexing and âST_Distanceâ calculations, but added complexity in deployment. We settled on PostGIS, learning to define geometry columns and spatial indexes.
Integrating the Map API
Consuming Google Maps (and later Mapbox) APIs in the frontend meant managing API keys, usage quotas, and billing. We built a small Flask endpoint to proxy geocoding requests, which solved CORS issues and hid our secret keys. Implementing âautocompleteâ for address search required debouncing user input and handling edge cases where partial addresses returned ambiguous coordinates.
Synchronizing Frontend & Backend Data
Ensuring that turf availability on the map reflected realâtime booking status demanded WebSocket integration. We extended our Flask app with FlaskâSocketIO, wiring events for ânew bookingâ and âbooking canceled,â and writing clientâside listeners to update both the map markers and availability panels instantly.
- Error Handling & Fallbacks
Map API outages or rate limits caused search failuresâso we built graceful fallbacks, caching recent geocoding results in Redis and displaying a simple list view if the map failed to load. This redundancy increased complexity but was essential for a smooth user experience.
Time Constraints & Iteration
Working within a 36âhour hackathon window meant prioritizing core features over polish. We had to defer advanced map overlays (heatmaps of popular slots) and deep analytics, focusing instead on a minimal viable integration that showcased realâtime turf discovery and booking functionality.
Each of these challenges strengthened our understanding of database design, API integration, and realâtime web architecturesâkey skills for delivering a robust, hackathonâready sports platform.
Tracks Applied (1)
Best use of Gemini API
Major League Hacking
Technologies used
