# cine-stream/api architecture

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

- Interactive diagram: https://gitdiagram.com/cine-stream/api
- Repository: https://github.com/cine-stream/api

## Overview

Cinestream appears to be a streaming-service backend API. Its domain modules indicate a user workflow spanning catalog and playback, subscriber profiles, subscriptions, and billing, with S3-backed storage and shared application infrastructure. The tree supports these product areas, but no README or source excerpts were provided, so relationships are shown only as unverified dashed links; internal calls and persistence behavior could not be confirmed.

Main entry points: [`src/main/java/com/example/cinestream/CinestreamApplication.java`](https://github.com/cine-stream/api/blob/main/src/main/java/com/example/cinestream/CinestreamApplication.java) (Application API), [`src/main/resources/db/schema.sql`](https://github.com/cine-stream/api/blob/main/src/main/resources/db/schema.sql) (Application database), [`src/main/java/com/example/cinestream/obra`](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/obra) (Works), [`src/main/java/com/example/cinestream/episodio`](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/episodio) (Episodes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Catalog"]
  node_works["Works"]
  node_genres["Genres"]
  node_work_genres["Work genres"]
  node_professionals["Professionals"]
  node_work_credits["Work credits"]
end

subgraph group_playback["Playback"]
  node_episodes["Episodes"]
  node_views["Viewing activity"]
  node_devices["Devices"]
  node_maturity["Maturity ratings"]
  node_resolutions["Resolutions"]
end

subgraph group_accounts["Accounts &amp; Billing"]
  node_subscribers["Subscribers"]
  node_profiles["Profiles"]
  node_subscriptions["Subscriptions"]
  node_plans["Plans"]
  node_invoices["Invoices"]
  node_billing_status["Billing status"]
end

subgraph group_platform["Storage &amp; Platform"]
  node_app["Application API"]
  node_s3_storage["S3 storage"]
  node_shared["Shared services"]
  node_database[("Application database<br/>[schema.sql]")]
end

node_user(("Viewer"))
node_s3[("Amazon S3")]

node_user -.->|"uses API"| node_app
node_app -.->|"serves catalog"| node_works
node_app -.->|"serves playback"| node_episodes
node_app -.->|"records viewing"| node_views
node_app -.->|"manages accounts"| node_subscribers
node_app -.->|"manages profiles"| node_profiles
node_app -.->|"manages subscriptions"| node_subscriptions
node_app -.->|"handles billing"| node_invoices
node_app -.->|"uses services"| node_shared
node_app -.->|"uses storage"| node_s3_storage
node_s3_storage -.->|"stores objects"| node_s3
node_works -.->|"persists data"| node_database
node_episodes -.->|"persists data"| node_database
node_views -.->|"persists data"| node_database
node_subscribers -.->|"persists data"| node_database
node_profiles -.->|"persists data"| node_database
node_subscriptions -.->|"persists data"| node_database
node_invoices -.->|"persists data"| node_database

click node_app "https://github.com/cine-stream/api/blob/main/src/main/java/com/example/cinestream/CinestreamApplication.java"
click node_works "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/obra"
click node_genres "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/genero"
click node_work_genres "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/obragenero"
click node_professionals "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/profissional"
click node_work_credits "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/obraprofissional"
click node_episodes "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/episodio"
click node_views "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/visualizacao"
click node_devices "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/dispositivo"
click node_maturity "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/classificacaomaturidade"
click node_resolutions "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/qualidaderesolucao"
click node_subscribers "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/assinante"
click node_profiles "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/perfil"
click node_subscriptions "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/assinatura"
click node_plans "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/plano"
click node_invoices "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/fatura"
click node_billing_status "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/statuscobranca"
click node_s3_storage "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/armazenamento"
click node_shared "https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/common"
click node_database "https://github.com/cine-stream/api/blob/main/src/main/resources/db/schema.sql"

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_works,node_genres,node_work_genres,node_professionals,node_work_credits,node_user toneBlue
class node_episodes,node_views,node_devices,node_maturity,node_resolutions,node_s3 toneAmber
class node_subscribers,node_profiles,node_subscriptions,node_plans,node_invoices,node_billing_status toneMint
class node_app,node_s3_storage,node_shared,node_database toneRose
```

## Components

### Catalog

- [Works](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/obra): `src/main/java/com/example/cinestream/obra`
- [Genres](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/genero): `src/main/java/com/example/cinestream/genero`
- [Work genres](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/obragenero): `src/main/java/com/example/cinestream/obragenero`
- [Professionals](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/profissional): `src/main/java/com/example/cinestream/profissional`
- [Work credits](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/obraprofissional): `src/main/java/com/example/cinestream/obraprofissional`

### Playback

- [Episodes](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/episodio): `src/main/java/com/example/cinestream/episodio`
- [Viewing activity](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/visualizacao): `src/main/java/com/example/cinestream/visualizacao`
- [Devices](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/dispositivo): `src/main/java/com/example/cinestream/dispositivo`
- [Maturity ratings](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/classificacaomaturidade): `src/main/java/com/example/cinestream/classificacaomaturidade`
- [Resolutions](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/qualidaderesolucao): `src/main/java/com/example/cinestream/qualidaderesolucao`

### Accounts & Billing

- [Subscribers](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/assinante): `src/main/java/com/example/cinestream/assinante`
- [Profiles](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/perfil): `src/main/java/com/example/cinestream/perfil`
- [Subscriptions](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/assinatura): `src/main/java/com/example/cinestream/assinatura`
- [Plans](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/plano): `src/main/java/com/example/cinestream/plano`
- [Invoices](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/fatura): `src/main/java/com/example/cinestream/fatura`
- [Billing status](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/statuscobranca): `src/main/java/com/example/cinestream/statuscobranca`

### Storage & Platform

- [Application API](https://github.com/cine-stream/api/blob/main/src/main/java/com/example/cinestream/CinestreamApplication.java): `src/main/java/com/example/cinestream/CinestreamApplication.java`
- [S3 storage](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/armazenamento): `src/main/java/com/example/cinestream/armazenamento`
- [Shared services](https://github.com/cine-stream/api/tree/main/src/main/java/com/example/cinestream/common): `src/main/java/com/example/cinestream/common`
- [Application database](https://github.com/cine-stream/api/blob/main/src/main/resources/db/schema.sql): `src/main/resources/db/schema.sql`

### Other components

- **Viewer**
- **Amazon S3**

## Connections

- Viewer → Application API: uses API
- Application API → Works: serves catalog
- Application API → Episodes: serves playback
- Application API → Viewing activity: records viewing
- Application API → Subscribers: manages accounts
- Application API → Profiles: manages profiles
- Application API → Subscriptions: manages subscriptions
- Application API → Invoices: handles billing
- Application API → Shared services: uses services
- Application API → S3 storage: uses storage
- S3 storage → Amazon S3: stores objects
- Works → Application database: persists data
- Episodes → Application database: persists data
- Viewing activity → Application database: persists data
- Subscribers → Application database: persists data
- Profiles → Application database: persists data
- Subscriptions → Application database: persists data
- Invoices → Application database: persists data
