# heroesoebekti/face-recognition-member-support architecture

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

- Interactive diagram: https://gitdiagram.com/heroesoebekti/face-recognition-member-support
- Repository: https://github.com/heroesoebekti/face-recognition-member-support

## Overview

This SLiMS plugin supports camera-based visitor check-in and attendance, plus staff workflows for enrolling member faces, synchronizing member photos, and managing recognition settings and embedding status. The principal flow is a visitor using the desktop or mobile page: browser-side face detection submits a capture through that page's PHP handler, which calls FastAPI and records recognized members in SLiMS while preventing duplicate check-ins. The README documents live visit statistics. Some endpoint logic is excerpted, so links are limited to evidenced ownership; the listed migration and other unsampled files are not assigned unverified behavior.

Main entry points: [`FastApiClient.php`](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/FastApiClient.php) (FastAPI client), [`visitor.php`](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/visitor.php) (Desktop counter), [`public.php`](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/public.php) (Mobile counter), [`sync_process.php`](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/sync_process.php) (Sync processor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_visitor["Visitor check-in"]
  node_desktop_page["Desktop counter<br/>[visitor.php]"]
  node_mobile_page["Mobile counter<br/>[public.php]"]
  node_face_detection["Browser detection<br/>[visitor.php]"]
  node_visitor_records[("Visitor records")]
  node_stats["Visit statistics<br/>[public.php]"]
end

subgraph group_enrollment["Face enrollment"]
  node_member_records[("SLiMS members")]
  node_member_capture["Member capture<br/>[face_capture.php]"]
  node_membership_capture["Membership capture<br/>[plugin.php]"]
  node_photo_sync_ui["Photo sync UI"]
  node_sync_processor["Sync processor<br/>[sync_process.php]"]
  node_embedding_data[("Face embeddings")]
end

subgraph group_operations["Admin operations"]
  node_dashboard["Settings dashboard<br/>[dashboard.php]"]
  node_embedding_status["Embedding status"]
end

subgraph group_integration["Recognition integration"]
  node_fastapi_client["FastAPI client<br/>[FastApiClient.php]"]
  node_recognition_service["FastAPI service"]
end

node_visitor_user(("Visitor"))

node_visitor_user -->|"opens counter"| node_desktop_page
node_visitor_user -->|"opens counter"| node_mobile_page
node_desktop_page -->|"runs detection"| node_face_detection
node_mobile_page -->|"runs detection"| node_face_detection
node_desktop_page -->|"submits recognition"| node_fastapi_client
node_mobile_page -->|"submits recognition"| node_fastapi_client
node_fastapi_client -->|"sends request"| node_recognition_service
node_desktop_page -->|"records check-in"| node_visitor_records
node_mobile_page -->|"records check-in"| node_visitor_records
node_stats -->|"reads counts"| node_visitor_records
node_visitor_records -->|"provides totals"| node_stats
node_member_capture -->|"reads member"| node_member_records
node_member_capture -->|"extracts vector"| node_fastapi_client
node_member_capture -->|"stores vector"| node_embedding_data
node_membership_capture -->|"reads member"| node_member_records
node_membership_capture -->|"extracts vector"| node_fastapi_client
node_membership_capture -->|"stores vector"| node_embedding_data
node_photo_sync_ui -->|"requests processing"| node_sync_processor
node_sync_processor -->|"reads photos"| node_member_records
node_sync_processor -->|"extracts vector"| node_fastapi_client
node_sync_processor -->|"stores vector"| node_embedding_data
node_dashboard -->|"checks status"| node_fastapi_client
node_dashboard -->|"updates tolerance"| node_fastapi_client
node_embedding_status -->|"lists members"| node_member_records
node_embedding_status -->|"reads status"| node_embedding_data
node_embedding_status -->|"deletes vectors"| node_fastapi_client
node_fastapi_client -->|"loads config"| node_embedding_data

click node_desktop_page "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/visitor.php"
click node_mobile_page "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/public.php"
click node_face_detection "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/visitor.php"
click node_stats "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/public.php"
click node_member_capture "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/face_capture.php"
click node_membership_capture "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/plugin.php"
click node_photo_sync_ui "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/face_sync_members.php"
click node_sync_processor "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/sync_process.php"
click node_dashboard "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/dashboard.php"
click node_embedding_status "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/face_member_list.php"
click node_fastapi_client "https://github.com/heroesoebekti/face-recognition-member-support/blob/main/FastApiClient.php"

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_desktop_page,node_mobile_page,node_face_detection,node_visitor_records,node_stats toneBlue
class node_member_records,node_member_capture,node_membership_capture,node_photo_sync_ui,node_sync_processor,node_embedding_data toneAmber
class node_dashboard,node_embedding_status toneMint
class node_fastapi_client,node_recognition_service toneRose
class node_visitor_user toneIndigo
```

## Components

### Visitor check-in

- [Desktop counter](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/visitor.php): `visitor.php`
- [Mobile counter](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/public.php): `public.php`
- [Browser detection](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/visitor.php): `visitor.php`
- **Visitor records**
- [Visit statistics](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/public.php): `public.php`

### Face enrollment

- **SLiMS members**
- [Member capture](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/face_capture.php): `face_capture.php`
- [Membership capture](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/plugin.php): `plugin.php`
- [Photo sync UI](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/face_sync_members.php): `face_sync_members.php`
- [Sync processor](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/sync_process.php): `sync_process.php`
- **Face embeddings**

### Admin operations

- [Settings dashboard](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/dashboard.php): `dashboard.php`
- [Embedding status](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/face_member_list.php): `face_member_list.php`

### Recognition integration

- [FastAPI client](https://github.com/heroesoebekti/face-recognition-member-support/blob/main/FastApiClient.php): `FastApiClient.php`
- **FastAPI service**

### Other components

- **Visitor**

## Connections

- Visitor → Desktop counter: opens counter
- Visitor → Mobile counter: opens counter
- Desktop counter → Browser detection: runs detection
- Mobile counter → Browser detection: runs detection
- Desktop counter → FastAPI client: submits recognition
- Mobile counter → FastAPI client: submits recognition
- FastAPI client → FastAPI service: sends request
- Desktop counter → Visitor records: records check-in
- Mobile counter → Visitor records: records check-in
- Visit statistics → Visitor records: reads counts
- Visitor records → Visit statistics: provides totals
- Member capture → SLiMS members: reads member
- Member capture → FastAPI client: extracts vector
- Member capture → Face embeddings: stores vector
- Membership capture → SLiMS members: reads member
- Membership capture → FastAPI client: extracts vector
- Membership capture → Face embeddings: stores vector
- Photo sync UI → Sync processor: requests processing
- Sync processor → SLiMS members: reads photos
- Sync processor → FastAPI client: extracts vector
- Sync processor → Face embeddings: stores vector
- Settings dashboard → FastAPI client: checks status
- Settings dashboard → FastAPI client: updates tolerance
- Embedding status → SLiMS members: lists members
- Embedding status → Face embeddings: reads status
- Embedding status → FastAPI client: deletes vectors
- FastAPI client → Face embeddings: loads config
