How wiwatsrt/laravel-property-management works
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: Repositories/Admin Admin repos · Kernel.php Middleware · Controllers/Admin Admin controllers · Models Models
Components 21
Entry points
Public and authenticated request entry paths
- Browser · Public site and admin users interacting with the monolith
Laravel HTTP
Routing, middleware, controllers, and request validation
- Routes · Main request routing entrypoint
app/Http/routes.php - Middleware · Global and route middleware pipeline
app/Http/Kernel.php - Home · Public-facing site controller
app/Http/Controllers/HomeController.php - Auth · Login and password flows
app/Http/Controllers/Auth/AuthController.php - Admin controllers · CRUD controllers for properties, locations, pages, slides, settings, users, and zones
app/Http/Controllers/Admin - Admin 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 · Property CRUD and supporting enumerations
app/Repositories/Admin/PropertyRepository.php - Location mgmt · Location and zone-location administration
app/Repositories/Admin/LocationRepository.php - Content mgmt · Pages and homepage slides
app/Repositories/Admin/PageRepository.php - Users/settings · User administration and site settings
app/Repositories/Admin/SettingRepository.php
Data layer
Repositories, models, migrations, and persistence boundaries
- Base repo · Shared repository behavior and conventions
app/Repositories/BaseRepository.php - Admin repos · Domain repositories between controllers and models
app/Repositories/Admin - Models · Relational domain records and translation models
app/Models - Migrations · Normalized schema for users, content, properties, translations, and settings
database/migrations - Uploads · Disk-backed property and slide image assets
public/uploads
Presentation
Blade templates and frontend assets
- Admin views · Scaffolded CRUD screens under the admin layout
resources/views/admin - Public views · Shared layouts, home page, and auth screens
resources/views
Shared support
Cross-cutting helpers, constants, and localization
Infrastructure
Build, runtime, and deployment support
- Build/runtime · Composer, Gulp, Travis, and Laravel runtime support
composer.json
Connections 25
- 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