# aatmanbho2429/visara-tauri architecture

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

- Interactive diagram: https://gitdiagram.com/aatmanbho2429/visara-tauri
- Repository: https://github.com/aatmanbho2429/visara-tauri

## Overview

Visara is a desktop-oriented asset search application with an Angular UI, a Tauri bridge, and a FastAPI backend. The visible UI search currently simulates results locally; the sampled API service and routing code support an authentication workflow, not a demonstrated search endpoint. Login and access requests flow from the login view through Angular auth/Tauri commands, while the Python auth router exposes matching HTTP operations. Authentication also calls external Supabase Edge endpoints and derives a device identifier. Other major screens are retained as distinct capabilities; their internal behavior is not established by the excerpts.

Main entry points: [`UI/src/app/app.routes.ts`](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/app.routes.ts) (Route guards), [`python/app/services/auth_service.py`](https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/services/auth_service.py) (Authentication logic), [`UI/src/app/services/auth.service.ts`](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/auth.service.ts) (Auth client), [`UI/src/app/views/login/login.ts`](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/login/login.ts) (Login and access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Desktop client"]
  node_login["Login and access<br/>[login.ts]"]
  node_master["Workspace shell<br/>[master.ts]"]
  node_search["Asset search<br/>[search.ts]"]
  node_activity["Activity log<br/>[activity-log.ts]"]
  node_contact["Contact us<br/>[contact-us.ts]"]
  node_register["Registration view<br/>[register.ts]"]
  node_routes["Route guards<br/>[app.routes.ts]"]
  node_authguards["Auth guards<br/>[auth.guard.ts]"]
  node_loginguard["Login guard<br/>[login.guard.ts]"]
  node_authservice["Auth client<br/>[auth.service.ts]"]
  node_tauri["Tauri command bridge<br/>[tauri.service.ts]"]
  node_api_service["HTTP API client<br/>[api.service.ts]"]
  node_config["Runtime config<br/>[config.service.ts]"]
  node_tauri_host["Tauri host<br/>[lib.rs]"]
end

subgraph group_server["API backend"]
  node_api["FastAPI application<br/>[main.py]"]
  node_v1router["Versioned API router<br/>[router.py]"]
  node_authrouter["Auth endpoints<br/>[router.py]"]
  node_authlogic["Authentication logic<br/>[auth_service.py]"]
  node_device["Device identity<br/>[license_service.py]"]
  node_settings["Backend settings<br/>[config.py]"]
  node_tokenfile[("Saved token file<br/>[config.py]")]
end

subgraph group_identity["Identity services"]
  node_edge{{"Supabase Edge"}}
end

node_user(("Desktop user"))

node_user -->|"navigates"| node_routes
node_routes -->|"routes to"| node_login
node_routes -->|"guards route"| node_master
node_routes -->|"routes to"| node_search
node_routes -->|"routes to"| node_activity
node_routes -->|"uses guard"| node_authguards
node_routes -->|"uses guard"| node_loginguard
node_authguards -->|"checks session"| node_authservice
node_loginguard -->|"checks session"| node_authservice
node_login -->|"requests auth"| node_authservice
node_authservice -->|"invokes commands"| node_tauri
node_tauri -->|"dispatches commands"| node_tauri_host
node_user -->|"searches assets"| node_search
node_user -.->|"opens"| node_contact
node_user -.->|"opens"| node_register
node_api -->|"mounts routes"| node_v1router
node_v1router -->|"mounts auth"| node_authrouter
node_authrouter -->|"calls auth"| node_authlogic
node_authlogic -->|"gets device ID"| node_device
node_authlogic -->|"reads settings"| node_settings
node_authlogic -->|"reads and writes"| node_tokenfile
node_authlogic -->|"calls auth endpoints"| node_edge
node_api_service -->|"reads API URL"| node_config

click node_login "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/login/login.ts"
click node_master "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/master/master.ts"
click node_search "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/search/search.ts"
click node_activity "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/activity-log/activity-log.ts"
click node_contact "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/contact-us/contact-us.ts"
click node_register "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/register/register.ts"
click node_routes "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/app.routes.ts"
click node_authguards "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/guards/auth.guard.ts"
click node_loginguard "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/guards/login.guard.ts"
click node_authservice "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/auth.service.ts"
click node_tauri "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/tauri.service.ts"
click node_api_service "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/api.service.ts"
click node_config "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/config.service.ts"
click node_tauri_host "https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src-tauri/src/lib.rs"
click node_api "https://github.com/aatmanbho2429/visara-tauri/blob/main/python/main.py"
click node_v1router "https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/api/v1/router.py"
click node_authrouter "https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/api/v1/auth/router.py"
click node_authlogic "https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/services/auth_service.py"
click node_device "https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/services/license_service.py"
click node_settings "https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/config.py"
click node_tokenfile "https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/config.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_login,node_master,node_search,node_activity,node_contact,node_register,node_routes,node_authguards,node_loginguard,node_authservice,node_tauri,node_api_service,node_config,node_tauri_host,node_user toneBlue
class node_api,node_v1router,node_authrouter,node_authlogic,node_device,node_settings,node_tokenfile toneAmber
class node_edge toneMint
```

## Components

### Desktop client

- [Login and access](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/login/login.ts): `UI/src/app/views/login/login.ts`
- [Workspace shell](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/master/master.ts): `UI/src/app/views/master/master.ts`
- [Asset search](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/search/search.ts): `UI/src/app/views/search/search.ts`
- [Activity log](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/activity-log/activity-log.ts): `UI/src/app/views/activity-log/activity-log.ts`
- [Contact us](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/contact-us/contact-us.ts): `UI/src/app/views/contact-us/contact-us.ts`
- [Registration view](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/views/register/register.ts): `UI/src/app/views/register/register.ts`
- [Route guards](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/app.routes.ts): `UI/src/app/app.routes.ts`
- [Auth guards](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/guards/auth.guard.ts): `UI/src/app/guards/auth.guard.ts`
- [Login guard](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/guards/login.guard.ts): `UI/src/app/guards/login.guard.ts`
- [Auth client](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/auth.service.ts): `UI/src/app/services/auth.service.ts`
- [Tauri command bridge](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/tauri.service.ts): `UI/src/app/services/tauri.service.ts`
- [HTTP API client](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/api.service.ts): `UI/src/app/services/api.service.ts`
- [Runtime config](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src/app/services/config.service.ts): `UI/src/app/services/config.service.ts`
- [Tauri host](https://github.com/aatmanbho2429/visara-tauri/blob/main/UI/src-tauri/src/lib.rs): `UI/src-tauri/src/lib.rs`

### API backend

- [FastAPI application](https://github.com/aatmanbho2429/visara-tauri/blob/main/python/main.py): `python/main.py`
- [Versioned API router](https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/api/v1/router.py): `python/app/api/v1/router.py`
- [Auth endpoints](https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/api/v1/auth/router.py): `python/app/api/v1/auth/router.py`
- [Authentication logic](https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/services/auth_service.py): `python/app/services/auth_service.py`
- [Device identity](https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/services/license_service.py): `python/app/services/license_service.py`
- [Backend settings](https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/config.py): `python/app/config.py`
- [Saved token file](https://github.com/aatmanbho2429/visara-tauri/blob/main/python/app/config.py): `python/app/config.py`

### Identity services

- **Supabase Edge**

### Other components

- **Desktop user**

## Connections

- Desktop user → Route guards: navigates (evidence: `UI/src/app/app.routes.ts`)
- Route guards → Login and access: routes to (evidence: `UI/src/app/app.routes.ts`)
- Route guards → Workspace shell: guards route (evidence: `UI/src/app/app.routes.ts`)
- Route guards → Asset search: routes to (evidence: `UI/src/app/app.routes.ts`)
- Route guards → Activity log: routes to (evidence: `UI/src/app/app.routes.ts`)
- Route guards → Auth guards: uses guard (evidence: `UI/src/app/app.routes.ts`)
- Route guards → Login guard: uses guard (evidence: `UI/src/app/app.routes.ts`)
- Auth guards → Auth client: checks session (evidence: `UI/src/app/guards/auth.guard.ts`)
- Login guard → Auth client: checks session (evidence: `UI/src/app/guards/login.guard.ts`)
- Login and access → Auth client: requests auth (evidence: `UI/src/app/views/login/login.ts`)
- Auth client → Tauri command bridge: invokes commands (evidence: `UI/src/app/services/auth.service.ts`)
- Tauri command bridge → Tauri host: dispatches commands (evidence: `UI/src/app/services/tauri.service.ts`)
- Desktop user → Asset search: searches assets (evidence: `UI/src/app/views/search/search.ts`)
- Desktop user → Contact us: opens
- Desktop user → Registration view: opens
- FastAPI application → Versioned API router: mounts routes (evidence: `python/main.py`)
- Versioned API router → Auth endpoints: mounts auth (evidence: `python/app/api/v1/router.py`)
- Auth endpoints → Authentication logic: calls auth (evidence: `python/app/api/v1/auth/router.py`)
- Authentication logic → Device identity: gets device ID (evidence: `python/app/services/auth_service.py`)
- Authentication logic → Backend settings: reads settings (evidence: `python/app/services/auth_service.py`)
- Authentication logic → Saved token file: reads and writes (evidence: `python/app/services/auth_service.py`)
- Authentication logic → Supabase Edge: calls auth endpoints (evidence: `python/app/services/auth_service.py`)
- HTTP API client → Runtime config: reads API URL (evidence: `UI/src/app/services/api.service.ts`)
