# globussoft-technologies/voyagr architecture

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

- Interactive diagram: https://gitdiagram.com/globussoft-technologies/voyagr
- Repository: https://github.com/globussoft-technologies/voyagr
- Video tour (about a minute): https://gitdiagram.com/globussoft-technologies/voyagr/video

## Overview

Voyagr is a multi-tenant travel-industry CMS. Its main workflow is tenant staff authoring and publishing pages or blog posts, then visitors discovering and reading that content on a tenant’s domain. The graph also shows media, theme and navigation configuration, newsletter and analytics capabilities, and the shared persistence and tenant-routing layers. Dashboard-to-API and public-site data access reflect the documented product structure; sampled excerpts confirm specific route-to-database and upload-to-storage behavior, but not every runtime connection.

Main entry points: [`src/app/dashboard`](https://github.com/globussoft-technologies/voyagr/tree/main/src/app/dashboard) (Admin dashboard), [`src/lib/db.ts`](https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/db.ts) (MySQL data), [`src/app/sites/[domain]`](https://github.com/globussoft-technologies/voyagr/tree/main/src/app/sites/%5Bdomain%5D) (Tenant public site), [`src/auth.ts`](https://github.com/globussoft-technologies/voyagr/blob/main/src/auth.ts) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and tenants"]
  node_team_api["Team API<br/>[route.ts]"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_middleware["Domain routing<br/>[middleware.ts]"]
  node_domain["Domain resolution<br/>[domain.ts]"]
end

subgraph group_authoring["Content management"]
  node_dashboard["Admin dashboard"]
  node_content_api["Pages and posts API"]
  node_posts_api["Posts API"]
  node_editor["Rich editor<br/>[RichEditor.tsx]"]
  node_media_api["Media API<br/>[route.ts]"]
  node_media_storage["File storage<br/>[storage.ts]"]
  node_menu_api["Menu API<br/>[route.ts]"]
end

subgraph group_publishing["Public experience"]
  node_tenant_public["Tenant public site"]
  node_themes["Theme layouts"]
  node_search["Public search<br/>[route.ts]"]
end

subgraph group_engagement["Marketing and insights"]
  node_newsletter["Newsletter system"]
  node_analytics["Analytics"]
end

subgraph group_platform["Shared services"]
  node_db[("MySQL data<br/>[db.ts]")]
  node_tenant_helpers["Tenant helpers<br/>[tenant.ts]"]
  node_email["Email delivery<br/>[email.ts]"]
end

node_staff(("Tenant staff"))
node_visitors(("Site visitors"))
node_smtp["SMTP service"]

node_staff -->|"manages"| node_dashboard
node_dashboard -->|"authenticates"| node_auth
node_dashboard -->|"manages pages"| node_content_api
node_dashboard -->|"manages posts"| node_posts_api
node_dashboard -->|"edits content"| node_editor
node_dashboard -->|"manages media"| node_media_api
node_media_api -->|"stores files"| node_media_storage
node_media_api -->|"writes metadata"| node_db
node_dashboard -->|"configures navigation"| node_menu_api
node_dashboard -->|"manages team"| node_team_api
node_content_api -->|"checks session"| node_auth
node_posts_api -->|"checks session"| node_auth
node_team_api -->|"checks session"| node_auth
node_content_api -->|"validates slugs"| node_tenant_helpers
node_content_api -->|"reads and writes"| node_db
node_posts_api -->|"reads and writes"| node_db
node_menu_api -->|"reads and writes"| node_db
node_team_api -->|"reads and writes"| node_db
node_middleware -->|"resolves tenant"| node_domain
node_middleware -->|"routes requests"| node_tenant_public
node_visitors -->|"visits site"| node_tenant_public
node_tenant_public -->|"renders theme"| node_themes
node_tenant_public -->|"searches content"| node_search
node_search -->|"queries published content"| node_db
node_tenant_public -->|"subscribes"| node_newsletter
node_newsletter -->|"stores subscribers"| node_db
node_dashboard -->|"builds campaigns"| node_newsletter
node_newsletter -->|"sends campaigns"| node_email
node_email -.->|"delivers mail"| node_smtp
node_tenant_public -->|"tracks views"| node_analytics
node_analytics -->|"records and reports"| node_db
node_auth -->|"reads identity data"| node_db

click node_dashboard "https://github.com/globussoft-technologies/voyagr/tree/main/src/app/dashboard"
click node_content_api "https://github.com/globussoft-technologies/voyagr/tree/main/src/app/api/pages"
click node_posts_api "https://github.com/globussoft-technologies/voyagr/tree/main/src/app/api/posts"
click node_editor "https://github.com/globussoft-technologies/voyagr/blob/main/src/components/editor/RichEditor.tsx"
click node_media_api "https://github.com/globussoft-technologies/voyagr/blob/main/src/app/api/media/route.ts"
click node_media_storage "https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/storage.ts"
click node_menu_api "https://github.com/globussoft-technologies/voyagr/blob/main/src/app/api/menus/route.ts"
click node_team_api "https://github.com/globussoft-technologies/voyagr/blob/main/src/app/api/team/route.ts"
click node_auth "https://github.com/globussoft-technologies/voyagr/blob/main/src/auth.ts"
click node_middleware "https://github.com/globussoft-technologies/voyagr/blob/main/src/middleware.ts"
click node_domain "https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/domain.ts"
click node_tenant_public "https://github.com/globussoft-technologies/voyagr/tree/main/src/app/sites/%5Bdomain%5D"
click node_themes "https://github.com/globussoft-technologies/voyagr/tree/main/src/themes"
click node_search "https://github.com/globussoft-technologies/voyagr/blob/main/src/app/api/search/route.ts"
click node_newsletter "https://github.com/globussoft-technologies/voyagr/tree/main/src/app/api/newsletter"
click node_analytics "https://github.com/globussoft-technologies/voyagr/tree/main/src/app/api/analytics"
click node_db "https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/db.ts"
click node_tenant_helpers "https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/tenant.ts"
click node_email "https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/email.ts"

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_team_api,node_auth,node_middleware,node_domain toneBlue
class node_dashboard,node_content_api,node_posts_api,node_editor,node_media_api,node_media_storage,node_menu_api toneAmber
class node_tenant_public,node_themes,node_search toneMint
class node_newsletter,node_analytics toneRose
class node_db,node_tenant_helpers,node_email,node_staff,node_visitors,node_smtp toneIndigo
```

## Components

### Identity and tenants

- [Team API](https://github.com/globussoft-technologies/voyagr/blob/main/src/app/api/team/route.ts): `src/app/api/team/route.ts`
- [Authentication](https://github.com/globussoft-technologies/voyagr/blob/main/src/auth.ts): `src/auth.ts`
- [Domain routing](https://github.com/globussoft-technologies/voyagr/blob/main/src/middleware.ts): `src/middleware.ts`
- [Domain resolution](https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/domain.ts): `src/lib/domain.ts`

### Content management

- [Admin dashboard](https://github.com/globussoft-technologies/voyagr/tree/main/src/app/dashboard): `src/app/dashboard`
- [Pages and posts API](https://github.com/globussoft-technologies/voyagr/tree/main/src/app/api/pages): `src/app/api/pages`
- [Posts API](https://github.com/globussoft-technologies/voyagr/tree/main/src/app/api/posts): `src/app/api/posts`
- [Rich editor](https://github.com/globussoft-technologies/voyagr/blob/main/src/components/editor/RichEditor.tsx): `src/components/editor/RichEditor.tsx`
- [Media API](https://github.com/globussoft-technologies/voyagr/blob/main/src/app/api/media/route.ts): `src/app/api/media/route.ts`
- [File storage](https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/storage.ts): `src/lib/storage.ts`
- [Menu API](https://github.com/globussoft-technologies/voyagr/blob/main/src/app/api/menus/route.ts): `src/app/api/menus/route.ts`

### Public experience

- [Tenant public site](https://github.com/globussoft-technologies/voyagr/tree/main/src/app/sites/%5Bdomain%5D): `src/app/sites/[domain]`
- [Theme layouts](https://github.com/globussoft-technologies/voyagr/tree/main/src/themes): `src/themes`
- [Public search](https://github.com/globussoft-technologies/voyagr/blob/main/src/app/api/search/route.ts): `src/app/api/search/route.ts`

### Marketing and insights

- [Newsletter system](https://github.com/globussoft-technologies/voyagr/tree/main/src/app/api/newsletter): `src/app/api/newsletter`
- [Analytics](https://github.com/globussoft-technologies/voyagr/tree/main/src/app/api/analytics): `src/app/api/analytics`

### Shared services

- [MySQL data](https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/db.ts): `src/lib/db.ts`
- [Tenant helpers](https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/tenant.ts): `src/lib/tenant.ts`
- [Email delivery](https://github.com/globussoft-technologies/voyagr/blob/main/src/lib/email.ts): `src/lib/email.ts`

### Other components

- **Tenant staff**
- **Site visitors**
- **SMTP service**

## Connections

- Tenant staff → Admin dashboard: manages
- Admin dashboard → Authentication: authenticates
- Admin dashboard → Pages and posts API: manages pages
- Admin dashboard → Posts API: manages posts
- Admin dashboard → Rich editor: edits content
- Admin dashboard → Media API: manages media
- Media API → File storage: stores files
- Media API → MySQL data: writes metadata
- Admin dashboard → Menu API: configures navigation
- Admin dashboard → Team API: manages team
- Pages and posts API → Authentication: checks session
- Posts API → Authentication: checks session
- Team API → Authentication: checks session
- Pages and posts API → Tenant helpers: validates slugs
- Pages and posts API → MySQL data: reads and writes
- Posts API → MySQL data: reads and writes
- Menu API → MySQL data: reads and writes
- Team API → MySQL data: reads and writes
- Domain routing → Domain resolution: resolves tenant
- Domain routing → Tenant public site: routes requests
- Site visitors → Tenant public site: visits site
- Tenant public site → Theme layouts: renders theme
- Tenant public site → Public search: searches content
- Public search → MySQL data: queries published content
- Tenant public site → Newsletter system: subscribes
- Newsletter system → MySQL data: stores subscribers
- Admin dashboard → Newsletter system: builds campaigns
- Newsletter system → Email delivery: sends campaigns
- Email delivery → SMTP service: delivers mail
- Tenant public site → Analytics: tracks views
- Analytics → MySQL data: records and reports
- Authentication → MySQL data: reads identity data
