# anmolrawat990/sentinaut architecture

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

- Interactive diagram: https://gitdiagram.com/anmolrawat990/sentinaut
- Repository: https://github.com/anmolrawat990/sentinaut

## Overview

SentiNaut is a homestay and resort reputation-operations platform. Staff submit guest reviews; the backend processes and stores them, while managers track resulting operational actions and owners view performance and competitor benchmarks. The frontend also supports guest checkout logging, invitations, subscriptions, and role-based dashboards. Source excerpts show backend routing, MongoDB collections, AI services, and frontend route composition; several feature implementations are unsampled, so their links are documented capabilities rather than asserted internal call chains.

Main entry points: [`backend/main.py`](https://github.com/anmolrawat990/sentinaut/blob/main/backend/main.py) (API and domain workflows), [`frontend/src/App.jsx`](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/App.jsx) (Application routes), [`frontend/src/pages/dashboards/ReviewsIndex.jsx`](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/ReviewsIndex.jsx) (Review workspace), [`backend/services/ai_service.py`](https://github.com/anmolrawat990/sentinaut/blob/main/backend/services/ai_service.py) (Review AI pipeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web experience"]
  node_app["Application routes<br/>[App.jsx]"]
  node_dashboard["Role dashboards<br/>[DashboardIndex.jsx]"]
  node_ownerui["Owner analytics<br/>[OwnerDashboard.jsx]"]
  node_settings["Property settings<br/>[SettingsPage.jsx]"]
end

subgraph group_feedback["Feedback operations"]
  node_reviewsui["Review workspace<br/>[ReviewsIndex.jsx]"]
  node_managerui["Action tracker"]
  node_guestui["Guest intelligence<br/>[GuestsIndex.jsx]"]
  node_suggestions["AI suggestions"]
  node_api["API and domain workflows<br/>[main.py]"]
  node_schemas["Domain schemas<br/>[schemas.py]"]
  node_ai["Review AI pipeline<br/>[ai_service.py]"]
end

subgraph group_identity["Access and teams"]
  node_authui["Auth state<br/>[AuthContext.jsx]"]
  node_login["Login and signup<br/>[LoginPage.jsx]"]
  node_email["Email delivery<br/>[email_service.py]"]
end

subgraph group_platform["Platform services"]
  node_mongo[("Domain collections<br/>[database.py]")]
  node_payments["Subscription payments<br/>[payment_service.py]"]
end

node_staff(("Staff"))
node_manager(("Manager"))
node_owner(("Owner"))
node_gemini["Gemini AI"]
node_smtp["SMTP mail"]
node_razorpay["Razorpay"]
node_database[("MongoDB")]

node_staff -->|"uses"| node_app
node_manager -->|"uses"| node_app
node_owner -->|"uses"| node_app
node_app -->|"provides auth"| node_authui
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_reviewsui
node_staff -.->|"submits reviews"| node_reviewsui
node_reviewsui -.->|"calls review APIs"| node_api
node_api -->|"processes reviews"| node_ai
node_api -->|"validates data"| node_schemas
node_api -->|"reads and writes"| node_mongo
node_ai -->|"requests generation"| node_gemini
node_api -.->|"serves action workflows"| node_managerui
node_manager -->|"tracks tasks"| node_managerui
node_api -.->|"serves suggestions"| node_suggestions
node_api -.->|"serves guest records"| node_guestui
node_api -.->|"serves analytics"| node_ownerui
node_owner -->|"views benchmarks"| node_ownerui
node_app -->|"routes to"| node_settings
node_login -.->|"updates session"| node_authui
node_api -.->|"sends messages"| node_email
node_email -->|"delivers mail"| node_smtp
node_api -->|"handles subscriptions"| node_payments
node_payments -.->|"processes payment"| node_razorpay
node_mongo -->|"stores collections"| node_database

click node_app "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/App.jsx"
click node_authui "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/context/AuthContext.jsx"
click node_login "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/public/LoginPage.jsx"
click node_dashboard "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/DashboardIndex.jsx"
click node_reviewsui "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/ReviewsIndex.jsx"
click node_managerui "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/ManagerDashboard.jsx"
click node_guestui "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/GuestsIndex.jsx"
click node_suggestions "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/SuggestionsIndex.jsx"
click node_ownerui "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/OwnerDashboard.jsx"
click node_settings "https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/SettingsPage.jsx"
click node_api "https://github.com/anmolrawat990/sentinaut/blob/main/backend/main.py"
click node_schemas "https://github.com/anmolrawat990/sentinaut/blob/main/backend/models/schemas.py"
click node_mongo "https://github.com/anmolrawat990/sentinaut/blob/main/backend/models/database.py"
click node_ai "https://github.com/anmolrawat990/sentinaut/blob/main/backend/services/ai_service.py"
click node_email "https://github.com/anmolrawat990/sentinaut/blob/main/backend/services/email_service.py"
click node_payments "https://github.com/anmolrawat990/sentinaut/blob/main/backend/services/payment_service.py"

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_dashboard,node_ownerui,node_settings toneBlue
class node_reviewsui,node_managerui,node_guestui,node_suggestions,node_api,node_schemas,node_ai,node_database toneAmber
class node_authui,node_login,node_email toneMint
class node_mongo,node_payments toneRose
class node_staff,node_manager,node_owner,node_gemini,node_smtp,node_razorpay toneIndigo
```

## Components

### Web experience

- [Application routes](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Role dashboards](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/DashboardIndex.jsx): `frontend/src/pages/dashboards/DashboardIndex.jsx`
- [Owner analytics](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/OwnerDashboard.jsx): `frontend/src/pages/dashboards/OwnerDashboard.jsx`
- [Property settings](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/SettingsPage.jsx): `frontend/src/pages/dashboards/SettingsPage.jsx`

### Feedback operations

- [Review workspace](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/ReviewsIndex.jsx): `frontend/src/pages/dashboards/ReviewsIndex.jsx`
- [Action tracker](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/ManagerDashboard.jsx): `frontend/src/pages/dashboards/ManagerDashboard.jsx`
- [Guest intelligence](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/GuestsIndex.jsx): `frontend/src/pages/dashboards/GuestsIndex.jsx`
- [AI suggestions](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/dashboards/SuggestionsIndex.jsx): `frontend/src/pages/dashboards/SuggestionsIndex.jsx`
- [API and domain workflows](https://github.com/anmolrawat990/sentinaut/blob/main/backend/main.py): `backend/main.py`
- [Domain schemas](https://github.com/anmolrawat990/sentinaut/blob/main/backend/models/schemas.py): `backend/models/schemas.py`
- [Review AI pipeline](https://github.com/anmolrawat990/sentinaut/blob/main/backend/services/ai_service.py): `backend/services/ai_service.py`

### Access and teams

- [Auth state](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Login and signup](https://github.com/anmolrawat990/sentinaut/blob/main/frontend/src/pages/public/LoginPage.jsx): `frontend/src/pages/public/LoginPage.jsx`
- [Email delivery](https://github.com/anmolrawat990/sentinaut/blob/main/backend/services/email_service.py): `backend/services/email_service.py`

### Platform services

- [Domain collections](https://github.com/anmolrawat990/sentinaut/blob/main/backend/models/database.py): `backend/models/database.py`
- [Subscription payments](https://github.com/anmolrawat990/sentinaut/blob/main/backend/services/payment_service.py): `backend/services/payment_service.py`

### Other components

- **Staff**
- **Manager**
- **Owner**
- **Gemini AI**
- **SMTP mail**
- **Razorpay**
- **MongoDB**

## Connections

- Staff → Application routes: uses (evidence: `frontend/src/App.jsx`)
- Manager → Application routes: uses (evidence: `frontend/src/App.jsx`)
- Owner → Application routes: uses (evidence: `frontend/src/App.jsx`)
- Application routes → Auth state: provides auth (evidence: `frontend/src/App.jsx`)
- Application routes → Role dashboards: routes to (evidence: `frontend/src/App.jsx`)
- Application routes → Review workspace: routes to (evidence: `frontend/src/App.jsx`)
- Staff → Review workspace: submits reviews (evidence: `README.md`)
- Review workspace → API and domain workflows: calls review APIs
- API and domain workflows → Review AI pipeline: processes reviews (evidence: `backend/main.py`)
- API and domain workflows → Domain schemas: validates data (evidence: `backend/main.py`)
- API and domain workflows → Domain collections: reads and writes (evidence: `backend/main.py`)
- Review AI pipeline → Gemini AI: requests generation (evidence: `backend/services/ai_service.py`)
- API and domain workflows → Action tracker: serves action workflows
- Manager → Action tracker: tracks tasks (evidence: `README.md`)
- API and domain workflows → AI suggestions: serves suggestions
- API and domain workflows → Guest intelligence: serves guest records
- API and domain workflows → Owner analytics: serves analytics
- Owner → Owner analytics: views benchmarks (evidence: `README.md`)
- Application routes → Property settings: routes to (evidence: `frontend/src/App.jsx`)
- Login and signup → Auth state: updates session (evidence: `frontend/src/pages/public/LoginPage.jsx`)
- API and domain workflows → Email delivery: sends messages (evidence: `backend/main.py`)
- Email delivery → SMTP mail: delivers mail (evidence: `backend/services/email_service.py`)
- API and domain workflows → Subscription payments: handles subscriptions (evidence: `backend/main.py`)
- Subscription payments → Razorpay: processes payment
- Domain collections → MongoDB: stores collections (evidence: `backend/models/database.py`)
