# wiwatsrt/laravel-property-management architecture

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

- Interactive diagram: https://gitdiagram.com/wiwatsrt/laravel-property-management
- Repository: https://github.com/wiwatsrt/laravel-property-management

## Overview

1. This is a Laravel 5-style monolith for a property management agency. The app is split into a public-facing site and an authenticated admin back office, with most business functionality living in the admin area.

2. The main request path is standard Laravel: HTTP routes in `app/Http/routes.php` go through middleware in `app/Http/Kernel.php`, then into controllers. The admin section is handled by controllers under `app/Http/Controllers/Admin`, while authentication is handled separately under `app/Http/Controllers/Auth`.

3. The core business subsystems are:
   - Property management
   - Location management
   - Zone location management
   - Static page management
   - Homepage slide management
   - User management
   - Site settings

4. Data access is organized with a repository layer. Each major admin domain has a repository under `app/Repositories/Admin`, backed by a shared `BaseRepository`. This sits between controllers and Eloquent models, so the architecture is controller → repository → model/database rather than controllers talking directly to models everywhere.

5. The data model is relational and intentionally normalized around multilingual content. Several entities have paired translation models and tables:
   - `Location` / `LocationTranslation`
   - `ZoneLocation` / `ZoneLocationTranslation`
   - `Page` / `PageTranslation`
   - `Property` / `PropertyTranslation`
   This points to a translatable-content boundary where the base record stores shared attributes and translation tables store localized text.

6. Validation is separated from controllers through form request classes in `app/Http/Requests/Admin` and user-related request classes at the root. The flow is: route → controller → request validation → repository/model save. This keeps CRUD controllers thin and moves input rules into dedicated classes.

7. The admin UI is server-rendered Blade templates under `resources/views/admin`. The repeated `create/edit/index/show/table/fields` view structure suggests generated CRUD scaffolding. The UI uses the bundled AdminLTE theme in `public/AdminLTE-2.3.3`, with jQuery-based widgets such as DataTables, CKEditor, datepicker, Select2, and color picker.

8. Public presentation is also Blade-based, with shared layouts in `resources/views/layouts` and site pages like `home.blade.php` and auth views under `resources/views/auth`. The app is not an API-first service; it is a server-rendered MVC application.

9. File upload/storage is part of the architecture. Public upload directories exist for `property` and `slideHomes`, indicating image/media assets are stored on disk and then served from `public/uploads/...`. This is a distinct content pipeline from the database-backed records.

10. The property domain includes supporting enumerations and formatting helpers in `app/Support`, such as category, ownership, parking, swimming pool, type, view, and currency formatting. These are domain constants/utilities used to keep property metadata consistent across forms and views.

11. Internationalization is a first-class concern. Language files in `resources/lang/en` cover auth, validation, pagination, and each domain object. Combined with the translation tables and `config/translatable.php`, the app is built to render localized content per model, not just static UI text.

12. Infrastructure-wise, this is a conventional PHP/Laravel deployment: Composer-managed backend, Gulp/Node asset tooling, database migrations and factories, and Travis CI for build/test automation. Runtime behavior is mostly synchronous web request handling; queues, events, and jobs exist but are not central in this repository snapshot.

13. For an architecture diagram, the clearest boundaries are: browser/admin UI → Laravel HTTP layer → validation/repository/domain models → database, with a separate file-storage path for uploaded property and slideshow assets. The public site and admin console share the same backend but are functionally distinct entry points.

