# teages/vtablet architecture

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

- Interactive diagram: https://gitdiagram.com/teages/vtablet
- Repository: https://github.com/teages/vtablet

## Overview

vTablet lets a user use a tablet as an osu digitizer. The repository contains a Flutter client and a Go server; the README warns that their transmission protocol may change and recommends updating both together. The source excerpts do not show the Dart workflow or client/server call sites, so the runtime link is shown as unverified. Server internals are included as distinct components, but their interactions are not inferred from filenames alone.

Main entry points: [`client/lib`](https://github.com/teages/vtablet/tree/main/client/lib) (Client app), [`server/main.go`](https://github.com/teages/vtablet/blob/main/server/main.go) (Server app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Flutter client"]
  node_client_app["Client app"]
  node_client_connect["Connection service<br/>[connect.dart]"]
  node_client_states["Client state<br/>[states.dart]"]
end

subgraph group_server["Go server"]
  node_server_app["Server app<br/>[main.go]"]
  node_controllers["Controllers<br/>[controllers.go]"]
  node_services["Services<br/>[services.go]"]
end

subgraph group_internals["Server internals"]
  node_adb["ADB integration<br/>[adb.go]"]
  node_pointer["Pointer handling<br/>[pointer.go]"]
  node_protocol["Protocol constants<br/>[const.go]"]
  node_logger["Logging<br/>[logger.go]"]
  node_tools["Command tools<br/>[cmd.go]"]
end

node_user(("User"))
node_tablet["Tablet"]
node_osu["osu"]

node_user -->|"uses"| node_client_app
node_tablet -.->|"digitizes through"| node_client_app
node_client_app -.->|"provides input to"| node_osu
node_client_app -.->|"transmits protocol data"| node_server_app

click node_client_app "https://github.com/teages/vtablet/tree/main/client/lib"
click node_client_connect "https://github.com/teages/vtablet/blob/main/client/lib/services/connect.dart"
click node_client_states "https://github.com/teages/vtablet/blob/main/client/lib/services/states.dart"
click node_server_app "https://github.com/teages/vtablet/blob/main/server/main.go"
click node_controllers "https://github.com/teages/vtablet/blob/main/server/controllers.go"
click node_services "https://github.com/teages/vtablet/blob/main/server/services.go"
click node_adb "https://github.com/teages/vtablet/blob/main/server/internal/adb/adb.go"
click node_pointer "https://github.com/teages/vtablet/blob/main/server/internal/pointer/pointer.go"
click node_protocol "https://github.com/teages/vtablet/blob/main/server/internal/protocol/const.go"
click node_logger "https://github.com/teages/vtablet/blob/main/server/internal/logger/logger.go"
click node_tools "https://github.com/teages/vtablet/blob/main/server/internal/tools/cmd.go"

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_client_app,node_client_connect,node_client_states,node_user toneBlue
class node_server_app,node_controllers,node_services toneAmber
class node_adb,node_pointer,node_protocol,node_logger,node_tools toneMint
class node_tablet,node_osu toneIndigo
```

## Components

### Flutter client

- [Client app](https://github.com/teages/vtablet/tree/main/client/lib): `client/lib`
- [Connection service](https://github.com/teages/vtablet/blob/main/client/lib/services/connect.dart): `client/lib/services/connect.dart`
- [Client state](https://github.com/teages/vtablet/blob/main/client/lib/services/states.dart): `client/lib/services/states.dart`

### Go server

- [Server app](https://github.com/teages/vtablet/blob/main/server/main.go): `server/main.go`
- [Controllers](https://github.com/teages/vtablet/blob/main/server/controllers.go): `server/controllers.go`
- [Services](https://github.com/teages/vtablet/blob/main/server/services.go): `server/services.go`

### Server internals

- [ADB integration](https://github.com/teages/vtablet/blob/main/server/internal/adb/adb.go): `server/internal/adb/adb.go`
- [Pointer handling](https://github.com/teages/vtablet/blob/main/server/internal/pointer/pointer.go): `server/internal/pointer/pointer.go`
- [Protocol constants](https://github.com/teages/vtablet/blob/main/server/internal/protocol/const.go): `server/internal/protocol/const.go`
- [Logging](https://github.com/teages/vtablet/blob/main/server/internal/logger/logger.go): `server/internal/logger/logger.go`
- [Command tools](https://github.com/teages/vtablet/blob/main/server/internal/tools/cmd.go): `server/internal/tools/cmd.go`

### Other components

- **User**
- **Tablet**
- **osu**

## Connections

- User → Client app: uses (evidence: `README.md`)
- Tablet → Client app: digitizes through
- Client app → osu: provides input to
- Client app → Server app: transmits protocol data (evidence: `README.md`)
