# dinocajic/tires-android architecture

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

- Interactive diagram: https://gitdiagram.com/dinocajic/tires-android
- Repository: https://github.com/dinocajic/tires-android

## Overview

This is an Android tire-inventory app. A user enters the main screen, where the app initializes and seeds its local catalog; they can search tires, inspect results, add or edit records, and delete them. Separate screens provide preferences and help. The graph preserves the catalog entities, seed data, connectivity check, and result adapter as distinct responsibilities. Source excerpts are partial and the README is empty, so links are limited to visible calls or SOURCE INDEX references; unsampled behavior is not inferred.

Main entry points: [`src/main/java/edu/gsu/student/csc4360/MainActivity.java`](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/MainActivity.java) (Main screen), [`src/main/java/edu/gsu/student/csc4360/Tire.java`](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Tire.java) (Tire record), [`src/main/java/edu/gsu/student/csc4360/DatabaseHelper.java`](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/DatabaseHelper.java) (SQLite catalog), [`src/main/java/edu/gsu/student/csc4360/Globals.java`](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Globals.java) (Database access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["App screens"]
  node_main["Main screen<br/>[MainActivity.java]"]
  node_search["Search screen"]
  node_add["Add tire<br/>[AddActivity.java]"]
  node_edit["Edit tire<br/>[EditActivity.java]"]
  node_settings["Settings"]
  node_help["Help screen<br/>[HelpActivity.java]"]
  node_helpfrags["Help content"]
  node_helpother["Other help"]
  node_adapter["Tire results"]
end

subgraph group_catalog["Catalog data"]
  node_db[("SQLite catalog")]
  node_populate["Catalog seeding<br/>[PopulateItems.java]"]
  node_globals["Database access<br/>[Globals.java]"]
end

subgraph group_domain["Tire domain"]
  node_tire["Tire record<br/>[Tire.java]"]
  node_brand["Brand record<br/>[Brand.java]"]
  node_model["Model record<br/>[Model.java]"]
  node_categories["Categories<br/>[Categories.java]"]
end

subgraph group_support["App support"]
  node_prefs["Theme preferences<br/>[PrefManager.java]"]
  node_connectivity["Connectivity check<br/>[Connectivity.java]"]
end

node_user(("User"))
node_browser["External browser"]

node_user -->|"opens app"| node_main
node_main -->|"opens"| node_add
node_main -->|"opens"| node_search
node_main -->|"initializes"| node_db
node_main -->|"seeds catalog"| node_populate
node_main -->|"checks online"| node_connectivity
node_main -->|"opens banner link"| node_browser
node_search -->|"queries catalog"| node_globals
node_globals -.->|"holds instance"| node_db
node_search -->|"renders results"| node_adapter
node_adapter -->|"opens selected tire"| node_edit
node_add -->|"reads and saves"| node_globals
node_edit -->|"loads and updates"| node_globals
node_populate -->|"uses database"| node_globals
node_db -->|"maps records"| node_tire
node_db -->|"maps records"| node_brand
node_db -->|"maps records"| node_model
node_populate -->|"creates items"| node_tire
node_add -->|"validates fields"| node_tire
node_edit -->|"validates fields"| node_tire
node_adapter -->|"displays records"| node_tire
node_tire -->|"references"| node_brand
node_tire -->|"references"| node_model
node_settings -->|"stores theme"| node_prefs
node_main -->|"loads theme"| node_prefs
node_search -->|"loads theme"| node_prefs
node_help -->|"loads theme"| node_prefs
node_main -->|"opens help"| node_help
node_help -.-> node_helpfrags
node_help -.-> node_helpother

click node_main "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/MainActivity.java"
click node_search "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/SearchActivity.java"
click node_add "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/AddActivity.java"
click node_edit "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/EditActivity.java"
click node_settings "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/SettingsActivity.java"
click node_help "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/HelpActivity.java"
click node_helpfrags "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/HelpMainFragment.java"
click node_helpother "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/HelpOtherFragment.java"
click node_adapter "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/TireRecyclerViewAdapter.java"
click node_db "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/DatabaseHelper.java"
click node_populate "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/PopulateItems.java"
click node_globals "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Globals.java"
click node_tire "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Tire.java"
click node_brand "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Brand.java"
click node_model "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Model.java"
click node_categories "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Categories.java"
click node_prefs "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/PrefManager.java"
click node_connectivity "https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Connectivity.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_main,node_search,node_add,node_edit,node_settings,node_help,node_helpfrags,node_helpother,node_adapter,node_user,node_browser toneBlue
class node_db,node_populate,node_globals toneAmber
class node_tire,node_brand,node_model,node_categories toneMint
class node_prefs,node_connectivity toneRose
```

## Components

### App screens

- [Main screen](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/MainActivity.java): `src/main/java/edu/gsu/student/csc4360/MainActivity.java`
- [Search screen](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/SearchActivity.java): `src/main/java/edu/gsu/student/csc4360/SearchActivity.java`
- [Add tire](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/AddActivity.java): `src/main/java/edu/gsu/student/csc4360/AddActivity.java`
- [Edit tire](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/EditActivity.java): `src/main/java/edu/gsu/student/csc4360/EditActivity.java`
- [Settings](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/SettingsActivity.java): `src/main/java/edu/gsu/student/csc4360/SettingsActivity.java`
- [Help screen](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/HelpActivity.java): `src/main/java/edu/gsu/student/csc4360/HelpActivity.java`
- [Help content](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/HelpMainFragment.java): `src/main/java/edu/gsu/student/csc4360/HelpMainFragment.java`
- [Other help](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/HelpOtherFragment.java): `src/main/java/edu/gsu/student/csc4360/HelpOtherFragment.java`
- [Tire results](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/TireRecyclerViewAdapter.java): `src/main/java/edu/gsu/student/csc4360/TireRecyclerViewAdapter.java`

### Catalog data

- [SQLite catalog](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/DatabaseHelper.java): `src/main/java/edu/gsu/student/csc4360/DatabaseHelper.java`
- [Catalog seeding](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/PopulateItems.java): `src/main/java/edu/gsu/student/csc4360/PopulateItems.java`
- [Database access](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Globals.java): `src/main/java/edu/gsu/student/csc4360/Globals.java`

### Tire domain

- [Tire record](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Tire.java): `src/main/java/edu/gsu/student/csc4360/Tire.java`
- [Brand record](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Brand.java): `src/main/java/edu/gsu/student/csc4360/Brand.java`
- [Model record](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Model.java): `src/main/java/edu/gsu/student/csc4360/Model.java`
- [Categories](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Categories.java): `src/main/java/edu/gsu/student/csc4360/Categories.java`

### App support

- [Theme preferences](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/PrefManager.java): `src/main/java/edu/gsu/student/csc4360/PrefManager.java`
- [Connectivity check](https://github.com/dinocajic/tires-android/blob/master/src/main/java/edu/gsu/student/csc4360/Connectivity.java): `src/main/java/edu/gsu/student/csc4360/Connectivity.java`

### Other components

- **User**
- **External browser**

## Connections

- User → Main screen: opens app (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Main screen → Add tire: opens (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Main screen → Search screen: opens (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Main screen → SQLite catalog: initializes (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Main screen → Catalog seeding: seeds catalog (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Main screen → Connectivity check: checks online (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Main screen → External browser: opens banner link (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Search screen → Database access: queries catalog (evidence: `src/main/java/edu/gsu/student/csc4360/SearchActivity.java`)
- Database access → SQLite catalog: holds instance (evidence: `src/main/java/edu/gsu/student/csc4360/Globals.java`)
- Search screen → Tire results: renders results (evidence: `src/main/java/edu/gsu/student/csc4360/SearchActivity.java`)
- Tire results → Edit tire: opens selected tire (evidence: `src/main/java/edu/gsu/student/csc4360/TireRecyclerViewAdapter.java`)
- Add tire → Database access: reads and saves (evidence: `src/main/java/edu/gsu/student/csc4360/AddActivity.java`)
- Edit tire → Database access: loads and updates (evidence: `src/main/java/edu/gsu/student/csc4360/EditActivity.java`)
- Catalog seeding → Database access: uses database (evidence: `src/main/java/edu/gsu/student/csc4360/PopulateItems.java`)
- SQLite catalog → Tire record: maps records (evidence: `src/main/java/edu/gsu/student/csc4360/DatabaseHelper.java`)
- SQLite catalog → Brand record: maps records (evidence: `src/main/java/edu/gsu/student/csc4360/DatabaseHelper.java`)
- SQLite catalog → Model record: maps records (evidence: `src/main/java/edu/gsu/student/csc4360/DatabaseHelper.java`)
- Catalog seeding → Tire record: creates items (evidence: `src/main/java/edu/gsu/student/csc4360/PopulateItems.java`)
- Add tire → Tire record: validates fields (evidence: `src/main/java/edu/gsu/student/csc4360/AddActivity.java`)
- Edit tire → Tire record: validates fields (evidence: `src/main/java/edu/gsu/student/csc4360/EditActivity.java`)
- Tire results → Tire record: displays records (evidence: `src/main/java/edu/gsu/student/csc4360/TireRecyclerViewAdapter.java`)
- Tire record → Brand record: references (evidence: `src/main/java/edu/gsu/student/csc4360/Tire.java`)
- Tire record → Model record: references (evidence: `src/main/java/edu/gsu/student/csc4360/Tire.java`)
- Settings → Theme preferences: stores theme (evidence: `src/main/java/edu/gsu/student/csc4360/SettingsActivity.java`)
- Main screen → Theme preferences: loads theme (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Search screen → Theme preferences: loads theme (evidence: `src/main/java/edu/gsu/student/csc4360/SearchActivity.java`)
- Help screen → Theme preferences: loads theme (evidence: `src/main/java/edu/gsu/student/csc4360/HelpActivity.java`)
- Main screen → Help screen: opens help (evidence: `src/main/java/edu/gsu/student/csc4360/MainActivity.java`)
- Help screen → Help content
- Help screen → Other help
