# zoron015-gif/tinkerpro-sports architecture

> Architecture diagram of the GitHub repository zoron015-gif/tinkerpro-sports, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/zoron015-gif/tinkerpro-sports
- Repository: https://github.com/zoron015-gif/tinkerpro-sports

## Overview

TinkerPro Sports is a Flutter marketplace for sports and fitness venues, with customer booking and engagement features plus merchant business management. The main workflow is venue discovery followed by booking and booking management; customers can also save venues, review, message, and receive match notifications, while merchants manage listings, bookings, and news. The Flutter feature modules and several API clients were not excerpted, so their internal calls are not inferred; the app-to-API and Firebase relationships are documented in the README.

Main entry points: [`backend/src/server.js`](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/server.js) (Express API), [`lib/main.dart`](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/main.dart) (Flutter app), [`lib/all_venues_page.dart`](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/all_venues_page.dart) (Venue discovery), [`backend/src/db.js`](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/db.js) (Database access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer app"]
  node_discovery["Venue discovery"]
  node_booking["Venue booking"]
  node_customer_bookings["My bookings"]
  node_saved["Saved venues<br/>[saved_items.dart]"]
  node_reviews["Reviews<br/>[reviews.dart]"]
  node_messages["Messaging"]
  node_news_feed["Venue news<br/>[news_feed.dart]"]
  node_notifications["Match alerts"]
end

subgraph group_merchant["Merchant app"]
  node_merchant_dashboard["Merchant dashboard"]
  node_business_setup["Business listings"]
  node_merchant_bookings["Booking management"]
  node_merchant_news["News posts"]
end

subgraph group_backend["API backend"]
  node_api["Express API<br/>[server.js]"]
  node_normalizers["Data normalization<br/>[normalizers.js]"]
  node_business_details["Business details"]
  node_rate_limit["Request limits<br/>[rate_limit.js]"]
  node_mailer["Email delivery<br/>[mailer.js]"]
  node_db_access["Database access<br/>[db.js]"]
end

subgraph group_shared["Shared services"]
  node_app["Flutter app<br/>[main.dart]"]
  node_auth["Sign-in<br/>[auth_api.dart]"]
  node_mysql[("MySQL<br/>[sports.sql]")]
  node_firebase["Firebase sign-in"]
end

node_customer(("Customer"))
node_merchant_user(("Merchant"))

node_customer -->|"finds venues"| node_discovery
node_discovery -.->|"proceeds to book"| node_booking
node_customer -->|"manages bookings"| node_customer_bookings
node_customer -->|"saves venues"| node_saved
node_customer -->|"reviews venues"| node_reviews
node_customer -->|"messages"| node_messages
node_customer -->|"views venue news"| node_news_feed
node_customer -->|"sets match alerts"| node_notifications
node_merchant_user -->|"manages profiles"| node_business_setup
node_merchant_user -->|"manages bookings"| node_merchant_bookings
node_merchant_user -->|"manages news"| node_merchant_news
node_app -->|"uses API"| node_api
node_app -->|"uses sign-in"| node_firebase
node_api -->|"queries via"| node_db_access
node_api -->|"uses"| node_normalizers
node_api -->|"uses"| node_business_details
node_api -->|"applies limits"| node_rate_limit
node_api -->|"sends mail via"| node_mailer
node_db_access -.->|"accesses"| node_mysql

click node_app "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/main.dart"
click node_auth "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/auth_api.dart"
click node_discovery "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/all_venues_page.dart"
click node_booking "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/reserve_dashboard.dart"
click node_customer_bookings "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/customer_bookings_page.dart"
click node_saved "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/saved_items.dart"
click node_reviews "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/reviews.dart"
click node_messages "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/messages_dashboard.dart"
click node_news_feed "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/news_feed.dart"
click node_notifications "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/booking_notifications.dart"
click node_merchant_dashboard "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/merchant_dashboard.dart"
click node_business_setup "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/merchant_add_page.dart"
click node_merchant_bookings "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/merchant_dashboard.dart"
click node_merchant_news "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/merchant_news_cards_section.dart"
click node_api "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/server.js"
click node_normalizers "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/normalizers.js"
click node_business_details "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/business_details.js"
click node_rate_limit "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/rate_limit.js"
click node_mailer "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/mailer.js"
click node_db_access "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/db.js"
click node_mysql "https://github.com/zoron015-gif/tinkerpro-sports/blob/main/database/sports.sql"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_discovery,node_booking,node_customer_bookings,node_saved,node_reviews,node_messages,node_news_feed,node_notifications toneBlue
class node_merchant_dashboard,node_business_setup,node_merchant_bookings,node_merchant_news toneAmber
class node_api,node_normalizers,node_business_details,node_rate_limit,node_mailer,node_db_access toneMint
class node_app,node_auth,node_mysql,node_firebase toneRose
class node_customer,node_merchant_user toneIndigo
```

## Components

### Customer app

- [Venue discovery](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/all_venues_page.dart): `lib/all_venues_page.dart`
- [Venue booking](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/reserve_dashboard.dart): `lib/reserve_dashboard.dart`
- [My bookings](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/customer_bookings_page.dart): `lib/customer_bookings_page.dart`
- [Saved venues](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/saved_items.dart): `lib/saved_items.dart`
- [Reviews](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/reviews.dart): `lib/reviews.dart`
- [Messaging](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/messages_dashboard.dart): `lib/messages_dashboard.dart`
- [Venue news](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/news_feed.dart): `lib/news_feed.dart`
- [Match alerts](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/booking_notifications.dart): `lib/booking_notifications.dart`

### Merchant app

- [Merchant dashboard](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/merchant_dashboard.dart): `lib/merchant_dashboard.dart`
- [Business listings](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/merchant_add_page.dart): `lib/merchant_add_page.dart`
- [Booking management](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/merchant_dashboard.dart): `lib/merchant_dashboard.dart`
- [News posts](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/merchant_news_cards_section.dart): `lib/merchant_news_cards_section.dart`

### API backend

- [Express API](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/server.js): `backend/src/server.js`
- [Data normalization](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/normalizers.js): `backend/src/normalizers.js`
- [Business details](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/business_details.js): `backend/src/business_details.js`
- [Request limits](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/rate_limit.js): `backend/src/rate_limit.js`
- [Email delivery](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/mailer.js): `backend/src/mailer.js`
- [Database access](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/backend/src/db.js): `backend/src/db.js`

### Shared services

- [Flutter app](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/main.dart): `lib/main.dart`
- [Sign-in](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/lib/auth_api.dart): `lib/auth_api.dart`
- [MySQL](https://github.com/zoron015-gif/tinkerpro-sports/blob/main/database/sports.sql): `database/sports.sql`
- **Firebase sign-in**

### Other components

- **Customer**
- **Merchant**

## Connections

- Customer → Venue discovery: finds venues (evidence: `README.md`)
- Venue discovery → Venue booking: proceeds to book
- Customer → My bookings: manages bookings (evidence: `README.md`)
- Customer → Saved venues: saves venues (evidence: `README.md`)
- Customer → Reviews: reviews venues (evidence: `README.md`)
- Customer → Messaging: messages (evidence: `README.md`)
- Customer → Venue news: views venue news (evidence: `README.md`)
- Customer → Match alerts: sets match alerts (evidence: `README.md`)
- Merchant → Business listings: manages profiles (evidence: `README.md`)
- Merchant → Booking management: manages bookings (evidence: `README.md`)
- Merchant → News posts: manages news (evidence: `README.md`)
- Flutter app → Express API: uses API (evidence: `README.md`)
- Flutter app → Firebase sign-in: uses sign-in (evidence: `README.md`)
- Express API → Database access: queries via (evidence: `backend/src/server.js`)
- Express API → Data normalization: uses (evidence: `backend/src/server.js`)
- Express API → Business details: uses (evidence: `backend/src/server.js`)
- Express API → Request limits: applies limits (evidence: `backend/src/server.js`)
- Express API → Email delivery: sends mail via (evidence: `backend/src/server.js`)
- Database access → MySQL: accesses
