# fahism/unijourney-og architecture

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

- Interactive diagram: https://gitdiagram.com/fahism/unijourney-og
- Repository: https://github.com/fahism/unijourney-og

## Overview

UniJourney is documented as a multi-tenant CRM for study-abroad agencies. The principal workflow is team access through authentication and tenant/role checks, followed by scoped CRM data access for lead progression, student applications, and related university and document work. The README also describes analytics, team administration, and secure document access. Source is proprietary: only a dashboard stub is present, so most components and relationships below reflect the README’s stated architecture and capabilities, not inspected implementation.

Main entry points: [`stubs/dashboard.tsx`](https://github.com/fahism/unijourney-og/blob/main/stubs/dashboard.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Security"]
  node_client["Client App"]
  node_middleware["Auth Middleware"]
  node_supabase_auth["Supabase Auth"]
  node_access_eval["Role and Tenant Checks"]
  node_tenant_data[("Tenant-Scoped Data")]
  node_signed_urls["Signed Document URLs"]
end

subgraph group_crm["CRM Workflow"]
  node_leads["Lead Pipeline"]
  node_applications["Student Applications"]
  node_universities["University Partners"]
  node_documents["Document Handling"]
end

subgraph group_operations["Agency Operations"]
  node_dashboard["Dashboard<br/>[dashboard.tsx]"]
  node_analytics["Performance Analytics"]
  node_team_admin["Team Administration"]
end

node_team_user(("Agency Team"))

node_team_user -->|"uses"| node_client
node_client -->|"routes through"| node_middleware
node_middleware -->|"validates session"| node_supabase_auth
node_middleware -->|"checks access"| node_access_eval
node_access_eval -->|"scopes tenant"| node_tenant_data
node_client -->|"renders"| node_dashboard
node_tenant_data -->|"stores scoped data"| node_leads
node_tenant_data -->|"stores scoped data"| node_applications
node_tenant_data -->|"stores scoped data"| node_documents
node_client -->|"tracks stages"| node_leads
node_client -->|"manages"| node_applications
node_client -->|"manages"| node_universities
node_client -->|"processes securely"| node_documents
node_client -->|"presents metrics"| node_analytics
node_client -->|"administers team"| node_team_admin
node_access_eval -->|"authorizes access"| node_signed_urls
node_signed_urls -->|"grants temporary access"| node_documents

click node_dashboard "https://github.com/fahism/unijourney-og/blob/main/stubs/dashboard.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_client,node_middleware,node_supabase_auth,node_access_eval,node_tenant_data,node_signed_urls toneBlue
class node_leads,node_applications,node_universities,node_documents toneAmber
class node_dashboard,node_analytics,node_team_admin toneMint
class node_team_user toneIndigo
```

## Components

### Access and Security

- **Client App**
- **Auth Middleware**
- **Supabase Auth**
- **Role and Tenant Checks**
- **Tenant-Scoped Data**
- **Signed Document URLs**

### CRM Workflow

- **Lead Pipeline**
- **Student Applications**
- **University Partners**
- **Document Handling**

### Agency Operations

- [Dashboard](https://github.com/fahism/unijourney-og/blob/main/stubs/dashboard.tsx): `stubs/dashboard.tsx`
- **Performance Analytics**
- **Team Administration**

### Other components

- **Agency Team**

## Connections

- Agency Team → Client App: uses (evidence: `README.md`)
- Client App → Auth Middleware: routes through (evidence: `README.md`)
- Auth Middleware → Supabase Auth: validates session (evidence: `README.md`)
- Auth Middleware → Role and Tenant Checks: checks access (evidence: `README.md`)
- Role and Tenant Checks → Tenant-Scoped Data: scopes tenant (evidence: `README.md`)
- Client App → Dashboard: renders (evidence: `stubs/dashboard.tsx`)
- Tenant-Scoped Data → Lead Pipeline: stores scoped data (evidence: `README.md`)
- Tenant-Scoped Data → Student Applications: stores scoped data (evidence: `README.md`)
- Tenant-Scoped Data → Document Handling: stores scoped data (evidence: `README.md`)
- Client App → Lead Pipeline: tracks stages (evidence: `README.md`)
- Client App → Student Applications: manages (evidence: `README.md`)
- Client App → University Partners: manages (evidence: `README.md`)
- Client App → Document Handling: processes securely (evidence: `README.md`)
- Client App → Performance Analytics: presents metrics (evidence: `README.md`)
- Client App → Team Administration: administers team (evidence: `README.md`)
- Role and Tenant Checks → Signed Document URLs: authorizes access (evidence: `README.md`)
- Signed Document URLs → Document Handling: grants temporary access (evidence: `README.md`)
