# himmatmundhe07/myitnary architecture

> Architecture diagram of the GitHub repository himmatmundhe07/myitnary, 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/himmatmundhe07/myitnary
- Repository: https://github.com/himmatmundhe07/myitnary

## Overview

My Itinerary is a travel-planning application whose central journey is: a traveler enters trip preferences, receives a personalized itinerary grounded in real places and routes, then views and manages the trip. The React client also supports account setup, discovery, healthcare lookup, and SOS safety; the Express API handles authentication and product services. The README documents PDF export, maps, and Google integrations, but their client implementation is not included in the sampled source, so those connections are represented only where supported by documentation. Auth and SOS server behavior is sampled; trip-service wiring is not.

Main entry points: [`client/src/api/axios.js`](https://github.com/himmatmundhe07/myitnary/blob/main/client/src/api/axios.js) (HTTP client), [`client/src/App.jsx`](https://github.com/himmatmundhe07/myitnary/blob/main/client/src/App.jsx) (React application), [`server/services/gemini.service.js`](https://github.com/himmatmundhe07/myitnary/blob/main/server/services/gemini.service.js) (Itinerary grounding), [`server/index.js`](https://github.com/himmatmundhe07/myitnary/blob/main/server/index.js) (Express API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Travel client"]
  node_app["React application<br/>[App.jsx]"]
  node_public["Public pages<br/>[PublicRoutes.jsx]"]
  node_dashboard["Account pages"]
end

subgraph group_trip["Trip planning"]
  node_tripflow["Trip creation and views"]
  node_tripstate["Trip state<br/>[tripSlice.js]"]
  node_discovery["Place discovery"]
  node_triproutes["Trip endpoints<br/>[tripRoutes.js]"]
  node_gemini["Itinerary grounding<br/>[gemini.service.js]"]
  node_tripdb[("Saved trips<br/>[Trip.js]")]
end

subgraph group_identity["Identity and safety"]
  node_account["Profile and preferences"]
  node_authpages["Sign-in and signup"]
  node_authstate["Authentication state<br/>[authSlice.js]"]
  node_safetyui["SOS and guardians"]
  node_authroutes["Auth endpoints<br/>[authRoutes.js]"]
  node_authcontroller["Auth operations<br/>[authController.js]"]
  node_sosroutes["SOS endpoints<br/>[sosRoutes.js]"]
  node_users[("User records<br/>[User.js]")]
end

subgraph group_services["API and integrations"]
  node_http["HTTP client<br/>[axios.js]"]
  node_api["Express API<br/>[index.js]"]
  node_placecache[("Place cache<br/>[PlaceCache.js]")]
  node_routecache[("Route cache<br/>[RouteCache.js]")]
  node_email["Email delivery<br/>[emailService.js]"]
end

subgraph group_health["Healthcare"]
  node_healthui["Healthcare finder"]
  node_healthroutes["Healthcare data"]
end

node_traveler(("Traveler"))
node_geminisvc["Gemini AI"]
node_googlemaps["Google Places and Routes"]
node_mailservice["Mail provider"]
node_database[("MongoDB")]

node_traveler -->|"uses"| node_app
node_app -->|"routes to"| node_public
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_tripflow
node_app -->|"routes to"| node_healthui
node_app -->|"routes to"| node_safetyui
node_public -->|"routes to"| node_authpages
node_dashboard -->|"routes to"| node_account
node_tripflow -->|"requests"| node_http
node_tripflow -->|"updates"| node_tripstate
node_discovery -->|"requests"| node_http
node_account -->|"requests"| node_http
node_authpages -->|"requests"| node_http
node_authpages -->|"updates"| node_authstate
node_safetyui -->|"requests"| node_http
node_healthui -->|"requests"| node_http
node_http -->|"HTTP requests"| node_api
node_api -->|"dispatches"| node_authroutes
node_api -->|"dispatches"| node_triproutes
node_api -->|"dispatches"| node_healthroutes
node_api -->|"dispatches"| node_sosroutes
node_authroutes -->|"calls"| node_authcontroller
node_authcontroller -->|"reads/writes"| node_users
node_authcontroller -->|"sends OTP"| node_email
node_email -->|"delivers"| node_mailservice
node_sosroutes -->|"reads/writes"| node_users
node_sosroutes -->|"sends alert"| node_mailservice
node_triproutes -->|"manages trips"| node_tripdb
node_triproutes -.->|"generates itinerary"| node_gemini
node_gemini -->|"generates content"| node_geminisvc
node_gemini -->|"grounds places and routes"| node_googlemaps
node_gemini -->|"reads/writes"| node_placecache
node_gemini -->|"reads/writes"| node_routecache
node_healthroutes -->|"serves listings"| node_healthui
node_users -->|"persists in"| node_database
node_tripdb -->|"persists in"| node_database
node_placecache -->|"persists in"| node_database
node_routecache -->|"persists in"| node_database

click node_app "https://github.com/himmatmundhe07/myitnary/blob/main/client/src/App.jsx"
click node_public "https://github.com/himmatmundhe07/myitnary/blob/main/client/src/routes/PublicRoutes.jsx"
click node_dashboard "https://github.com/himmatmundhe07/myitnary/blob/main/client/src/routes/DashboardRoutes.jsx"
click node_tripflow "https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/trips"
click node_tripstate "https://github.com/himmatmundhe07/myitnary/blob/main/client/src/store/tripSlice.js"
click node_discovery "https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/discover"
click node_account "https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/account"
click node_authpages "https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/auth"
click node_authstate "https://github.com/himmatmundhe07/myitnary/blob/main/client/src/store/authSlice.js"
click node_safetyui "https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/safety"
click node_healthui "https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/healthcare"
click node_http "https://github.com/himmatmundhe07/myitnary/blob/main/client/src/api/axios.js"
click node_api "https://github.com/himmatmundhe07/myitnary/blob/main/server/index.js"
click node_authroutes "https://github.com/himmatmundhe07/myitnary/blob/main/server/routes/authRoutes.js"
click node_authcontroller "https://github.com/himmatmundhe07/myitnary/blob/main/server/controllers/authController.js"
click node_sosroutes "https://github.com/himmatmundhe07/myitnary/blob/main/server/routes/sosRoutes.js"
click node_triproutes "https://github.com/himmatmundhe07/myitnary/blob/main/server/routes/tripRoutes.js"
click node_gemini "https://github.com/himmatmundhe07/myitnary/blob/main/server/services/gemini.service.js"
click node_tripdb "https://github.com/himmatmundhe07/myitnary/blob/main/server/models/Trip.js"
click node_users "https://github.com/himmatmundhe07/myitnary/blob/main/server/models/User.js"
click node_healthroutes "https://github.com/himmatmundhe07/myitnary/blob/main/server/routes/healthcareRoutes.js"
click node_placecache "https://github.com/himmatmundhe07/myitnary/blob/main/server/models/PlaceCache.js"
click node_routecache "https://github.com/himmatmundhe07/myitnary/blob/main/server/models/RouteCache.js"
click node_email "https://github.com/himmatmundhe07/myitnary/blob/main/server/services/emailService.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_public,node_dashboard toneBlue
class node_tripflow,node_tripstate,node_discovery,node_triproutes,node_gemini,node_tripdb,node_database toneAmber
class node_account,node_authpages,node_authstate,node_safetyui,node_authroutes,node_authcontroller,node_sosroutes,node_users,node_googlemaps toneMint
class node_http,node_api,node_placecache,node_routecache,node_email toneRose
class node_healthui,node_healthroutes,node_traveler,node_geminisvc,node_mailservice toneIndigo
```

## Components

### Travel client

- [React application](https://github.com/himmatmundhe07/myitnary/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Public pages](https://github.com/himmatmundhe07/myitnary/blob/main/client/src/routes/PublicRoutes.jsx): `client/src/routes/PublicRoutes.jsx`
- [Account pages](https://github.com/himmatmundhe07/myitnary/blob/main/client/src/routes/DashboardRoutes.jsx): `client/src/routes/DashboardRoutes.jsx`

### Trip planning

- [Trip creation and views](https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/trips): `client/src/pages/trips`
- [Trip state](https://github.com/himmatmundhe07/myitnary/blob/main/client/src/store/tripSlice.js): `client/src/store/tripSlice.js`
- [Place discovery](https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/discover): `client/src/pages/discover`
- [Trip endpoints](https://github.com/himmatmundhe07/myitnary/blob/main/server/routes/tripRoutes.js): `server/routes/tripRoutes.js`
- [Itinerary grounding](https://github.com/himmatmundhe07/myitnary/blob/main/server/services/gemini.service.js): `server/services/gemini.service.js`
- [Saved trips](https://github.com/himmatmundhe07/myitnary/blob/main/server/models/Trip.js): `server/models/Trip.js`

### Identity and safety

- [Profile and preferences](https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/account): `client/src/pages/account`
- [Sign-in and signup](https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/auth): `client/src/pages/auth`
- [Authentication state](https://github.com/himmatmundhe07/myitnary/blob/main/client/src/store/authSlice.js): `client/src/store/authSlice.js`
- [SOS and guardians](https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/safety): `client/src/pages/safety`
- [Auth endpoints](https://github.com/himmatmundhe07/myitnary/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Auth operations](https://github.com/himmatmundhe07/myitnary/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [SOS endpoints](https://github.com/himmatmundhe07/myitnary/blob/main/server/routes/sosRoutes.js): `server/routes/sosRoutes.js`
- [User records](https://github.com/himmatmundhe07/myitnary/blob/main/server/models/User.js): `server/models/User.js`

### API and integrations

- [HTTP client](https://github.com/himmatmundhe07/myitnary/blob/main/client/src/api/axios.js): `client/src/api/axios.js`
- [Express API](https://github.com/himmatmundhe07/myitnary/blob/main/server/index.js): `server/index.js`
- [Place cache](https://github.com/himmatmundhe07/myitnary/blob/main/server/models/PlaceCache.js): `server/models/PlaceCache.js`
- [Route cache](https://github.com/himmatmundhe07/myitnary/blob/main/server/models/RouteCache.js): `server/models/RouteCache.js`
- [Email delivery](https://github.com/himmatmundhe07/myitnary/blob/main/server/services/emailService.js): `server/services/emailService.js`

### Healthcare

- [Healthcare finder](https://github.com/himmatmundhe07/myitnary/tree/main/client/src/pages/healthcare): `client/src/pages/healthcare`
- [Healthcare data](https://github.com/himmatmundhe07/myitnary/blob/main/server/routes/healthcareRoutes.js): `server/routes/healthcareRoutes.js`

### Other components

- **Traveler**
- **Gemini AI**
- **Google Places and Routes**
- **Mail provider**
- **MongoDB**

## Connections

- Traveler → React application: uses
- React application → Public pages: routes to
- React application → Account pages: routes to
- React application → Trip creation and views: routes to
- React application → Healthcare finder: routes to
- React application → SOS and guardians: routes to
- Public pages → Sign-in and signup: routes to
- Account pages → Profile and preferences: routes to
- Trip creation and views → HTTP client: requests
- Trip creation and views → Trip state: updates
- Place discovery → HTTP client: requests
- Profile and preferences → HTTP client: requests
- Sign-in and signup → HTTP client: requests
- Sign-in and signup → Authentication state: updates
- SOS and guardians → HTTP client: requests
- Healthcare finder → HTTP client: requests
- HTTP client → Express API: HTTP requests
- Express API → Auth endpoints: dispatches
- Express API → Trip endpoints: dispatches
- Express API → Healthcare data: dispatches
- Express API → SOS endpoints: dispatches
- Auth endpoints → Auth operations: calls
- Auth operations → User records: reads/writes
- Auth operations → Email delivery: sends OTP
- Email delivery → Mail provider: delivers
- SOS endpoints → User records: reads/writes
- SOS endpoints → Mail provider: sends alert
- Trip endpoints → Saved trips: manages trips
- Trip endpoints → Itinerary grounding: generates itinerary
- Itinerary grounding → Gemini AI: generates content
- Itinerary grounding → Google Places and Routes: grounds places and routes
- Itinerary grounding → Place cache: reads/writes
- Itinerary grounding → Route cache: reads/writes
- Healthcare data → Healthcare finder: serves listings
- User records → MongoDB: persists in
- Saved trips → MongoDB: persists in
- Place cache → MongoDB: persists in
- Route cache → MongoDB: persists in
