# ashwinugale/csci-p565 architecture

> Architecture diagram of the GitHub repository ashwinugale/csci-p565, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ashwinugale/csci-p565
- Repository: https://github.com/ashwinugale/csci-p565

## Overview

This is a two-sided activity and venue discovery/booking application, with user and venue-owner experiences plus messaging. The main journey is users or owners entering through routed web pages, creating or finding activities and venues, then booking; authentication, profiles, and conversations are supporting workflows. The excerpts show route registration, authentication calls, activity filtering, booking logic, and model use. Several frontend pages and backend routes are indexed but unsampled, so their links are omitted where evidence is insufficient.

Main entry points: [`Project/server/routes/activity.js`](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/activity.js) (Activity and booking API), [`Project/vite-project/src/pages/auth/login.jsx`](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/auth/login.jsx) (Sign in), [`Project/server/routes/auth.js`](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/auth.js) (Authentication API), [`Project/vite-project/src/pages/components/Header.jsx`](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/components/Header.jsx) (Navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_app["Page router<br/>[App.jsx]"]
  node_header["Navigation<br/>[Header.jsx]"]
  node_server["HTTP server<br/>[index.js]"]
end

subgraph group_identity["Identity and profiles"]
  node_login["Sign in<br/>[login.jsx]"]
  node_user_context["User context<br/>[UserContext.jsx]"]
  node_auth_context["Auth state<br/>[AuthContext.jsx]"]
  node_auth_reducer["Auth reducer<br/>[AuthReducer.js]"]
  node_auth_routes["Authentication API<br/>[auth.js]"]
  node_user_model[("User records<br/>[user.js]")]
end

subgraph group_discovery["Listings and discovery"]
  node_activity_filter["Activity search<br/>[ActivityFilter.jsx]"]
  node_activity_card["Activity card<br/>[ActivityCard.jsx]"]
  node_activity_create["Create activity<br/>[AddActivity.jsx]"]
  node_activity_model[("Activity records<br/>[activity.js]")]
  node_venue_filter["Venue search<br/>[VenueFilter.jsx]"]
  node_venue_create["Create venue<br/>[AddVenue.jsx]"]
  node_venue_model[("Venue records<br/>[venue.js]")]
end

subgraph group_booking["Booking and messaging"]
  node_activity_api["Activity and booking API<br/>[activity.js]"]
  node_activity_booking[("Activity bookings<br/>[bookings.js]")]
  node_venue_booking[("Venue bookings<br/>[venuebooking.js]")]
  node_conversation_route["Conversation API<br/>[conversation.js]"]
  node_conversation_model[("Conversations<br/>[Conversation.js]")]
  node_message_route["Message API<br/>[messages.js]"]
  node_message_model[("Messages<br/>[Message.js]")]
end

node_visitor(("User or owner"))
node_mongo[("MongoDB")]
node_firebase["Firebase auth"]
node_email["Email service"]

node_visitor -->|"opens"| node_app
node_app -->|"routes to"| node_login
node_login -->|"renders"| node_header
node_login -->|"updates"| node_user_context
node_login -->|"posts login"| node_auth_routes
node_login -->|"authenticates with"| node_firebase
node_auth_routes -->|"reads and creates"| node_user_model
node_auth_context -->|"reduces state"| node_auth_reducer
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_activity_api
node_server -->|"mounts"| node_conversation_route
node_server -->|"mounts"| node_message_route
node_activity_filter -->|"renders"| node_header
node_activity_filter -->|"renders"| node_activity_card
node_activity_filter -->|"requests filtering"| node_activity_api
node_activity_create -->|"renders"| node_header
node_venue_filter -->|"renders"| node_header
node_venue_create -->|"renders"| node_header
node_activity_api -->|"reads and updates"| node_activity_model
node_activity_api -->|"reads and updates"| node_venue_model
node_activity_api -->|"creates bookings"| node_activity_booking
node_activity_api -->|"creates bookings"| node_venue_booking
node_activity_api -->|"looks up owners"| node_user_model
node_activity_api -->|"sends notices"| node_email
node_conversation_route -->|"uses"| node_conversation_model
node_message_route -->|"uses"| node_message_model
node_user_context -->|"fetches profile"| node_auth_routes
node_auth_routes -.->|"persists users"| node_mongo

click node_app "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/App.jsx"
click node_header "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/components/Header.jsx"
click node_login "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/auth/login.jsx"
click node_user_context "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/components/UserContext.jsx"
click node_auth_context "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/context/AuthContext.jsx"
click node_auth_reducer "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/context/AuthReducer.js"
click node_auth_routes "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/auth.js"
click node_user_model "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/user.js"
click node_activity_filter "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/ActivityFilter.jsx"
click node_activity_card "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/components/Activites/ActivityCard.jsx"
click node_activity_create "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/AddActivity.jsx"
click node_activity_api "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/activity.js"
click node_activity_model "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/activity.js"
click node_venue_filter "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/VenueFilter.jsx"
click node_venue_create "https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/AddVenue.jsx"
click node_venue_model "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/venue.js"
click node_activity_booking "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/bookings.js"
click node_venue_booking "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/venuebooking.js"
click node_conversation_route "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/conversation.js"
click node_conversation_model "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/Conversation.js"
click node_message_route "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/messages.js"
click node_message_model "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/Message.js"
click node_server "https://github.com/ashwinugale/csci-p565/blob/main/Project/server/index.js"

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_app,node_header,node_server,node_visitor toneBlue
class node_login,node_user_context,node_auth_context,node_auth_reducer,node_auth_routes,node_user_model,node_mongo toneAmber
class node_activity_filter,node_activity_card,node_activity_create,node_activity_model,node_venue_filter,node_venue_create,node_venue_model toneMint
class node_activity_api,node_activity_booking,node_venue_booking,node_conversation_route,node_conversation_model,node_message_route,node_message_model toneRose
class node_firebase,node_email toneIndigo
```

## Components

### Web experience

- [Page router](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/App.jsx): `Project/vite-project/src/App.jsx`
- [Navigation](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/components/Header.jsx): `Project/vite-project/src/pages/components/Header.jsx`
- [HTTP server](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/index.js): `Project/server/index.js`

### Identity and profiles

- [Sign in](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/auth/login.jsx): `Project/vite-project/src/pages/auth/login.jsx`
- [User context](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/components/UserContext.jsx): `Project/vite-project/src/pages/components/UserContext.jsx`
- [Auth state](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/context/AuthContext.jsx): `Project/vite-project/src/context/AuthContext.jsx`
- [Auth reducer](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/context/AuthReducer.js): `Project/vite-project/src/context/AuthReducer.js`
- [Authentication API](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/auth.js): `Project/server/routes/auth.js`
- [User records](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/user.js): `Project/server/models/user.js`

### Listings and discovery

- [Activity search](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/ActivityFilter.jsx): `Project/vite-project/src/pages/ActivityFilter.jsx`
- [Activity card](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/components/Activites/ActivityCard.jsx): `Project/vite-project/src/pages/components/Activites/ActivityCard.jsx`
- [Create activity](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/AddActivity.jsx): `Project/vite-project/src/pages/AddActivity.jsx`
- [Activity records](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/activity.js): `Project/server/models/activity.js`
- [Venue search](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/VenueFilter.jsx): `Project/vite-project/src/pages/VenueFilter.jsx`
- [Create venue](https://github.com/ashwinugale/csci-p565/blob/main/Project/vite-project/src/pages/AddVenue.jsx): `Project/vite-project/src/pages/AddVenue.jsx`
- [Venue records](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/venue.js): `Project/server/models/venue.js`

### Booking and messaging

- [Activity and booking API](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/activity.js): `Project/server/routes/activity.js`
- [Activity bookings](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/bookings.js): `Project/server/models/bookings.js`
- [Venue bookings](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/venuebooking.js): `Project/server/models/venuebooking.js`
- [Conversation API](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/conversation.js): `Project/server/routes/conversation.js`
- [Conversations](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/Conversation.js): `Project/server/models/Conversation.js`
- [Message API](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/routes/messages.js): `Project/server/routes/messages.js`
- [Messages](https://github.com/ashwinugale/csci-p565/blob/main/Project/server/models/Message.js): `Project/server/models/Message.js`

### Other components

- **User or owner**
- **MongoDB**
- **Firebase auth**
- **Email service**

## Connections

- User or owner → Page router: opens (evidence: `Project/vite-project/src/App.jsx`)
- Page router → Sign in: routes to (evidence: `Project/vite-project/src/App.jsx`)
- Sign in → Navigation: renders (evidence: `Project/vite-project/src/pages/auth/login.jsx`)
- Sign in → User context: updates (evidence: `Project/vite-project/src/pages/auth/login.jsx`)
- Sign in → Authentication API: posts login (evidence: `Project/vite-project/src/pages/auth/login.jsx`)
- Sign in → Firebase auth: authenticates with (evidence: `Project/vite-project/src/pages/auth/login.jsx`)
- Authentication API → User records: reads and creates (evidence: `Project/server/routes/auth.js`)
- Auth state → Auth reducer: reduces state (evidence: `Project/vite-project/src/context/AuthContext.jsx`)
- HTTP server → Authentication API: mounts (evidence: `Project/server/index.js`)
- HTTP server → Activity and booking API: mounts (evidence: `Project/server/index.js`)
- HTTP server → Conversation API: mounts (evidence: `Project/server/index.js`)
- HTTP server → Message API: mounts (evidence: `Project/server/index.js`)
- Activity search → Navigation: renders (evidence: `Project/vite-project/src/pages/ActivityFilter.jsx`)
- Activity search → Activity card: renders (evidence: `Project/vite-project/src/pages/ActivityFilter.jsx`)
- Activity search → Activity and booking API: requests filtering (evidence: `Project/vite-project/src/pages/ActivityFilter.jsx`)
- Create activity → Navigation: renders (evidence: `Project/vite-project/src/pages/AddActivity.jsx`)
- Venue search → Navigation: renders (evidence: `Project/vite-project/src/pages/VenueFilter.jsx`)
- Create venue → Navigation: renders (evidence: `Project/vite-project/src/pages/AddVenue.jsx`)
- Activity and booking API → Activity records: reads and updates (evidence: `Project/server/routes/activity.js`)
- Activity and booking API → Venue records: reads and updates (evidence: `Project/server/routes/activity.js`)
- Activity and booking API → Activity bookings: creates bookings (evidence: `Project/server/routes/activity.js`)
- Activity and booking API → Venue bookings: creates bookings (evidence: `Project/server/routes/activity.js`)
- Activity and booking API → User records: looks up owners (evidence: `Project/server/routes/activity.js`)
- Activity and booking API → Email service: sends notices (evidence: `Project/server/routes/activity.js`)
- Conversation API → Conversations: uses (evidence: `Project/server/routes/conversation.js`)
- Message API → Messages: uses (evidence: `Project/server/routes/messages.js`)
- User context → Authentication API: fetches profile (evidence: `Project/vite-project/src/pages/components/UserContext.jsx`)
- Authentication API → MongoDB: persists users
