# check-face/facemorph.me-classic architecture

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

- Interactive diagram: https://gitdiagram.com/check-face/facemorph.me-classic
- Repository: https://github.com/check-face/facemorph.me-classic

## Overview

facemorph.me is a browser-based face-morphing app: users interact with the F# frontend, which uses the CheckFace API to generate images and videos, then can explore, explain, or share results. The README also documents a serverless endpoint that renders social-preview metadata. Source excerpts are limited to the sharing helper and build configuration, so frontend relationships beyond the documented API and SSR behavior are shown as unverified rather than asserted.

Main entry points: [`src/App.fs`](https://github.com/check-face/facemorph.me-classic/blob/master/src/App.fs) (App shell), [`src/MorphForm.fs`](https://github.com/check-face/facemorph.me-classic/blob/master/src/MorphForm.fs) (Morph form), [`Server/Index.fs`](https://github.com/check-face/facemorph.me-classic/blob/master/Server/Index.fs) (Server entry), [`src/Index.fs`](https://github.com/check-face/facemorph.me-classic/blob/master/src/Index.fs) (Frontend entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["App shell<br/>[App.fs]"]
  node_entry["Frontend entry<br/>[Index.fs]"]
  node_state["App state<br/>[AppState.fs]"]
end

subgraph group_morph["Morph workflow"]
  node_morphform["Morph form<br/>[MorphForm.fs]"]
  node_slider["Morph slider<br/>[SliderMorph.fs]"]
  node_encode["Image encoding"]
  node_checkface["CheckFace API<br/>[Checkface.fs]"]
end

subgraph group_results["Results and sharing"]
  node_browse["Browse faces"]
  node_explain["Result explanation<br/>[Explain.fs]"]
  node_retirement["Retirement view<br/>[Retirement.fs]"]
  node_share["Share interface<br/>[Share.fs]"]
  node_sharehelper["File sharing<br/>[shareFile.js]"]
end

subgraph group_server["Server rendering"]
  node_serverentry["Server entry<br/>[Index.fs]"]
  node_bindings["Server bindings<br/>[Bindings.fs]"]
  node_serverapp["Metadata renderer<br/>[Server.fsproj]"]
end

node_visitor(("Visitor"))
node_api{{"Image/video API"}}

node_visitor -->|"opens app"| node_entry
node_entry -.->|"starts UI"| node_app
node_app -.->|"offers morphing"| node_morphform
node_app -.->|"uses state"| node_state
node_morphform -.->|"offers adjustment"| node_slider
node_morphform -.->|"accepts image"| node_encode
node_morphform -.->|"requests generation"| node_checkface
node_checkface -.->|"uses API"| node_api
node_api -.->|"returns media"| node_app
node_app -.->|"offers browsing"| node_browse
node_app -.->|"offers explanations"| node_explain
node_app -.->|"offers retirement view"| node_retirement
node_app -.->|"offers sharing"| node_share
node_sharehelper -.->|"fetches shared file"| node_api
node_visitor -.->|"requests preview"| node_serverentry
node_serverentry -.->|"renders metadata"| node_serverapp
node_serverentry -.->|"uses bindings"| node_bindings

click node_app "https://github.com/check-face/facemorph.me-classic/blob/master/src/App.fs"
click node_entry "https://github.com/check-face/facemorph.me-classic/blob/master/src/Index.fs"
click node_state "https://github.com/check-face/facemorph.me-classic/blob/master/src/AppState.fs"
click node_morphform "https://github.com/check-face/facemorph.me-classic/blob/master/src/MorphForm.fs"
click node_slider "https://github.com/check-face/facemorph.me-classic/blob/master/src/SliderMorph.fs"
click node_encode "https://github.com/check-face/facemorph.me-classic/blob/master/src/EncodeImageDialog.fs"
click node_checkface "https://github.com/check-face/facemorph.me-classic/blob/master/src/Checkface.fs"
click node_browse "https://github.com/check-face/facemorph.me-classic/blob/master/src/BrowseFacesDialog.fs"
click node_explain "https://github.com/check-face/facemorph.me-classic/blob/master/src/Explain.fs"
click node_retirement "https://github.com/check-face/facemorph.me-classic/blob/master/src/Retirement.fs"
click node_share "https://github.com/check-face/facemorph.me-classic/blob/master/src/Share.fs"
click node_sharehelper "https://github.com/check-face/facemorph.me-classic/blob/master/src/shareFile.js"
click node_serverentry "https://github.com/check-face/facemorph.me-classic/blob/master/Server/Index.fs"
click node_bindings "https://github.com/check-face/facemorph.me-classic/blob/master/Server/Bindings.fs"
click node_serverapp "https://github.com/check-face/facemorph.me-classic/blob/master/Server/Server.fsproj"

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_app,node_entry,node_state toneBlue
class node_morphform,node_slider,node_encode,node_checkface toneAmber
class node_browse,node_explain,node_retirement,node_share,node_sharehelper,node_api toneMint
class node_serverentry,node_bindings,node_serverapp toneRose
class node_visitor toneIndigo
```

## Components

### Frontend experience

- [App shell](https://github.com/check-face/facemorph.me-classic/blob/master/src/App.fs): `src/App.fs`
- [Frontend entry](https://github.com/check-face/facemorph.me-classic/blob/master/src/Index.fs): `src/Index.fs`
- [App state](https://github.com/check-face/facemorph.me-classic/blob/master/src/AppState.fs): `src/AppState.fs`

### Morph workflow

- [Morph form](https://github.com/check-face/facemorph.me-classic/blob/master/src/MorphForm.fs): `src/MorphForm.fs`
- [Morph slider](https://github.com/check-face/facemorph.me-classic/blob/master/src/SliderMorph.fs): `src/SliderMorph.fs`
- [Image encoding](https://github.com/check-face/facemorph.me-classic/blob/master/src/EncodeImageDialog.fs): `src/EncodeImageDialog.fs`
- [CheckFace API](https://github.com/check-face/facemorph.me-classic/blob/master/src/Checkface.fs): `src/Checkface.fs`

### Results and sharing

- [Browse faces](https://github.com/check-face/facemorph.me-classic/blob/master/src/BrowseFacesDialog.fs): `src/BrowseFacesDialog.fs`
- [Result explanation](https://github.com/check-face/facemorph.me-classic/blob/master/src/Explain.fs): `src/Explain.fs`
- [Retirement view](https://github.com/check-face/facemorph.me-classic/blob/master/src/Retirement.fs): `src/Retirement.fs`
- [Share interface](https://github.com/check-face/facemorph.me-classic/blob/master/src/Share.fs): `src/Share.fs`
- [File sharing](https://github.com/check-face/facemorph.me-classic/blob/master/src/shareFile.js): `src/shareFile.js`

### Server rendering

- [Server entry](https://github.com/check-face/facemorph.me-classic/blob/master/Server/Index.fs): `Server/Index.fs`
- [Server bindings](https://github.com/check-face/facemorph.me-classic/blob/master/Server/Bindings.fs): `Server/Bindings.fs`
- [Metadata renderer](https://github.com/check-face/facemorph.me-classic/blob/master/Server/Server.fsproj): `Server/Server.fsproj`

### Other components

- **Visitor**
- **Image/video API**

## Connections

- Visitor → Frontend entry: opens app (evidence: `README.md`)
- Frontend entry → App shell: starts UI
- App shell → Morph form: offers morphing
- App shell → App state: uses state
- Morph form → Morph slider: offers adjustment
- Morph form → Image encoding: accepts image
- Morph form → CheckFace API: requests generation
- CheckFace API → Image/video API: uses API
- Image/video API → App shell: returns media
- App shell → Browse faces: offers browsing
- App shell → Result explanation: offers explanations
- App shell → Retirement view: offers retirement view
- App shell → Share interface: offers sharing
- File sharing → Image/video API: fetches shared file
- Visitor → Server entry: requests preview (evidence: `README.md`)
- Server entry → Metadata renderer: renders metadata (evidence: `README.md`)
- Server entry → Server bindings: uses bindings
