# zs1083339604/facewinunlock-tauri architecture

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

- Interactive diagram: https://gitdiagram.com/zs1083339604/facewinunlock-tauri
- Repository: https://github.com/zs1083339604/facewinunlock-tauri

## Overview

FaceWinUnlock-Tauri is a Windows face-recognition sign-in enhancement, combining a Vue/Tauri desktop manager, local face/account configuration, OpenCV-backed recognition support, and a Windows Credential Provider. The user workflow is initialize Windows integration, select options, enroll a face and associate credentials, then test at the lock screen; the UI also manages logs and login security. The README documents liveness checks, multiple account types, and unlock scenarios. Core Rust functionality is explicitly absent from this source snapshot, so links across that boundary are omitted or marked unverified.

Main entry points: [`UI/src/router/index.js`](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/router/index.js) (Screen routing), [`UI/src/App.vue`](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/App.vue) (Vue application), [`UI/src/stores/faces.js`](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/stores/faces.js) (Face records), [`UI/src/stores/options.js`](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/stores/options.js) (Option records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop manager"]
  node_ui["Vue application<br/>[App.vue]"]
  node_router["Screen routing<br/>[index.js]"]
end

subgraph group_management["Enrollment and settings"]
  node_init["System initialization<br/>[Init.vue]"]
  node_dashboard["Dashboard<br/>[Dashboard.vue]"]
  node_enrollment["Face enrollment<br/>[Add.vue]"]
  node_authform["Account credentials"]
  node_face_list["Face management<br/>[List.vue]"]
  node_options_view["Preferences<br/>[Options.vue]"]
  node_login["App login<br/>[Login.vue]"]
  node_face_store["Face records<br/>[faces.js]"]
  node_options_store["Option records<br/>[options.js]"]
  node_database[("Local SQLite<br/>[sqlite.js]")]
  node_file_hook["Local file access<br/>[useFile.js]"]
  node_logs["Unlock logs<br/>[Logs.vue]"]
  node_log_hook["Log queries<br/>[useUnlockLog.js]"]
end

subgraph group_runtime["Recognition runtime"]
  node_tauri["Tauri commands<br/>[api.rs]"]
  node_tauri_init["Backend setup<br/>[lib.rs]"]
  node_opencv["Face recognition"]
  node_unlock_service["Unlock service<br/>[main.rs]"]
end

subgraph group_windows["Windows sign-in"]
  node_provider_dll["Credential Provider DLL<br/>[lib.rs]"]
  node_provider["Credential provider<br/>[CSampleProvider.rs]"]
  node_pipe["Pipe listener<br/>[CPipeListener.rs]"]
  node_credential["Credential object"]
  node_windows_login(("Windows sign-in"))
end

node_user(("Administrator"))

node_user -->|"uses"| node_ui
node_ui -->|"routes through"| node_router
node_router -->|"routes to"| node_init
node_router -->|"routes to"| node_dashboard
node_router -->|"routes to"| node_enrollment
node_router -->|"routes to"| node_face_list
node_router -->|"routes to"| node_options_view
node_router -->|"routes to"| node_login
node_ui -->|"connects"| node_database
node_ui -->|"initializes"| node_face_store
node_ui -->|"initializes"| node_options_store
node_init -->|"configures"| node_options_store
node_init -->|"collects credentials"| node_authform
node_enrollment -->|"collects credentials"| node_authform
node_enrollment -->|"saves face"| node_face_store
node_face_list -->|"manages records"| node_face_store
node_options_view -->|"saves settings"| node_options_store
node_dashboard -->|"reads faces"| node_face_store
node_dashboard -->|"reads settings"| node_options_store
node_face_store -->|"reads and writes"| node_database
node_options_store -->|"reads and writes"| node_database
node_enrollment -.->|"stores face images"| node_file_hook
node_logs -->|"queries"| node_log_hook
node_log_hook -->|"queries logs"| node_database
node_tauri_init -->|"registers commands"| node_tauri
node_tauri -->|"loads models"| node_opencv
node_provider_dll -->|"creates provider"| node_provider
node_provider -->|"starts listener"| node_pipe
node_provider -->|"uses credential"| node_credential
node_windows_login -->|"loads provider"| node_provider_dll
node_provider -.->|"communicates with"| node_unlock_service
node_tauri -.->|"controls"| node_unlock_service
node_opencv -.->|"supports recognition"| node_windows_login

click node_ui "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/App.vue"
click node_router "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/router/index.js"
click node_init "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Init.vue"
click node_dashboard "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Dashboard.vue"
click node_enrollment "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Faces/Add.vue"
click node_authform "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/components/AccountAuthForm.vue"
click node_face_list "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Faces/List.vue"
click node_options_view "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Options.vue"
click node_login "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Login.vue"
click node_face_store "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/stores/faces.js"
click node_options_store "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/stores/options.js"
click node_database "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/utils/sqlite.js"
click node_file_hook "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/hook/useFile.js"
click node_logs "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Logs.vue"
click node_log_hook "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/hook/useUnlockLog.js"
click node_tauri "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src-tauri/src/utils/api.rs"
click node_tauri_init "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src-tauri/src/lib.rs"
click node_provider_dll "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Server/src/lib.rs"
click node_provider "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Server/src/CSampleProvider.rs"
click node_pipe "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Server/src/CPipeListener.rs"
click node_credential "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Server/src/CSampleCredential.rs"
click node_unlock_service "https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Unlock/src/main.rs"

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_ui,node_router toneBlue
class node_init,node_dashboard,node_enrollment,node_authform,node_face_list,node_options_view,node_login,node_face_store,node_options_store,node_database,node_file_hook,node_logs,node_log_hook toneAmber
class node_tauri,node_tauri_init,node_opencv,node_unlock_service toneMint
class node_provider_dll,node_provider,node_pipe,node_credential,node_windows_login toneRose
class node_user toneIndigo
```

## Components

### Desktop manager

- [Vue application](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/App.vue): `UI/src/App.vue`
- [Screen routing](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/router/index.js): `UI/src/router/index.js`

### Enrollment and settings

- [System initialization](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Init.vue): `UI/src/views/Init.vue`
- [Dashboard](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Dashboard.vue): `UI/src/views/Dashboard.vue`
- [Face enrollment](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Faces/Add.vue): `UI/src/views/Faces/Add.vue`
- [Account credentials](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/components/AccountAuthForm.vue): `UI/src/components/AccountAuthForm.vue`
- [Face management](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Faces/List.vue): `UI/src/views/Faces/List.vue`
- [Preferences](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Options.vue): `UI/src/views/Options.vue`
- [App login](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Login.vue): `UI/src/views/Login.vue`
- [Face records](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/stores/faces.js): `UI/src/stores/faces.js`
- [Option records](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/stores/options.js): `UI/src/stores/options.js`
- [Local SQLite](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/utils/sqlite.js): `UI/src/utils/sqlite.js`
- [Local file access](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/hook/useFile.js): `UI/src/hook/useFile.js`
- [Unlock logs](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/views/Logs.vue): `UI/src/views/Logs.vue`
- [Log queries](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src/hook/useUnlockLog.js): `UI/src/hook/useUnlockLog.js`

### Recognition runtime

- [Tauri commands](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src-tauri/src/utils/api.rs): `UI/src-tauri/src/utils/api.rs`
- [Backend setup](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/UI/src-tauri/src/lib.rs): `UI/src-tauri/src/lib.rs`
- **Face recognition**
- [Unlock service](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Unlock/src/main.rs): `Unlock/src/main.rs`

### Windows sign-in

- [Credential Provider DLL](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Server/src/lib.rs): `Server/src/lib.rs`
- [Credential provider](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Server/src/CSampleProvider.rs): `Server/src/CSampleProvider.rs`
- [Pipe listener](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Server/src/CPipeListener.rs): `Server/src/CPipeListener.rs`
- [Credential object](https://github.com/zs1083339604/facewinunlock-tauri/blob/main/Server/src/CSampleCredential.rs): `Server/src/CSampleCredential.rs`
- **Windows sign-in**

### Other components

- **Administrator**

## Connections

- Administrator → Vue application: uses (evidence: `README.md`)
- Vue application → Screen routing: routes through (evidence: `UI/src/App.vue`)
- Screen routing → System initialization: routes to (evidence: `UI/src/router/index.js`)
- Screen routing → Dashboard: routes to (evidence: `UI/src/router/index.js`)
- Screen routing → Face enrollment: routes to (evidence: `UI/src/router/index.js`)
- Screen routing → Face management: routes to (evidence: `UI/src/router/index.js`)
- Screen routing → Preferences: routes to (evidence: `UI/src/router/index.js`)
- Screen routing → App login: routes to (evidence: `UI/src/router/index.js`)
- Vue application → Local SQLite: connects (evidence: `UI/src/App.vue`)
- Vue application → Face records: initializes (evidence: `UI/src/App.vue`)
- Vue application → Option records: initializes (evidence: `UI/src/App.vue`)
- System initialization → Option records: configures (evidence: `UI/src/views/Init.vue`)
- System initialization → Account credentials: collects credentials (evidence: `UI/src/views/Init.vue`)
- Face enrollment → Account credentials: collects credentials (evidence: `UI/src/views/Faces/Add.vue`)
- Face enrollment → Face records: saves face (evidence: `UI/src/views/Faces/Add.vue`)
- Face management → Face records: manages records (evidence: `UI/src/views/Faces/List.vue`)
- Preferences → Option records: saves settings (evidence: `UI/src/views/Options.vue`)
- Dashboard → Face records: reads faces (evidence: `UI/src/views/Dashboard.vue`)
- Dashboard → Option records: reads settings (evidence: `UI/src/views/Dashboard.vue`)
- Face records → Local SQLite: reads and writes (evidence: `UI/src/stores/faces.js`)
- Option records → Local SQLite: reads and writes (evidence: `UI/src/stores/options.js`)
- Face enrollment → Local file access: stores face images
- Unlock logs → Log queries: queries (evidence: `UI/src/views/Logs.vue`)
- Log queries → Local SQLite: queries logs (evidence: `UI/src/hook/useUnlockLog.js`)
- Backend setup → Tauri commands: registers commands (evidence: `UI/src-tauri/src/lib.rs`)
- Tauri commands → Face recognition: loads models (evidence: `UI/src-tauri/src/utils/api.rs`)
- Credential Provider DLL → Credential provider: creates provider (evidence: `Server/src/lib.rs`)
- Credential provider → Pipe listener: starts listener (evidence: `Server/src/CSampleProvider.rs`)
- Credential provider → Credential object: uses credential (evidence: `Server/src/CSampleProvider.rs`)
- Windows sign-in → Credential Provider DLL: loads provider (evidence: `README.md`)
- Credential provider → Unlock service: communicates with
- Tauri commands → Unlock service: controls
- Face recognition → Windows sign-in: supports recognition
