# starlock/vino architecture

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

- Interactive diagram: https://gitdiagram.com/starlock/vino
- Repository: https://github.com/starlock/vino

## Overview

Vino is a Flask app for browsing popular Vine videos or videos under a tag, plus a reusable Vine API client. The main flow renders the wall, fetches paged JSON through the app’s API routes, retrieves timeline records from Vine, and displays and rotates videos in the browser. The README and sampled source support these features; template internals and frontend wiring beyond the sampled JavaScript are not shown.

Main entry points: [`app.py`](https://github.com/starlock/vino/blob/master/app.py) (JSON API routes), [`vine.py`](https://github.com/starlock/vino/blob/master/vine.py) (Vine client), [`static/js/vino.js`](https://github.com/starlock/vino/blob/master/static/js/vino.js) (Wall renderer), [`templates/tag.html`](https://github.com/starlock/vino/blob/master/templates/tag.html) (Wall template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_page_routes["Page routes<br/>[app.py]"]
  node_wall_template["Wall template<br/>[tag.html]"]
  node_api_routes["JSON API routes<br/>[app.py]"]
  node_cache_wrapper["Cache wrapper<br/>[app.py]"]
end

subgraph group_client["Browser wall"]
  node_wall_client["Wall renderer<br/>[vino.js]"]
  node_video_content["Video playback<br/>[vino.js]"]
end

subgraph group_vine["Vine integration"]
  node_vine_client["Vine client<br/>[vine.py]"]
  node_vine_service["Vine API"]
end

subgraph group_state["Caching"]
  node_cache[("Memcached")]
end

node_visitor(("Visitor"))

node_visitor -->|"requests page"| node_page_routes
node_page_routes -->|"renders"| node_wall_template
node_visitor -->|"requests JSON"| node_api_routes
node_wall_client -->|"fetches pages"| node_api_routes
node_api_routes -->|"uses cache"| node_cache_wrapper
node_cache_wrapper -.->|"reads/writes"| node_cache
node_api_routes -->|"requests timelines"| node_vine_client
node_vine_client -->|"calls API"| node_vine_service
node_vine_client -->|"authenticates"| node_vine_service
node_wall_client -->|"builds playback"| node_video_content

click node_page_routes "https://github.com/starlock/vino/blob/master/app.py"
click node_wall_template "https://github.com/starlock/vino/blob/master/templates/tag.html"
click node_api_routes "https://github.com/starlock/vino/blob/master/app.py"
click node_cache_wrapper "https://github.com/starlock/vino/blob/master/app.py"
click node_vine_client "https://github.com/starlock/vino/blob/master/vine.py"
click node_wall_client "https://github.com/starlock/vino/blob/master/static/js/vino.js"
click node_video_content "https://github.com/starlock/vino/blob/master/static/js/vino.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_page_routes,node_wall_template,node_api_routes,node_cache_wrapper toneBlue
class node_wall_client,node_video_content toneAmber
class node_vine_client,node_vine_service toneMint
class node_cache toneRose
class node_visitor toneIndigo
```

## Components

### Web application

- [Page routes](https://github.com/starlock/vino/blob/master/app.py): `app.py`
- [Wall template](https://github.com/starlock/vino/blob/master/templates/tag.html): `templates/tag.html`
- [JSON API routes](https://github.com/starlock/vino/blob/master/app.py): `app.py`
- [Cache wrapper](https://github.com/starlock/vino/blob/master/app.py): `app.py`

### Browser wall

- [Wall renderer](https://github.com/starlock/vino/blob/master/static/js/vino.js): `static/js/vino.js`
- [Video playback](https://github.com/starlock/vino/blob/master/static/js/vino.js): `static/js/vino.js`

### Vine integration

- [Vine client](https://github.com/starlock/vino/blob/master/vine.py): `vine.py`
- **Vine API**

### Caching

- **Memcached**

### Other components

- **Visitor**

## Connections

- Visitor → Page routes: requests page
- Page routes → Wall template: renders
- Visitor → JSON API routes: requests JSON
- Wall renderer → JSON API routes: fetches pages
- JSON API routes → Cache wrapper: uses cache
- Cache wrapper → Memcached: reads/writes
- JSON API routes → Vine client: requests timelines
- Vine client → Vine API: calls API
- Vine client → Vine API: authenticates
- Wall renderer → Video playback: builds playback
