# mmrtonmoybd/newspaper-office-management architecture

> Architecture diagram of the GitHub repository mmrtonmoybd/newspaper-office-management, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mmrtonmoybd/newspaper-office-management
- Repository: https://github.com/mmrtonmoybd/newspaper-office-management

## Overview

Newspaper Office Management is a Laravel back-office application for staff to record advertising, cash-book transactions, press materials, and circulation, with settings and per-module access controls. Staff enter the backend through web routes; controllers validate and process records, Eloquent models persist them, and screens present lists, forms, printable views, and exports. The README establishes the principal modules; the sampled code supports several controller-to-model and balance-recalculation relationships. Unsampled modules are represented at their exact tree paths, with links omitted where their implementation could not be verified.

Main entry points: [`routes/web.php`](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/routes/web.php) (Backend routes), [`app/Http/Controllers/Cashbook/CalculationController.php`](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Cashbook/CalculationController.php) (Cash-book operations), [`app/Models/MonthlyCirculation.php`](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/MonthlyCirculation.php) (Circulation records), [`app/Http/Controllers/Ads`](https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/app/Http/Controllers/Ads) (Ad registers and panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_routes["Backend routes<br/>[web.php]"]
end

subgraph group_ads["Advertisement"]
  node_adcontrollers["Ad registers and panel"]
  node_admodels[("Ad records")]
  node_adviews["Ad screens"]
end

subgraph group_cashbook["Cash book"]
  node_cashcontroller["Cash-book operations"]
  node_categorycontroller["Cash-book categories"]
  node_cashmodels[("Books and entries<br/>[Calculation.php]")]
  node_cashcategories[("Entry categories<br/>[Category.php]")]
  node_cashviews["Cash-book screens"]
  node_cashmenu["Cash-book navigation<br/>[Cashbook.php]"]
end

subgraph group_press["Press materials"]
  node_pressink["Ink tracking"]
  node_presspaper["Paper tracking"]
  node_pressplate["Plate tracking"]
  node_pressmodels[("Press records<br/>[PressPaper.php]")]
  node_pressviews["Press screens"]
  node_pressmenu["Press navigation<br/>[Press.php]"]
end

subgraph group_circulation["Circulation"]
  node_repcontroller["Representative records"]
  node_monthlycontroller["Monthly circulation"]
  node_dailycontroller["Daily circulation"]
  node_circulationmodels[("Circulation records")]
  node_representativemodel[("Representatives")]
  node_monthlytable["Monthly data table"]
  node_circulationviews["Circulation screens"]
  node_circulationmenu["Circulation navigation<br/>[Circulation.php]"]
end

subgraph group_admin["Access and settings"]
  node_settingscontroller["Record time limits"]
  node_settingsmodel[("Application settings<br/>[Setting.php]")]
  node_settingsview["Settings screen<br/>[edit.blade.php]"]
  node_users[("Users and roles<br/>[User.php]")]
end

node_staff(("Office staff"))

node_staff -->|"opens backend"| node_routes
node_routes -->|"routes requests"| node_adcontrollers
node_routes -->|"routes requests"| node_cashcontroller
node_routes -->|"routes requests"| node_categorycontroller
node_routes -->|"routes requests"| node_pressink
node_routes -->|"routes requests"| node_presspaper
node_routes -->|"routes requests"| node_pressplate
node_routes -->|"routes requests"| node_repcontroller
node_routes -->|"routes requests"| node_monthlycontroller
node_routes -->|"routes requests"| node_dailycontroller
node_routes -->|"routes requests"| node_settingscontroller
node_adcontrollers -->|"stores records"| node_admodels
node_adcontrollers -->|"renders screens"| node_adviews
node_cashcontroller -->|"reads and writes"| node_cashmodels
node_cashcontroller -->|"uses categories"| node_cashcategories
node_categorycontroller -->|"manages categories"| node_cashcategories
node_cashcontroller -->|"renders and exports"| node_cashviews
node_cashmodels -->|"links entries"| node_cashcategories
node_pressink -->|"manages ink"| node_pressmodels
node_presspaper -->|"stores paper"| node_pressmodels
node_pressplate -->|"recalculates plate totals"| node_pressmodels
node_presspaper -->|"renders screens"| node_pressviews
node_pressplate -->|"renders screens"| node_pressviews
node_monthlycontroller -->|"creates and updates"| node_circulationmodels
node_repcontroller -->|"manages representatives"| node_representativemodel
node_dailycontroller -.->|"manages daily sales"| node_circulationmodels
node_circulationmodels -->|"belongs to"| node_representativemodel
node_monthlytable -->|"queries records"| node_circulationmodels
node_monthlytable -->|"uses representatives"| node_representativemodel
node_monthlycontroller -->|"renders screens"| node_circulationviews
node_repcontroller -->|"renders screens"| node_circulationviews
node_settingscontroller -->|"reads and updates"| node_settingsmodel
node_settingscontroller -->|"renders settings"| node_settingsview
node_cashmenu -.->|"links module routes"| node_routes
node_pressmenu -.->|"links module routes"| node_routes
node_circulationmenu -.->|"links module routes"| node_routes
node_users -.->|"access control"| node_routes

click node_routes "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/routes/web.php"
click node_adcontrollers "https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/app/Http/Controllers/Ads"
click node_admodels "https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/app/Models"
click node_adviews "https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/resources/views/backend/ads"
click node_cashcontroller "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Cashbook/CalculationController.php"
click node_categorycontroller "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Cashbook/CategoryController.php"
click node_cashmodels "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/Calculation.php"
click node_cashcategories "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/Category.php"
click node_cashviews "https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/resources/views/backend/cashbook"
click node_cashmenu "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Menu/Cashbook.php"
click node_pressink "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Press/PressInkController.php"
click node_presspaper "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Press/PressPaperController.php"
click node_pressplate "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Press/PressPlateController.php"
click node_pressmodels "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/PressPaper.php"
click node_pressviews "https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/resources/views/backend/press"
click node_pressmenu "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Menu/Press.php"
click node_repcontroller "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Circulation/RepresentativeController.php"
click node_monthlycontroller "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Circulation/MonthlyController.php"
click node_dailycontroller "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Circulation/DailyController.php"
click node_circulationmodels "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/MonthlyCirculation.php"
click node_representativemodel "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/MonthlyCirculationRepen.php"
click node_monthlytable "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Datatables/MonthlyDatatable.php"
click node_circulationviews "https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/resources/views/backend/circulation"
click node_circulationmenu "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Menu/Circulation.php"
click node_settingscontroller "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Settings/SettingsController.php"
click node_settingsmodel "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/Setting.php"
click node_settingsview "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/resources/views/backend/settings/edit.blade.php"
click node_users "https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/User.php"

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_routes toneBlue
class node_adcontrollers,node_admodels,node_adviews toneAmber
class node_cashcontroller,node_categorycontroller,node_cashmodels,node_cashcategories,node_cashviews,node_cashmenu toneMint
class node_pressink,node_presspaper,node_pressplate,node_pressmodels,node_pressviews,node_pressmenu toneRose
class node_repcontroller,node_monthlycontroller,node_dailycontroller,node_circulationmodels,node_representativemodel,node_monthlytable,node_circulationviews,node_circulationmenu,node_staff toneIndigo
class node_settingscontroller,node_settingsmodel,node_settingsview,node_users toneTeal
```

## Components

### Web entry

- [Backend routes](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/routes/web.php): `routes/web.php`

### Advertisement

- [Ad registers and panel](https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/app/Http/Controllers/Ads): `app/Http/Controllers/Ads`
- [Ad records](https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/app/Models): `app/Models`
- [Ad screens](https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/resources/views/backend/ads): `resources/views/backend/ads`

### Cash book

- [Cash-book operations](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Cashbook/CalculationController.php): `app/Http/Controllers/Cashbook/CalculationController.php`
- [Cash-book categories](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Cashbook/CategoryController.php): `app/Http/Controllers/Cashbook/CategoryController.php`
- [Books and entries](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/Calculation.php): `app/Models/Calculation.php`
- [Entry categories](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/Category.php): `app/Models/Category.php`
- [Cash-book screens](https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/resources/views/backend/cashbook): `resources/views/backend/cashbook`
- [Cash-book navigation](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Menu/Cashbook.php): `app/Menu/Cashbook.php`

### Press materials

- [Ink tracking](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Press/PressInkController.php): `app/Http/Controllers/Press/PressInkController.php`
- [Paper tracking](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Press/PressPaperController.php): `app/Http/Controllers/Press/PressPaperController.php`
- [Plate tracking](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Press/PressPlateController.php): `app/Http/Controllers/Press/PressPlateController.php`
- [Press records](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/PressPaper.php): `app/Models/PressPaper.php`
- [Press screens](https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/resources/views/backend/press): `resources/views/backend/press`
- [Press navigation](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Menu/Press.php): `app/Menu/Press.php`

### Circulation

- [Representative records](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Circulation/RepresentativeController.php): `app/Http/Controllers/Circulation/RepresentativeController.php`
- [Monthly circulation](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Circulation/MonthlyController.php): `app/Http/Controllers/Circulation/MonthlyController.php`
- [Daily circulation](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Circulation/DailyController.php): `app/Http/Controllers/Circulation/DailyController.php`
- [Circulation records](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/MonthlyCirculation.php): `app/Models/MonthlyCirculation.php`
- [Representatives](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/MonthlyCirculationRepen.php): `app/Models/MonthlyCirculationRepen.php`
- [Monthly data table](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Datatables/MonthlyDatatable.php): `app/Datatables/MonthlyDatatable.php`
- [Circulation screens](https://github.com/mmrtonmoybd/newspaper-office-management/tree/master/resources/views/backend/circulation): `resources/views/backend/circulation`
- [Circulation navigation](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Menu/Circulation.php): `app/Menu/Circulation.php`

### Access and settings

- [Record time limits](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Http/Controllers/Settings/SettingsController.php): `app/Http/Controllers/Settings/SettingsController.php`
- [Application settings](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/Setting.php): `app/Models/Setting.php`
- [Settings screen](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/resources/views/backend/settings/edit.blade.php): `resources/views/backend/settings/edit.blade.php`
- [Users and roles](https://github.com/mmrtonmoybd/newspaper-office-management/blob/master/app/Models/User.php): `app/Models/User.php`

### Other components

- **Office staff**

## Connections

- Office staff → Backend routes: opens backend (evidence: `README.md`)
- Backend routes → Ad registers and panel: routes requests (evidence: `routes/web.php`)
- Backend routes → Cash-book operations: routes requests (evidence: `routes/web.php`)
- Backend routes → Cash-book categories: routes requests (evidence: `routes/web.php`)
- Backend routes → Ink tracking: routes requests (evidence: `routes/web.php`)
- Backend routes → Paper tracking: routes requests (evidence: `routes/web.php`)
- Backend routes → Plate tracking: routes requests (evidence: `routes/web.php`)
- Backend routes → Representative records: routes requests (evidence: `routes/web.php`)
- Backend routes → Monthly circulation: routes requests (evidence: `routes/web.php`)
- Backend routes → Daily circulation: routes requests (evidence: `routes/web.php`)
- Backend routes → Record time limits: routes requests (evidence: `routes/web.php`)
- Ad registers and panel → Ad records: stores records (evidence: `app/Http/Controllers/Ads/An/AdsAnController.php`)
- Ad registers and panel → Ad screens: renders screens (evidence: `app/Http/Controllers/Ads/An/AdsAnController.php`)
- Cash-book operations → Books and entries: reads and writes (evidence: `app/Http/Controllers/Cashbook/CalculationController.php`)
- Cash-book operations → Entry categories: uses categories (evidence: `app/Http/Controllers/Cashbook/CalculationController.php`)
- Cash-book categories → Entry categories: manages categories (evidence: `app/Http/Controllers/Cashbook/CategoryController.php`)
- Cash-book operations → Cash-book screens: renders and exports (evidence: `app/Http/Controllers/Cashbook/CalculationController.php`)
- Books and entries → Entry categories: links entries
- Ink tracking → Press records: manages ink (evidence: `app/Http/Controllers/Press/PressInkController.php`)
- Paper tracking → Press records: stores paper (evidence: `app/Http/Controllers/Press/PressPaperController.php`)
- Plate tracking → Press records: recalculates plate totals (evidence: `app/Http/Controllers/Press/PressPlateController.php`)
- Paper tracking → Press screens: renders screens (evidence: `app/Http/Controllers/Press/PressPaperController.php`)
- Plate tracking → Press screens: renders screens (evidence: `app/Http/Controllers/Press/PressPlateController.php`)
- Monthly circulation → Circulation records: creates and updates (evidence: `app/Http/Controllers/Circulation/MonthlyController.php`)
- Representative records → Representatives: manages representatives (evidence: `app/Http/Controllers/Circulation/RepresentativeController.php`)
- Daily circulation → Circulation records: manages daily sales
- Circulation records → Representatives: belongs to (evidence: `app/Models/MonthlyCirculation.php`)
- Monthly data table → Circulation records: queries records (evidence: `app/Datatables/MonthlyDatatable.php`)
- Monthly data table → Representatives: uses representatives (evidence: `app/Datatables/MonthlyDatatable.php`)
- Monthly circulation → Circulation screens: renders screens (evidence: `app/Http/Controllers/Circulation/MonthlyController.php`)
- Representative records → Circulation screens: renders screens (evidence: `app/Http/Controllers/Circulation/RepresentativeController.php`)
- Record time limits → Application settings: reads and updates (evidence: `app/Http/Controllers/Settings/SettingsController.php`)
- Record time limits → Settings screen: renders settings (evidence: `app/Http/Controllers/Settings/SettingsController.php`)
- Cash-book navigation → Backend routes: links module routes (evidence: `routes/web.php`)
- Press navigation → Backend routes: links module routes (evidence: `routes/web.php`)
- Circulation navigation → Backend routes: links module routes (evidence: `routes/web.php`)
- Users and roles → Backend routes: access control