Main entry points: [`app/Repositories/Admin`](https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Repositories/Admin) (Admin repos), [`app/Http/Kernel.php`](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/Kernel.php) (Middleware), [`app/Http/Controllers/Admin`](https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Http/Controllers/Admin) (Admin controllers), [`app/Models`](https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Models) (Models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_entry["Entry points"]
  node_browser(("Browser<br/>client"))
end

subgraph group_g_http["Laravel HTTP"]
  node_routes["Routes<br/>[routes.php]"]
  node_kernel["Middleware<br/>http kernel<br/>[Kernel.php]"]
  node_home_ctrl["Home<br/>public controller<br/>[HomeController.php]"]
  node_auth_ctrl["Auth<br/>[AuthController.php]"]
  node_admin_ctrls["Admin controllers<br/>back-office controllers"]
  node_admin_reqs["Admin requests<br/>form requests"]
end

subgraph group_g_domain["Admin domains"]
  node_property_domain["Property mgmt<br/>domain"]
  node_location_domain["Location mgmt<br/>domain"]
  node_content_domain["Content mgmt<br/>domain<br/>[PageRepository.php]"]
  node_user_settings["Users/settings<br/>admin domain"]
end

subgraph group_g_data["Data layer"]
  node_base_repo["Base repo<br/>repository base<br/>[BaseRepository.php]"]
  node_admin_repos["Admin repos<br/>repositories"]
  node_models[("Models")]
  node_db_migrations["Migrations<br/>schema"]
  node_uploads[("Uploads<br/>file storage")]
end

subgraph group_g_views["Presentation"]
  node_admin_views["Admin views<br/>blade templates"]
  node_public_views["Public views<br/>blade templates"]
end

subgraph group_g_support["Shared support"]
  node_support{{"Support<br/>domain helpers"}}
  node_lang["i18n<br/>translations"]
end

subgraph group_g_infra["Infrastructure"]
  node_build["Build/runtime<br/>tooling<br/>[composer.json]"]
end

node_browser -->|"HTTP"| node_routes
node_routes -->|"middleware"| node_kernel
node_kernel -->|"public"| node_home_ctrl
node_kernel -->|"auth"| node_auth_ctrl
node_kernel -->|"admin"| node_admin_ctrls
node_admin_ctrls -->|"validate"| node_admin_reqs
node_admin_ctrls -->|"use"| node_admin_repos
node_admin_reqs -->|"submit"| node_admin_repos
node_admin_repos -->|"extends"| node_base_repo
node_admin_repos -->|"persist"| node_models
node_models -->|"schema"| node_db_migrations
node_property_domain -->|"implements"| node_admin_repos
node_location_domain -->|"implements"| node_admin_repos
node_content_domain -->|"implements"| node_admin_repos
node_user_settings -->|"implements"| node_admin_repos
node_admin_ctrls -->|"render"| node_admin_views
node_home_ctrl -->|"render"| node_public_views
node_auth_ctrl -->|"render"| node_public_views
node_admin_views -->|"strings"| node_lang
node_public_views -->|"strings"| node_lang
node_models -->|"translate"| node_lang
node_models -->|"media"| node_uploads
node_support -->|"constants"| node_property_domain
node_build -.->|"assets"| node_admin_views
node_build -.->|"assets"| node_public_views

click node_routes "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/routes.php"
click node_kernel "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/Kernel.php"
click node_home_ctrl "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/Controllers/HomeController.php"
click node_auth_ctrl "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/Controllers/Auth/AuthController.php"
click node_admin_ctrls "https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Http/Controllers/Admin"
click node_admin_reqs "https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Http/Requests/Admin"
click node_base_repo "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/BaseRepository.php"
click node_admin_repos "https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Repositories/Admin"
click node_models "https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Models"
click node_db_migrations "https://github.com/wiwatsrt/laravel-property-management/tree/master/database/migrations"
click node_property_domain "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/Admin/PropertyRepository.php"
click node_location_domain "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/Admin/LocationRepository.php"
click node_content_domain "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/Admin/PageRepository.php"
click node_user_settings "https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/Admin/SettingRepository.php"
click node_admin_views "https://github.com/wiwatsrt/laravel-property-management/tree/master/resources/views/admin"
click node_public_views "https://github.com/wiwatsrt/laravel-property-management/tree/master/resources/views"
click node_uploads "https://github.com/wiwatsrt/laravel-property-management/tree/master/public/uploads"
click node_support "https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Support"
click node_lang "https://github.com/wiwatsrt/laravel-property-management/tree/master/resources/lang/en"
click node_build "https://github.com/wiwatsrt/laravel-property-management/blob/master/composer.json"

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_browser,node_build toneBlue
class node_routes,node_kernel,node_home_ctrl,node_auth_ctrl,node_admin_ctrls,node_admin_reqs toneAmber
class node_property_domain,node_location_domain,node_content_domain,node_user_settings toneMint
class node_base_repo,node_admin_repos,node_models,node_db_migrations,node_uploads toneRose
class node_admin_views,node_public_views toneIndigo
class node_support,node_lang toneTeal
```

## Components

### Entry points

Public and authenticated request entry paths

- **Browser**: client · Public site and admin users interacting with the monolith

### Laravel HTTP

Routing, middleware, controllers, and request validation

- [Routes](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/routes.php): http routes · Main request routing entrypoint · `app/Http/routes.php`
- [Middleware](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/Kernel.php): http kernel · Global and route middleware pipeline · `app/Http/Kernel.php`
- [Home](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/Controllers/HomeController.php): public controller · Public-facing site controller · `app/Http/Controllers/HomeController.php`
- [Auth](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Http/Controllers/Auth/AuthController.php): auth controllers · Login and password flows · `app/Http/Controllers/Auth/AuthController.php`
- [Admin controllers](https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Http/Controllers/Admin): back-office controllers · CRUD controllers for properties, locations, pages, slides, settings, users, and zones · `app/Http/Controllers/Admin`
- [Admin requests](https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Http/Requests/Admin): form requests · Separated validation rules for admin CRUD and users · `app/Http/Requests/Admin`

### Admin domains

Business subsystems exposed through the admin back office

- [Property mgmt](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/Admin/PropertyRepository.php): domain · Property CRUD and supporting enumerations · `app/Repositories/Admin/PropertyRepository.php`
- [Location mgmt](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/Admin/LocationRepository.php): domain · Location and zone-location administration · `app/Repositories/Admin/LocationRepository.php`
- [Content mgmt](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/Admin/PageRepository.php): domain · Pages and homepage slides · `app/Repositories/Admin/PageRepository.php`
- [Users/settings](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/Admin/SettingRepository.php): admin domain · User administration and site settings · `app/Repositories/Admin/SettingRepository.php`

### Data layer

Repositories, models, migrations, and persistence boundaries

- [Base repo](https://github.com/wiwatsrt/laravel-property-management/blob/master/app/Repositories/BaseRepository.php): repository base · Shared repository behavior and conventions · `app/Repositories/BaseRepository.php`
- [Admin repos](https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Repositories/Admin): repositories · Domain repositories between controllers and models · `app/Repositories/Admin`
- [Models](https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Models): eloquent models · Relational domain records and translation models · `app/Models`
- [Migrations](https://github.com/wiwatsrt/laravel-property-management/tree/master/database/migrations): schema · Normalized schema for users, content, properties, translations, and settings · `database/migrations`
- [Uploads](https://github.com/wiwatsrt/laravel-property-management/tree/master/public/uploads): file storage · Disk-backed property and slide image assets · `public/uploads`

### Presentation

Blade templates and frontend assets

- [Admin views](https://github.com/wiwatsrt/laravel-property-management/tree/master/resources/views/admin): blade templates · Scaffolded CRUD screens under the admin layout · `resources/views/admin`
- [Public views](https://github.com/wiwatsrt/laravel-property-management/tree/master/resources/views): blade templates · Shared layouts, home page, and auth screens · `resources/views`

### Shared support

Cross-cutting helpers, constants, and localization

- [Support](https://github.com/wiwatsrt/laravel-property-management/tree/master/app/Support): domain helpers · Property enums, formatting helpers, and select lists · `app/Support`
- [i18n](https://github.com/wiwatsrt/laravel-property-management/tree/master/resources/lang/en): translations · Localized UI and domain strings with translatable content support · `resources/lang/en`

### Infrastructure

Build, runtime, and deployment support

- [Build/runtime](https://github.com/wiwatsrt/laravel-property-management/blob/master/composer.json): tooling · Composer, Gulp, Travis, and Laravel runtime support · `composer.json`

## Connections

- Browser → Routes: HTTP · All web requests enter through Laravel routes
- Routes → Middleware: middleware · Routes pass through the middleware pipeline
- Middleware → Home: public · Public site requests reach the home controller
- Middleware → Auth: auth · Authentication endpoints are handled separately
- Middleware → Admin controllers: admin · Authenticated back-office requests reach admin controllers
- Admin controllers → Admin requests: validate · CRUD input is validated through form requests
- Admin controllers → Admin repos: use · Controllers delegate persistence and query logic to repositories
- Admin requests → Admin repos: submit · Validated payloads flow into repositories
- Admin repos → Base repo: extends · Admin repositories share common repository behavior
- Admin repos → Models: persist · Repositories read and write Eloquent models
- Models → Migrations: schema · Models map to the normalized relational schema
- Property mgmt → Admin repos: implements · Property repository is the primary admin domain entry
- Location mgmt → Admin repos: implements · Location and zone repositories handle geographic content
- Content mgmt → Admin repos: implements · Page and slide repositories manage site content
- Users/settings → Admin repos: implements · User and settings flows use repository-backed persistence
- Admin controllers → Admin views: render · Admin controllers render CRUD Blade screens
- Home → Public views: render · Public pages render shared Blade templates
- Auth → Public views: render · Auth views are server-rendered Blade templates
- Admin views → i18n: strings · Admin screens use localized labels and validation messages
- Public views → i18n: strings · Public site and auth views use language files
- Models → i18n: translate · Translatable models align with model translation tables and i18n content
- Models → Uploads: media · Property and slide content is paired with on-disk uploads
- Support → Property mgmt: constants · Property metadata helpers keep form and display values consistent
- Build/runtime → Admin views: assets · Frontend tooling supports the admin UI stack
- Build/runtime → Public views: assets · Frontend tooling supports the public site styles and scripts
