# shaistaaman/portal architecture

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

- Interactive diagram: https://gitdiagram.com/shaistaaman/portal
- Repository: https://github.com/shaistaaman/portal

## Overview

This is a role-based vacation-rental portal for clients and property staff, with property discovery alongside booking and operational management. The main discovery flow is a user entering destination, dates, and guest counts, then reaching filtered property results and property details. Authenticated role routes expose calendars/bookings and administration for properties, experiences, packages, users, finances, notifications, and settings. The tree and sampled source show routing, search behavior, and mock-data organization; most feature internals and persistence wiring were not sampled, so those connections are intentionally limited.

Main entry points: [`src/App.tsx`](https://github.com/shaistaaman/portal/blob/main/src/App.tsx) (App router), [`src/routes/RoleRoute.tsx`](https://github.com/shaistaaman/portal/blob/main/src/routes/RoleRoute.tsx) (Role guard), [`src/features/search/SearchResults.tsx`](https://github.com/shaistaaman/portal/blob/main/src/features/search/SearchResults.tsx) (Filter and results), [`src/pages/search/RoleSearchResultsPage.tsx`](https://github.com/shaistaaman/portal/blob/main/src/pages/search/RoleSearchResultsPage.tsx) (Search results page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application and access"]
  node_app["App router<br/>[App.tsx]"]
  node_auth["Auth context<br/>[AuthContext.tsx]"]
  node_role["Role guard<br/>[RoleRoute.tsx]"]
  node_layouts["Role layouts"]
  node_login["Login and signup"]
end

subgraph group_discovery["Property discovery"]
  node_searchform["Property search<br/>[PropertySearch.tsx]"]
  node_searchpage["Search results page"]
  node_results["Filter and results<br/>[SearchResults.tsx]"]
  node_properties["Property details"]
  node_propertydata["Property sample data<br/>[properties.ts]"]
end

subgraph group_booking["Bookings and calendar"]
  node_calendar["Calendar and bookings"]
  node_calendarpages["Calendar pages"]
end

subgraph group_operations["Property operations"]
  node_propertyadmin["Property management"]
  node_users["User management"]
  node_financials["Financial records"]
end

subgraph group_content["Portal features"]
  node_experiences["Experiences and packages"]
  node_blogs["Blog management"]
  node_notifications["Notifications"]
  node_settings["Account settings"]
end

node_visitor(("Portal user"))

node_visitor -->|"opens portal"| node_app
node_app -->|"provides auth"| node_auth
node_app -->|"routes unauthenticated"| node_login
node_app -->|"routes protected areas"| node_role
node_role -->|"checks role"| node_auth
node_role -->|"renders role layout"| node_layouts
node_searchform -->|"navigates with criteria"| node_searchpage
node_searchpage -->|"passes search criteria"| node_results
node_results -->|"reads properties"| node_propertydata
node_results -->|"opens details"| node_properties
node_app -->|"routes booking pages"| node_calendarpages
node_calendarpages -->|"renders calendar features"| node_calendar
node_app -->|"routes property pages"| node_propertyadmin
node_app -->|"routes user pages"| node_users
node_app -->|"routes finance pages"| node_financials
node_app -->|"routes experience pages"| node_experiences
node_app -->|"routes blog pages"| node_blogs
node_app -->|"routes notification pages"| node_notifications
node_app -->|"routes settings pages"| node_settings

click node_app "https://github.com/shaistaaman/portal/blob/main/src/App.tsx"
click node_auth "https://github.com/shaistaaman/portal/blob/main/src/auth/AuthContext.tsx"
click node_role "https://github.com/shaistaaman/portal/blob/main/src/routes/RoleRoute.tsx"
click node_layouts "https://github.com/shaistaaman/portal/tree/main/src/layouts"
click node_login "https://github.com/shaistaaman/portal/tree/main/src/pages/auth"
click node_searchform "https://github.com/shaistaaman/portal/blob/main/src/components/search/PropertySearch.tsx"
click node_searchpage "https://github.com/shaistaaman/portal/blob/main/src/pages/search/RoleSearchResultsPage.tsx"
click node_results "https://github.com/shaistaaman/portal/blob/main/src/features/search/SearchResults.tsx"
click node_properties "https://github.com/shaistaaman/portal/blob/main/src/pages/shared/PropertyDetailPage.tsx"
click node_propertydata "https://github.com/shaistaaman/portal/blob/main/src/data/properties.ts"
click node_calendar "https://github.com/shaistaaman/portal/tree/main/src/features/calendar"
click node_calendarpages "https://github.com/shaistaaman/portal/tree/main/src/pages/calendar"
click node_propertyadmin "https://github.com/shaistaaman/portal/tree/main/src/features/properties"
click node_users "https://github.com/shaistaaman/portal/tree/main/src/features/user-management"
click node_financials "https://github.com/shaistaaman/portal/tree/main/src/features/financials"
click node_experiences "https://github.com/shaistaaman/portal/tree/main/src/features/experiences"
click node_blogs "https://github.com/shaistaaman/portal/tree/main/src/features/blogs"
click node_notifications "https://github.com/shaistaaman/portal/tree/main/src/features/notifications"
click node_settings "https://github.com/shaistaaman/portal/blob/main/src/features/settings/AccountSettings.tsx"

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_auth,node_role,node_layouts,node_login,node_visitor toneBlue
class node_searchform,node_searchpage,node_results,node_properties,node_propertydata toneAmber
class node_calendar,node_calendarpages toneMint
class node_propertyadmin,node_users,node_financials toneRose
class node_experiences,node_blogs,node_notifications,node_settings toneIndigo
```

## Components

### Application and access

- [App router](https://github.com/shaistaaman/portal/blob/main/src/App.tsx): `src/App.tsx`
- [Auth context](https://github.com/shaistaaman/portal/blob/main/src/auth/AuthContext.tsx): `src/auth/AuthContext.tsx`
- [Role guard](https://github.com/shaistaaman/portal/blob/main/src/routes/RoleRoute.tsx): `src/routes/RoleRoute.tsx`
- [Role layouts](https://github.com/shaistaaman/portal/tree/main/src/layouts): `src/layouts`
- [Login and signup](https://github.com/shaistaaman/portal/tree/main/src/pages/auth): `src/pages/auth`

### Property discovery

- [Property search](https://github.com/shaistaaman/portal/blob/main/src/components/search/PropertySearch.tsx): `src/components/search/PropertySearch.tsx`
- [Search results page](https://github.com/shaistaaman/portal/blob/main/src/pages/search/RoleSearchResultsPage.tsx): `src/pages/search/RoleSearchResultsPage.tsx`
- [Filter and results](https://github.com/shaistaaman/portal/blob/main/src/features/search/SearchResults.tsx): `src/features/search/SearchResults.tsx`
- [Property details](https://github.com/shaistaaman/portal/blob/main/src/pages/shared/PropertyDetailPage.tsx): `src/pages/shared/PropertyDetailPage.tsx`
- [Property sample data](https://github.com/shaistaaman/portal/blob/main/src/data/properties.ts): `src/data/properties.ts`

### Bookings and calendar

- [Calendar and bookings](https://github.com/shaistaaman/portal/tree/main/src/features/calendar): `src/features/calendar`
- [Calendar pages](https://github.com/shaistaaman/portal/tree/main/src/pages/calendar): `src/pages/calendar`

### Property operations

- [Property management](https://github.com/shaistaaman/portal/tree/main/src/features/properties): `src/features/properties`
- [User management](https://github.com/shaistaaman/portal/tree/main/src/features/user-management): `src/features/user-management`
- [Financial records](https://github.com/shaistaaman/portal/tree/main/src/features/financials): `src/features/financials`

### Portal features

- [Experiences and packages](https://github.com/shaistaaman/portal/tree/main/src/features/experiences): `src/features/experiences`
- [Blog management](https://github.com/shaistaaman/portal/tree/main/src/features/blogs): `src/features/blogs`
- [Notifications](https://github.com/shaistaaman/portal/tree/main/src/features/notifications): `src/features/notifications`
- [Account settings](https://github.com/shaistaaman/portal/blob/main/src/features/settings/AccountSettings.tsx): `src/features/settings/AccountSettings.tsx`

### Other components

- **Portal user**

## Connections

- Portal user → App router: opens portal
- App router → Auth context: provides auth
- App router → Login and signup: routes unauthenticated
- App router → Role guard: routes protected areas
- Role guard → Auth context: checks role
- Role guard → Role layouts: renders role layout
- Property search → Search results page: navigates with criteria
- Search results page → Filter and results: passes search criteria
- Filter and results → Property sample data: reads properties
- Filter and results → Property details: opens details
- App router → Calendar pages: routes booking pages
- Calendar pages → Calendar and bookings: renders calendar features
- App router → Property management: routes property pages
- App router → User management: routes user pages
- App router → Financial records: routes finance pages
- App router → Experiences and packages: routes experience pages
- App router → Blog management: routes blog pages
- App router → Notifications: routes notification pages
- App router → Account settings: routes settings pages
