# zeon-07/cinematica architecture

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

- Interactive diagram: https://gitdiagram.com/zeon-07/cinematica
- Repository: https://github.com/zeon-07/cinematica

## Overview

Cinematica is a Java Swing desktop app for managing personal movie collections and reviews, backed by SQLite. The main workflow is sign in or register, browse and filter a collection, add a movie with an initial rating/review, and inspect movie details or add reviews. Admins also manage users. The graph reflects the sampled UI and database interactions plus README capabilities; some unsampled wiring is left unconnected rather than inferred.

Main entry points: [`src/com/movierating/database/DBManager.java`](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/database/DBManager.java) (SQLite operations), [`src/com/movierating/ui/MainDashboardFrame.java`](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/MainDashboardFrame.java) (Collection dashboard), [`src/com/movierating/database/DatabaseOperations.java`](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/database/DatabaseOperations.java) (Database operations API), [`src/com/movierating/ui/LoginFrame.java`](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/LoginFrame.java) (Login and registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and navigation"]
  node_login["Login and registration<br/>[LoginFrame.java]"]
  node_dashboard["Collection dashboard"]
  node_uihelper["UI styling helpers<br/>[UIHelper.java]"]
end

subgraph group_collection["Movies and reviews"]
  node_addmovie["Add movie dialog"]
  node_details["Movie details and reviews"]
end

subgraph group_admin["Administration"]
  node_usermanagement["User management"]
end

subgraph group_domain["Domain and persistence"]
  node_user["User roles<br/>[BaseUser.java]"]
  node_adminuser["Admin user<br/>[AdminUser.java]"]
  node_vieweruser["Viewer user<br/>[ViewerUser.java]"]
  node_movie["Movie record<br/>[Movie.java]"]
  node_review["Review record<br/>[Review.java]"]
  node_emptyexception["Input validation exception"]
  node_dbapi["Database operations API"]
  node_dbmanager["SQLite operations<br/>[DBManager.java]"]
  node_sqlite[("SQLite database")]
end

node_viewer(("User"))

node_viewer -->|"signs in"| node_login
node_login -->|"authenticates or registers"| node_dbapi
node_login -->|"opens dashboard"| node_dashboard
node_dashboard -->|"loads and searches"| node_dbapi
node_dashboard -->|"opens selected movie"| node_details
node_dashboard -->|"opens add form"| node_addmovie
node_dashboard -->|"opens user tools"| node_usermanagement
node_addmovie -->|"saves movie and review"| node_dbapi
node_details -->|"loads and adds reviews"| node_dbapi
node_usermanagement -->|"manages accounts"| node_dbapi
node_dbmanager -->|"reads and writes"| node_sqlite
node_dbmanager -->|"creates user records"| node_user
node_dbmanager -->|"reconstructs admin users"| node_adminuser
node_dbmanager -->|"reconstructs viewer users"| node_vieweruser
node_dbmanager -->|"maps movie rows"| node_movie
node_dbmanager -->|"maps review rows"| node_review
node_adminuser -->|"extends role model"| node_user
node_vieweruser -->|"extends role model"| node_user
node_user -->|"validates fields"| node_emptyexception
node_movie -->|"validates fields"| node_emptyexception
node_login -->|"uses UI helpers"| node_uihelper
node_dashboard -->|"uses UI helpers"| node_uihelper
node_details -->|"uses UI helpers"| node_uihelper
node_addmovie -->|"uses UI helpers"| node_uihelper

click node_login "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/LoginFrame.java"
click node_dashboard "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/MainDashboardFrame.java"
click node_uihelper "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/UIHelper.java"
click node_addmovie "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/AdminPanelFrame.java"
click node_details "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/MovieDetailsFrame.java"
click node_usermanagement "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/UserManagementFrame.java"
click node_user "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/BaseUser.java"
click node_adminuser "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/AdminUser.java"
click node_vieweruser "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/ViewerUser.java"
click node_movie "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/Movie.java"
click node_review "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/Review.java"
click node_emptyexception "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/exceptions/EmptyFieldException.java"
click node_dbapi "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/database/DatabaseOperations.java"
click node_dbmanager "https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/database/DBManager.java"

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_login,node_dashboard,node_uihelper,node_viewer toneBlue
class node_addmovie,node_details toneAmber
class node_usermanagement toneMint
class node_user,node_adminuser,node_vieweruser,node_movie,node_review,node_emptyexception,node_dbapi,node_dbmanager,node_sqlite toneRose
```

## Components

### Access and navigation

- [Login and registration](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/LoginFrame.java): `src/com/movierating/ui/LoginFrame.java`
- [Collection dashboard](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/MainDashboardFrame.java): `src/com/movierating/ui/MainDashboardFrame.java`
- [UI styling helpers](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/UIHelper.java): `src/com/movierating/ui/UIHelper.java`

### Movies and reviews

- [Add movie dialog](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/AdminPanelFrame.java): `src/com/movierating/ui/AdminPanelFrame.java`
- [Movie details and reviews](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/MovieDetailsFrame.java): `src/com/movierating/ui/MovieDetailsFrame.java`

### Administration

- [User management](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/ui/UserManagementFrame.java): `src/com/movierating/ui/UserManagementFrame.java`

### Domain and persistence

- [User roles](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/BaseUser.java): `src/com/movierating/models/BaseUser.java`
- [Admin user](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/AdminUser.java): `src/com/movierating/models/AdminUser.java`
- [Viewer user](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/ViewerUser.java): `src/com/movierating/models/ViewerUser.java`
- [Movie record](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/Movie.java): `src/com/movierating/models/Movie.java`
- [Review record](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/models/Review.java): `src/com/movierating/models/Review.java`
- [Input validation exception](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/exceptions/EmptyFieldException.java): `src/com/movierating/exceptions/EmptyFieldException.java`
- [Database operations API](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/database/DatabaseOperations.java): `src/com/movierating/database/DatabaseOperations.java`
- [SQLite operations](https://github.com/zeon-07/cinematica/blob/main/src/com/movierating/database/DBManager.java): `src/com/movierating/database/DBManager.java`
- **SQLite database**

### Other components

- **User**

## Connections

- User → Login and registration: signs in (evidence: `README.md`)
- Login and registration → Database operations API: authenticates or registers (evidence: `src/com/movierating/ui/LoginFrame.java`)
- Login and registration → Collection dashboard: opens dashboard (evidence: `src/com/movierating/ui/LoginFrame.java`)
- Collection dashboard → Database operations API: loads and searches (evidence: `src/com/movierating/ui/MainDashboardFrame.java`)
- Collection dashboard → Movie details and reviews: opens selected movie (evidence: `src/com/movierating/ui/MainDashboardFrame.java`)
- Collection dashboard → Add movie dialog: opens add form (evidence: `src/com/movierating/ui/MainDashboardFrame.java`)
- Collection dashboard → User management: opens user tools (evidence: `src/com/movierating/ui/MainDashboardFrame.java`)
- Add movie dialog → Database operations API: saves movie and review (evidence: `src/com/movierating/ui/AdminPanelFrame.java`)
- Movie details and reviews → Database operations API: loads and adds reviews (evidence: `src/com/movierating/ui/MovieDetailsFrame.java`)
- User management → Database operations API: manages accounts (evidence: `src/com/movierating/ui/UserManagementFrame.java`)
- SQLite operations → SQLite database: reads and writes (evidence: `src/com/movierating/database/DBManager.java`)
- SQLite operations → User roles: creates user records (evidence: `src/com/movierating/database/DBManager.java`)
- SQLite operations → Admin user: reconstructs admin users (evidence: `src/com/movierating/database/DBManager.java`)
- SQLite operations → Viewer user: reconstructs viewer users (evidence: `src/com/movierating/database/DBManager.java`)
- SQLite operations → Movie record: maps movie rows (evidence: `src/com/movierating/database/DBManager.java`)
- SQLite operations → Review record: maps review rows (evidence: `src/com/movierating/database/DBManager.java`)
- Admin user → User roles: extends role model (evidence: `src/com/movierating/models/AdminUser.java`)
- Viewer user → User roles: extends role model (evidence: `src/com/movierating/models/ViewerUser.java`)
- User roles → Input validation exception: validates fields (evidence: `src/com/movierating/models/BaseUser.java`)
- Movie record → Input validation exception: validates fields (evidence: `src/com/movierating/models/Movie.java`)
- Login and registration → UI styling helpers: uses UI helpers (evidence: `src/com/movierating/ui/LoginFrame.java`)
- Collection dashboard → UI styling helpers: uses UI helpers (evidence: `src/com/movierating/ui/MainDashboardFrame.java`)
- Movie details and reviews → UI styling helpers: uses UI helpers (evidence: `src/com/movierating/ui/MovieDetailsFrame.java`)
- Add movie dialog → UI styling helpers: uses UI helpers (evidence: `src/com/movierating/ui/AdminPanelFrame.java`)
