# pavankumar-p15/playscout_ooad architecture

> Architecture diagram of the GitHub repository pavankumar-p15/playscout_ooad, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pavankumar-p15/playscout_ooad
- Repository: https://github.com/pavankumar-p15/playscout_ooad

## Overview

PlayScout is a React frontend for discovering sports venues and players, booking facilities, organizing games, and coordinating through chat. The user journey starts in the routed application, uses shared session/data context, then branches into venue discovery, booking/payment, game participation, and account or admin tasks. The README also documents sports news and OAuth capabilities. Backend services and most page/component implementations were not included in the excerpts, so API relationships are shown only where source calls or README statements support them; absent backend paths are not inferred.

Main entry points: [`frontend/src/App.jsx`](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/App.jsx) (Routes and layout), [`frontend/src/context/StoreContext.jsx`](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/context/StoreContext.jsx) (Shared app state), [`frontend/src/components/Bookpop/Bookpop.jsx`](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/Bookpop/Bookpop.jsx) (Booking and checkout), [`frontend/src/pages/Upcoming/Upcoming.jsx`](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Upcoming/Upcoming.jsx) (Upcoming activity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_main["React entry<br/>[main.jsx]"]
  node_app_routes["Routes and layout<br/>[App.jsx]"]
  node_store["Shared app state<br/>[StoreContext.jsx]"]
  node_store_instance["Context instance"]
end

subgraph group_discovery["Discovery"]
  node_venues["Venue browsing<br/>[ExploreVenues.jsx]"]
  node_venue_detail["Venue details<br/>[Facility_info.jsx]"]
  node_facility_page["Facility page<br/>[Facility.jsx]"]
  node_players["Player discovery<br/>[Meet.jsx]"]
  node_player_card["Player actions<br/>[PlayerObject.jsx]"]
  node_news["Sports news<br/>[News.jsx]"]
end

subgraph group_booking["Bookings and payments"]
  node_booking_popup["Booking and checkout<br/>[Bookpop.jsx]"]
  node_booking_page["Booking page<br/>[Booking.jsx]"]
  node_upcoming["Upcoming activity<br/>[Upcoming.jsx]"]
  node_payment_history["Payment history<br/>[PaymentHistory.jsx]"]
  node_payment_result["Payment result<br/>[PaymentSuccess.jsx]"]
  node_payment_cancel["Payment cancellation<br/>[PaymentCancel.jsx]"]
end

subgraph group_community["Games and community"]
  node_games["Game creation<br/>[CreateGame.jsx]"]
  node_join_request["Join requests<br/>[JoinPopup.jsx]"]
  node_chat["Participant chat<br/>[Chat.jsx]"]
  node_chat_service["Chat transport"]
end

subgraph group_identity["Identity and administration"]
  node_auth_popup["Login and registration<br/>[LoginPopup.jsx]"]
  node_oauth["OAuth callback<br/>[OAuthSuccess.jsx]"]
  node_profile["Profile management<br/>[Profile.jsx]"]
  node_complete_profile["Profile completion"]
  node_facility_admin["Venue administration"]
  node_admin["Admin console<br/>[Admin.jsx]"]
end

node_user(("Sports enthusiast"))
node_api{{"PlayScout API"}}
node_payment_provider{{"Payment provider"}}
node_news_api{{"GNews API"}}
node_database[("Supabase PostgreSQL")]

node_user -->|"opens app"| node_main
node_main -->|"provides state"| node_store
node_main -->|"renders"| node_app_routes
node_app_routes -->|"routes to"| node_booking_page
node_app_routes -->|"routes to"| node_facility_page
node_app_routes -->|"routes to"| node_players
node_app_routes -->|"routes to"| node_chat
node_app_routes -->|"routes to"| node_news
node_app_routes -->|"routes to"| node_upcoming
node_app_routes -->|"shows"| node_auth_popup
node_app_routes -->|"routes to"| node_facility_admin
node_app_routes -->|"routes to"| node_admin
node_app_routes -->|"routes to"| node_profile
node_app_routes -->|"routes to"| node_oauth
node_app_routes -->|"routes to"| node_complete_profile
node_app_routes -->|"routes to"| node_payment_result
node_app_routes -->|"routes to"| node_payment_cancel
node_app_routes -->|"routes to"| node_payment_history
node_store -->|"uses context"| node_store_instance
node_store -->|"fetches data"| node_api
node_facility_page -.->|"shows details"| node_venue_detail
node_venue_detail -->|"opens booking"| node_booking_popup
node_venue_detail -.->|"loads venue data"| node_api
node_players -.->|"renders players"| node_player_card
node_player_card -->|"opens request"| node_join_request
node_player_card -.->|"loads player data"| node_api
node_news -.->|"fetches news"| node_news_api
node_booking_page -.->|"offers venues"| node_venues
node_booking_popup -->|"creates checkout"| node_api
node_booking_popup -->|"redirects for payment"| node_payment_provider
node_booking_popup -->|"fallback booking"| node_api
node_upcoming -->|"reads bookings"| node_api
node_upcoming -->|"cancels booking"| node_api
node_upcoming -->|"refreshes venues"| node_store
node_payment_history -.->|"loads history"| node_api
node_games -->|"creates game"| node_api
node_games -->|"refreshes games"| node_store
node_join_request -.->|"manages requests"| node_api
node_chat -->|"loads messages"| node_api
node_chat -->|"connects realtime"| node_chat_service
node_chat_service -->|"uses websocket endpoint"| node_api
node_auth_popup -->|"authenticates"| node_api
node_oauth -->|"sets session"| node_store_instance
node_profile -->|"reads and updates"| node_api
node_complete_profile -.->|"updates profile"| node_api
node_facility_admin -->|"manages venues"| node_api
node_admin -->|"manages platform"| node_api
node_api -.->|"persists platform data"| node_database

click node_main "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/main.jsx"
click node_app_routes "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/App.jsx"
click node_store "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/context/StoreContext.jsx"
click node_store_instance "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/context/storeContextInstance.js"
click node_venues "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/ExploreVenues/ExploreVenues.jsx"
click node_venue_detail "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/Facility_info/Facility_info.jsx"
click node_facility_page "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Facility/Facility.jsx"
click node_players "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Meet/Meet.jsx"
click node_player_card "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/PlayerObject/PlayerObject.jsx"
click node_news "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/News/News.jsx"
click node_booking_popup "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/Bookpop/Bookpop.jsx"
click node_booking_page "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Booking/Booking.jsx"
click node_upcoming "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Upcoming/Upcoming.jsx"
click node_payment_history "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/PaymentHistory/PaymentHistory.jsx"
click node_payment_result "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/PaymentSuccess/PaymentSuccess.jsx"
click node_payment_cancel "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/PaymentCancel/PaymentCancel.jsx"
click node_games "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/CreateGame/CreateGame.jsx"
click node_join_request "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/JoinPopup/JoinPopup.jsx"
click node_chat "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Chat/Chat.jsx"
click node_auth_popup "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/LoginPopup/LoginPopup.jsx"
click node_oauth "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/OAuthSuccess/OAuthSuccess.jsx"
click node_profile "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Profile/Profile.jsx"
click node_complete_profile "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/CompleteProfile/CompleteProfile.jsx"
click node_facility_admin "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/FacilityManagement/FacilityManagement.jsx"
click node_admin "https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Admin/Admin.jsx"

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_main,node_app_routes,node_store,node_store_instance toneBlue
class node_venues,node_venue_detail,node_facility_page,node_players,node_player_card,node_news,node_database toneAmber
class node_booking_popup,node_booking_page,node_upcoming,node_payment_history,node_payment_result,node_payment_cancel,node_api,node_news_api toneMint
class node_games,node_join_request,node_chat,node_chat_service toneRose
class node_auth_popup,node_oauth,node_profile,node_complete_profile,node_facility_admin,node_admin,node_user,node_payment_provider toneIndigo
```

## Components

### App shell

- [React entry](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Routes and layout](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Shared app state](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/context/StoreContext.jsx): `frontend/src/context/StoreContext.jsx`
- [Context instance](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/context/storeContextInstance.js): `frontend/src/context/storeContextInstance.js`

### Discovery

- [Venue browsing](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/ExploreVenues/ExploreVenues.jsx): `frontend/src/components/ExploreVenues/ExploreVenues.jsx`
- [Venue details](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/Facility_info/Facility_info.jsx): `frontend/src/components/Facility_info/Facility_info.jsx`
- [Facility page](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Facility/Facility.jsx): `frontend/src/pages/Facility/Facility.jsx`
- [Player discovery](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Meet/Meet.jsx): `frontend/src/pages/Meet/Meet.jsx`
- [Player actions](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/PlayerObject/PlayerObject.jsx): `frontend/src/components/PlayerObject/PlayerObject.jsx`
- [Sports news](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/News/News.jsx): `frontend/src/pages/News/News.jsx`

### Bookings and payments

- [Booking and checkout](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/Bookpop/Bookpop.jsx): `frontend/src/components/Bookpop/Bookpop.jsx`
- [Booking page](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Booking/Booking.jsx): `frontend/src/pages/Booking/Booking.jsx`
- [Upcoming activity](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Upcoming/Upcoming.jsx): `frontend/src/pages/Upcoming/Upcoming.jsx`
- [Payment history](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/PaymentHistory/PaymentHistory.jsx): `frontend/src/pages/PaymentHistory/PaymentHistory.jsx`
- [Payment result](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/PaymentSuccess/PaymentSuccess.jsx): `frontend/src/pages/PaymentSuccess/PaymentSuccess.jsx`
- [Payment cancellation](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/PaymentCancel/PaymentCancel.jsx): `frontend/src/pages/PaymentCancel/PaymentCancel.jsx`

### Games and community

- [Game creation](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/CreateGame/CreateGame.jsx): `frontend/src/components/CreateGame/CreateGame.jsx`
- [Join requests](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/JoinPopup/JoinPopup.jsx): `frontend/src/components/JoinPopup/JoinPopup.jsx`
- [Participant chat](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Chat/Chat.jsx): `frontend/src/pages/Chat/Chat.jsx`
- **Chat transport**

### Identity and administration

- [Login and registration](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/components/LoginPopup/LoginPopup.jsx): `frontend/src/components/LoginPopup/LoginPopup.jsx`
- [OAuth callback](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/OAuthSuccess/OAuthSuccess.jsx): `frontend/src/pages/OAuthSuccess/OAuthSuccess.jsx`
- [Profile management](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Profile/Profile.jsx): `frontend/src/pages/Profile/Profile.jsx`
- [Profile completion](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/CompleteProfile/CompleteProfile.jsx): `frontend/src/pages/CompleteProfile/CompleteProfile.jsx`
- [Venue administration](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/FacilityManagement/FacilityManagement.jsx): `frontend/src/pages/FacilityManagement/FacilityManagement.jsx`
- [Admin console](https://github.com/pavankumar-p15/playscout_ooad/blob/main/frontend/src/pages/Admin/Admin.jsx): `frontend/src/pages/Admin/Admin.jsx`

### Other components

- **Sports enthusiast**
- **PlayScout API**
- **Payment provider**
- **GNews API**
- **Supabase PostgreSQL**

## Connections

- Sports enthusiast → React entry: opens app (evidence: `frontend/src/main.jsx`)
- React entry → Shared app state: provides state (evidence: `frontend/src/main.jsx`)
- React entry → Routes and layout: renders (evidence: `frontend/src/main.jsx`)
- Routes and layout → Booking page: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Facility page: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Player discovery: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Participant chat: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Sports news: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Upcoming activity: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Login and registration: shows (evidence: `frontend/src/App.jsx`)
- Routes and layout → Venue administration: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Admin console: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Profile management: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → OAuth callback: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Profile completion: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Payment result: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Payment cancellation: routes to (evidence: `frontend/src/App.jsx`)
- Routes and layout → Payment history: routes to (evidence: `frontend/src/App.jsx`)
- Shared app state → Context instance: uses context (evidence: `frontend/src/context/StoreContext.jsx`)
- Shared app state → PlayScout API: fetches data (evidence: `frontend/src/context/StoreContext.jsx`)
- Facility page → Venue details: shows details
- Venue details → Booking and checkout: opens booking (evidence: `frontend/src/components/Facility_info/Facility_info.jsx`)
- Venue details → PlayScout API: loads venue data
- Player discovery → Player actions: renders players
- Player actions → Join requests: opens request (evidence: `frontend/src/components/PlayerObject/PlayerObject.jsx`)
- Player actions → PlayScout API: loads player data
- Sports news → GNews API: fetches news (evidence: `README.md`)
- Booking page → Venue browsing: offers venues
- Booking and checkout → PlayScout API: creates checkout (evidence: `frontend/src/components/Bookpop/Bookpop.jsx`)
- Booking and checkout → Payment provider: redirects for payment (evidence: `frontend/src/components/Bookpop/Bookpop.jsx`)
- Booking and checkout → PlayScout API: fallback booking (evidence: `frontend/src/components/Bookpop/Bookpop.jsx`)
- Upcoming activity → PlayScout API: reads bookings (evidence: `frontend/src/pages/Upcoming/Upcoming.jsx`)
- Upcoming activity → PlayScout API: cancels booking (evidence: `frontend/src/pages/Upcoming/Upcoming.jsx`)
- Upcoming activity → Shared app state: refreshes venues (evidence: `frontend/src/pages/Upcoming/Upcoming.jsx`)
- Payment history → PlayScout API: loads history
- Game creation → PlayScout API: creates game (evidence: `frontend/src/components/CreateGame/CreateGame.jsx`)
- Game creation → Shared app state: refreshes games (evidence: `frontend/src/components/CreateGame/CreateGame.jsx`)
- Join requests → PlayScout API: manages requests
- Participant chat → PlayScout API: loads messages (evidence: `frontend/src/pages/Chat/Chat.jsx`)
- Participant chat → Chat transport: connects realtime (evidence: `frontend/src/pages/Chat/Chat.jsx`)
- Chat transport → PlayScout API: uses websocket endpoint
- Login and registration → PlayScout API: authenticates (evidence: `frontend/src/components/LoginPopup/LoginPopup.jsx`)
- OAuth callback → Context instance: sets session (evidence: `frontend/src/pages/OAuthSuccess/OAuthSuccess.jsx`)
- Profile management → PlayScout API: reads and updates (evidence: `frontend/src/pages/Profile/Profile.jsx`)
- Profile completion → PlayScout API: updates profile
- Venue administration → PlayScout API: manages venues (evidence: `frontend/src/pages/FacilityManagement/FacilityManagement.jsx`)
- Admin console → PlayScout API: manages platform (evidence: `frontend/src/pages/Admin/Admin.jsx`)
- PlayScout API → Supabase PostgreSQL: persists platform data (evidence: `README.md`)
