Skip to content

Repository files navigation

Property Maintenance Tracker

A modern, maintainable, and scalable web application built for landlords and property managers to streamline real estate asset management, tenant directories, contractor assignment, and work order maintenance lifecycles.


🌟 Core Features

  • 🔐 Closed Admin Authentication: Secure login system with 5-attempt rate limiting, dynamic environment-based admin seeding, and protected route middleware.
  • 📊 Executive Dashboard: Real-time summary metrics tracking total properties, occupied/vacant units, active maintenance tickets, and high-priority emergency alerts.
  • 🏢 Property & Unit Management: Organize assets into Multi-Family, Single-Family, or Commercial properties, with detailed unit listings and occupancy statuses (occupied, vacant, maintenance).
  • 👥 Tenant Directory: Track tenant contact details, assigned rental units, and active lease start/end contract dates.
  • 🛠️ Contractor Network: Specialized contractor directory categorized by trade (plumbing, electrical, hvac, general, landscaping, cleaning).
  • 📋 Work Order Lifecycle: Interactive, filterable ticket management pipeline. Create, assign contractors, track status transitions (pendingassignedin_progresscompleted), and record completion timestamps.

📸 Feature Screenshots

1. User Authentication

Secure login screen with dynamic credentials, rate limiting, and session security.

User Authentication


2. Executive Dashboard

High-level overview of portfolio health, vacant units, active tickets, and critical emergency alerts.

Executive Dashboard


3. Property Management

Comprehensive property list displaying property type, unit count, and address.

Property List


4. Property & Unit Details

Drill-down view into individual property details, unit breakdown, and linked tenants.

Property Detail


5. Tenant Directory

Centralized directory of tenants, contact information, and lease duration.

Tenant Directory


6. Contractor Network

Directory of external contractors filtered by trade specialty and company details.

Contractor Network


7. Work Order Pipeline

Filterable ticket management board with priority badges (low, medium, high, emergency) and status updates.

Work Order Pipeline


🏗️ System Architecture & SOLID Design

The application follows strict SOLID design principles, enforcing clear separation of concerns, data abstraction, and 100% testability across all layers.

Architecture Diagram

graph TD
    Client[React Frontend / Inertia.js] -->|HTTP Requests| Router[Laravel Router / Web Middleware]
    Router -->|Guest/Auth Guard| FormReq[Form Requests Validation]
    FormReq -->|Validated DTO| Controller[Thin Controllers]
    Controller -->|Delegates Logic| Service[Service Business Logic Layer]
    Service -->|Data Contracts| RepoInterface[Repository Interfaces]
    RepoInterface -->|Dependency Inversion| EloquentRepo[Eloquent Repositories]
    EloquentRepo -->|Queries| DB[(MySQL 8 Database)]
Loading

Layer Responsibilities

  1. Thin Controllers (app/Http/Controllers): Accept HTTP requests, delegate validation to Form Requests, invoke Service methods, and return Inertia::render() responses. Zero raw DB queries in controllers.
  2. Form Requests & DTOs (app/Http/Requests & app/DTOs): Handle input validation and encapsulate request data into strongly typed Data Transfer Objects.
  3. Service Layer (app/Services): Houses all domain business rules (e.g. status transition validations, setting completed_at timestamps, summary calculation).
  4. Repository Pattern (app/Repositories): Abstracts database queries behind interfaces (PropertyRepositoryInterface, WorkOrderRepositoryInterface), bound via RepositoryServiceProvider for easy mocking in unit tests.

Directory Breakdown

property-maintenance-tracker/
├── app/
│   ├── DTOs/                      # Data Transfer Objects
│   ├── Http/
│   │   ├── Controllers/           # Thin Inertia Controllers
│   │   └── Requests/              # Form Validation Requests
│   ├── Models/                    # Eloquent Domain Models
│   ├── Providers/                 # RepositoryServiceProvider
│   ├── Repositories/
│   │   ├── Contracts/             # Data Access Interfaces
│   │   └── Eloquent/              # Eloquent Repository Implementations
│   └── Services/                  # Domain Business Logic Layer
├── database/
│   ├── migrations/                # Database Schema Migrations
│   └── seeders/                   # Dynamic Env Admin Seeder & Demo Data
├── resources/
│   └── js/
│       ├── Components/            # Reusable React UI Components
│       ├── Layouts/               # Authenticated & Guest Layouts
│       └── Pages/                 # Inertia React View Pages
├── routes/
│   └── web.php                    # Middleware Protected Web Routes
└── tests/
    ├── Feature/                   # HTTP Route & Inertia Integration Tests
    └── Unit/                      # Service & Repository Unit Tests

🛠️ Tech Stack

  • Backend Framework: Laravel 12 (PHP 8.2+)
  • Frontend Framework: React 18 with @inertiajs/react
  • Styling: Tailwind CSS v4
  • Database: MySQL 8 (Dockerized)
  • Asset Bundler: Vite
  • Testing: PHPUnit / Pest

🚀 Getting Started

Prerequisites

  • PHP >= 8.2
  • Composer
  • Node.js >= 18 & npm
  • Docker & Docker Compose

1. Clone & Install Dependencies

git clone https://github.com/your-username/property-maintenance-tracker.git
cd property-maintenance-tracker

# Install PHP dependencies
composer install

# Install Frontend dependencies
npm install

2. Environment Configuration

Copy .env.example to .env and set your desired environment credentials:

cp .env.example .env

Database & Admin Defaults in .env:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=property_maintenance
DB_USERNAME=property_user
DB_PASSWORD=secret

ADMIN_NAME="Admin Landlord"
ADMIN_EMAIL="admin@example.com"
ADMIN_PASSWORD="password"

3. Start MySQL Container

Launch MySQL 8 via Docker Compose:

docker compose up -d

4. Run Migrations & Database Seeder

Run schema migrations and populate initial admin user + sample demo data:

php artisan migrate:fresh --seed

5. Start Development Servers

Run the Laravel backend server:

php artisan serve

In a separate terminal, start the Vite development server:

npm run dev

Visit http://127.0.0.1:8000 in your web browser and log in with your admin credentials (admin@example.com / password).


🧪 Testing & Code Quality

Run the complete backend automated test suite (Unit & Feature tests):

php artisan test

Build production frontend assets:

npm run build

About

Modern, scalable Property Maintenance Tracker built with Laravel 13, Inertia.js, and React. Features real estate asset management, tenant directories, contractor assignment, and work order workflows using SOLID principles, Repository pattern, and Docker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages