# anbebong/ancol-ani architecture

> Architecture diagram of the GitHub repository anbebong/ancol-ani, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/anbebong/ancol-ani
- Repository: https://github.com/anbebong/ancol-ani

## Overview

The repository contains a desktop pet control app with an optional account-backed GIF sync service and web portal; the checked-in README still describes the Wails vanilla template and does not document these product capabilities. The web UI sends text and GIF requests, previews local GIFs, and provides account/library sync. The server portal supports account, personal-library, sharing, and administration workflows. Server implementation files were listed as read but not excerpted, so links into server internals are omitted or marked unverified rather than inferred.

Main entry points: [`web/src/main.js`](https://github.com/anbebong/ancol-ani/blob/main/web/src/main.js) (Control page), [`web/src/sync.js`](https://github.com/anbebong/ancol-ani/blob/main/web/src/sync.js) (Account sync UI), [`cmd/syncserver/portal/src/main.js`](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/main.js) (Account portal), [`cmd/syncserver/handlers.go`](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/handlers.go) (HTTP handlers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop controls"]
  node_web_ui["Control page<br/>[main.js]"]
  node_gif_player["GIF playback<br/>[gif-player.js]"]
  node_i18n["Translations<br/>[i18n.js]"]
  node_confirm_modal["Confirm dialogs<br/>[modal.js]"]
  node_desktop_binding["Desktop binding<br/>[app.go]"]
  node_wails_runtime["Wails starter UI<br/>[main.js]"]
end

subgraph group_sync_ui["Sync interface"]
  node_sync_ui["Account sync UI<br/>[sync.js]"]
end

subgraph group_server["Sync server"]
  node_server_entry["Server entry<br/>[main.go]"]
  node_http_handlers["HTTP handlers<br/>[handlers.go]"]
  node_auth["Authentication<br/>[auth.go]"]
  node_store[("GIF and account store<br/>[store.go]")]
end

subgraph group_portal["Server portal"]
  node_server_api["Server API client<br/>[api.js]"]
  node_portal_main["Account portal<br/>[main.js]"]
  node_gallery["Public gallery<br/>[gallery.js]"]
  node_portal_icons["Portal icons<br/>[icons.js]"]
  node_portal_modal["Portal dialogs<br/>[modal.js]"]
end

node_user(("Desktop user"))

node_user -->|"uses controls"| node_web_ui
node_web_ui -->|"plays preview"| node_gif_player
node_web_ui -->|"translates UI"| node_i18n
node_web_ui -->|"confirms actions"| node_confirm_modal
node_web_ui -->|"initializes sync"| node_sync_ui
node_sync_ui -->|"renders library GIFs"| node_gif_player
node_sync_ui -->|"uses translations"| node_i18n
node_sync_ui -->|"confirms actions"| node_confirm_modal
node_sync_ui -.->|"calls sync service"| node_server_entry
node_server_api -.->|"requests API"| node_server_entry
node_portal_main -->|"calls API"| node_server_api
node_portal_main -->|"renders icons"| node_portal_icons
node_portal_main -->|"confirms actions"| node_portal_modal
node_gallery -->|"loads public GIFs"| node_server_api
node_gallery -->|"renders icons"| node_portal_icons
node_server_entry -.->|"routes requests"| node_http_handlers
node_http_handlers -.->|"checks identity"| node_auth
node_http_handlers -.->|"reads and writes"| node_store

click node_web_ui "https://github.com/anbebong/ancol-ani/blob/main/web/src/main.js"
click node_gif_player "https://github.com/anbebong/ancol-ani/blob/main/web/src/gif-player.js"
click node_i18n "https://github.com/anbebong/ancol-ani/blob/main/web/src/i18n.js"
click node_confirm_modal "https://github.com/anbebong/ancol-ani/blob/main/web/src/modal.js"
click node_sync_ui "https://github.com/anbebong/ancol-ani/blob/main/web/src/sync.js"
click node_server_api "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/api.js"
click node_portal_main "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/main.js"
click node_gallery "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/gallery.js"
click node_portal_icons "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/icons.js"
click node_portal_modal "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/modal.js"
click node_server_entry "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/main.go"
click node_http_handlers "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/handlers.go"
click node_auth "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/auth.go"
click node_store "https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/store.go"
click node_desktop_binding "https://github.com/anbebong/ancol-ani/blob/main/app.go"
click node_wails_runtime "https://github.com/anbebong/ancol-ani/blob/main/frontend/src/main.js"

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_web_ui,node_gif_player,node_i18n,node_confirm_modal,node_desktop_binding,node_wails_runtime,node_user toneBlue
class node_sync_ui toneAmber
class node_server_entry,node_http_handlers,node_auth,node_store toneMint
class node_server_api,node_portal_main,node_gallery,node_portal_icons,node_portal_modal toneRose
```

## Components

### Desktop controls

- [Control page](https://github.com/anbebong/ancol-ani/blob/main/web/src/main.js): `web/src/main.js`
- [GIF playback](https://github.com/anbebong/ancol-ani/blob/main/web/src/gif-player.js): `web/src/gif-player.js`
- [Translations](https://github.com/anbebong/ancol-ani/blob/main/web/src/i18n.js): `web/src/i18n.js`
- [Confirm dialogs](https://github.com/anbebong/ancol-ani/blob/main/web/src/modal.js): `web/src/modal.js`
- [Desktop binding](https://github.com/anbebong/ancol-ani/blob/main/app.go): `app.go`
- [Wails starter UI](https://github.com/anbebong/ancol-ani/blob/main/frontend/src/main.js): `frontend/src/main.js`

### Sync interface

- [Account sync UI](https://github.com/anbebong/ancol-ani/blob/main/web/src/sync.js): `web/src/sync.js`

### Sync server

- [Server entry](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/main.go): `cmd/syncserver/main.go`
- [HTTP handlers](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/handlers.go): `cmd/syncserver/handlers.go`
- [Authentication](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/auth.go): `cmd/syncserver/auth.go`
- [GIF and account store](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/store.go): `cmd/syncserver/store.go`

### Server portal

- [Server API client](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/api.js): `cmd/syncserver/portal/src/api.js`
- [Account portal](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/main.js): `cmd/syncserver/portal/src/main.js`
- [Public gallery](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/gallery.js): `cmd/syncserver/portal/src/gallery.js`
- [Portal icons](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/icons.js): `cmd/syncserver/portal/src/icons.js`
- [Portal dialogs](https://github.com/anbebong/ancol-ani/blob/main/cmd/syncserver/portal/src/modal.js): `cmd/syncserver/portal/src/modal.js`

### Other components

- **Desktop user**

## Connections

- Desktop user → Control page: uses controls (evidence: `web/src/main.js`)
- Control page → GIF playback: plays preview (evidence: `web/src/main.js`)
- Control page → Translations: translates UI (evidence: `web/src/main.js`)
- Control page → Confirm dialogs: confirms actions (evidence: `web/src/main.js`)
- Control page → Account sync UI: initializes sync (evidence: `web/src/main.js`)
- Account sync UI → GIF playback: renders library GIFs (evidence: `web/src/sync.js`)
- Account sync UI → Translations: uses translations (evidence: `web/src/sync.js`)
- Account sync UI → Confirm dialogs: confirms actions (evidence: `web/src/sync.js`)
- Account sync UI → Server entry: calls sync service
- Server API client → Server entry: requests API
- Account portal → Server API client: calls API (evidence: `cmd/syncserver/portal/src/main.js`)
- Account portal → Portal icons: renders icons (evidence: `cmd/syncserver/portal/src/main.js`)
- Account portal → Portal dialogs: confirms actions (evidence: `cmd/syncserver/portal/src/main.js`)
- Public gallery → Server API client: loads public GIFs (evidence: `cmd/syncserver/portal/src/gallery.js`)
- Public gallery → Portal icons: renders icons (evidence: `cmd/syncserver/portal/src/gallery.js`)
- Server entry → HTTP handlers: routes requests
- HTTP handlers → Authentication: checks identity
- HTTP handlers → GIF and account store: reads and writes
