# mohameden19961/aurora-travels architecture

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

- Interactive diagram: https://gitdiagram.com/mohameden19961/aurora-travels
- Repository: https://github.com/mohameden19961/aurora-travels

## Overview

Aurora Travels is a travel-planning website with trip-request intake, staff management and email outreach, plus email-verified account registration. The main customer flow sends a trip form from the browser to the server, which saves the request and emails the travel team. Staff can review and maintain requests and send individual or broadcast emails; registrants can request and verify one-time codes. The excerpts show the server, database and email-template responsibilities; page markup and some server sections were not sampled, so those details are omitted.

Main entry points: [`server.js`](https://github.com/mohameden19961/aurora-travels/blob/master/server.js) (Trip request API), [`db.js`](https://github.com/mohameden19961/aurora-travels/blob/master/db.js) (SQLite records), [`email-template.js`](https://github.com/mohameden19961/aurora-travels/blob/master/email-template.js) (Email templates), [`public/app.js`](https://github.com/mohameden19961/aurora-travels/blob/master/public/app.js) (Trip form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_landing["Trip planner page<br/>[index.html]"]
  node_tripform["Trip form<br/>[app.js]"]
  node_adminpage["Staff admin page<br/>[admin.html]"]
  node_adminui["Request admin UI<br/>[admin.js]"]
  node_signuppage["Signup page<br/>[signup.html]"]
  node_signupui["Signup and OTP UI<br/>[signup.js]"]
end

subgraph group_api["Application workflows"]
  node_tripapi["Trip request API<br/>[server.js]"]
  node_adminapi["Staff request and mail API<br/>[server.js]"]
  node_authapi["Registration and OTP API<br/>[server.js]"]
end

subgraph group_persistence["Persistence"]
  node_store[("SQLite records<br/>[db.js]")]
end

subgraph group_messaging["Email delivery"]
  node_templates["Email templates<br/>[email-template.js]"]
end

node_traveler(("Traveler"))
node_staff(("Travel staff"))
node_browser(("Web browser"))
node_gmail["Gmail SMTP"]

node_traveler -->|"uses"| node_browser
node_staff -->|"uses"| node_browser
node_browser -.->|"requests page"| node_landing
node_browser -.->|"requests page"| node_adminpage
node_browser -.->|"requests page"| node_signuppage
node_tripform -->|"POSTs request"| node_tripapi
node_adminui -->|"calls admin routes"| node_adminapi
node_signupui -->|"calls auth routes"| node_authapi
node_tripapi -->|"saves request"| node_store
node_adminapi -->|"reads and edits"| node_store
node_adminapi -->|"builds email"| node_templates
node_adminapi -->|"sends email"| node_gmail
node_authapi -->|"manages users and codes"| node_store
node_authapi -->|"builds code email"| node_templates
node_authapi -->|"sends code"| node_gmail
node_tripapi -->|"builds request email"| node_templates
node_tripapi -->|"sends request"| node_gmail

click node_landing "https://github.com/mohameden19961/aurora-travels/blob/master/public/index.html"
click node_tripform "https://github.com/mohameden19961/aurora-travels/blob/master/public/app.js"
click node_adminpage "https://github.com/mohameden19961/aurora-travels/blob/master/public/admin.html"
click node_adminui "https://github.com/mohameden19961/aurora-travels/blob/master/public/admin.js"
click node_signuppage "https://github.com/mohameden19961/aurora-travels/blob/master/public/signup.html"
click node_signupui "https://github.com/mohameden19961/aurora-travels/blob/master/public/signup.js"
click node_tripapi "https://github.com/mohameden19961/aurora-travels/blob/master/server.js"
click node_adminapi "https://github.com/mohameden19961/aurora-travels/blob/master/server.js"
click node_authapi "https://github.com/mohameden19961/aurora-travels/blob/master/server.js"
click node_store "https://github.com/mohameden19961/aurora-travels/blob/master/db.js"
click node_templates "https://github.com/mohameden19961/aurora-travels/blob/master/email-template.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_landing,node_tripform,node_adminpage,node_adminui,node_signuppage,node_signupui,node_browser toneBlue
class node_tripapi,node_adminapi,node_authapi toneAmber
class node_store toneMint
class node_templates toneRose
class node_traveler,node_staff,node_gmail toneIndigo
```

## Components

### Web experience

- [Trip planner page](https://github.com/mohameden19961/aurora-travels/blob/master/public/index.html): `public/index.html`
- [Trip form](https://github.com/mohameden19961/aurora-travels/blob/master/public/app.js): `public/app.js`
- [Staff admin page](https://github.com/mohameden19961/aurora-travels/blob/master/public/admin.html): `public/admin.html`
- [Request admin UI](https://github.com/mohameden19961/aurora-travels/blob/master/public/admin.js): `public/admin.js`
- [Signup page](https://github.com/mohameden19961/aurora-travels/blob/master/public/signup.html): `public/signup.html`
- [Signup and OTP UI](https://github.com/mohameden19961/aurora-travels/blob/master/public/signup.js): `public/signup.js`

### Application workflows

- [Trip request API](https://github.com/mohameden19961/aurora-travels/blob/master/server.js): `server.js`
- [Staff request and mail API](https://github.com/mohameden19961/aurora-travels/blob/master/server.js): `server.js`
- [Registration and OTP API](https://github.com/mohameden19961/aurora-travels/blob/master/server.js): `server.js`

### Persistence

- [SQLite records](https://github.com/mohameden19961/aurora-travels/blob/master/db.js): `db.js`

### Email delivery

- [Email templates](https://github.com/mohameden19961/aurora-travels/blob/master/email-template.js): `email-template.js`

### Other components

- **Traveler**
- **Travel staff**
- **Web browser**
- **Gmail SMTP**

## Connections

- Traveler → Web browser: uses
- Travel staff → Web browser: uses
- Web browser → Trip planner page: requests page
- Web browser → Staff admin page: requests page
- Web browser → Signup page: requests page
- Trip form → Trip request API: POSTs request (evidence: `public/app.js`)
- Request admin UI → Staff request and mail API: calls admin routes (evidence: `public/admin.js`)
- Signup and OTP UI → Registration and OTP API: calls auth routes (evidence: `public/signup.js`)
- Trip request API → SQLite records: saves request (evidence: `server.js`)
- Staff request and mail API → SQLite records: reads and edits (evidence: `server.js`)
- Staff request and mail API → Email templates: builds email (evidence: `server.js`)
- Staff request and mail API → Gmail SMTP: sends email (evidence: `server.js`)
- Registration and OTP API → SQLite records: manages users and codes (evidence: `server.js`)
- Registration and OTP API → Email templates: builds code email (evidence: `server.js`)
- Registration and OTP API → Gmail SMTP: sends code (evidence: `server.js`)
- Trip request API → Email templates: builds request email (evidence: `server.js`)
- Trip request API → Gmail SMTP: sends request (evidence: `server.js`)
