Skip to Content
API v2Overview

Housr API v2

Housr API v2 is a modern RESTful API built with Laravel 12 and nwidart/laravel-modules v12 for modular architecture. It serves as the primary backend for the Housr mobile app, web app, bills website, and third-party integrations.

Stack

  • PHP 8.2 / Laravel 12
  • nwidart/laravel-modules for domain-driven module organisation
  • Pest v4 for testing
  • Larastan (PHPStan level 8) for static analysis
  • Laravel Pint for code formatting
  • Spatie Query Builder for filterable/sortable API endpoints
  • Saloon for HTTP integrations (HubSpot, Oakmans, etc.)
  • Firebase JWT for legacy authentication
  • Sentry for error tracking
  • Docker (PHP-FPM + Nginx + Supervisor) for deployment

Quick Start

# Install dependencies composer install npm install # Copy environment file cp .env.example .env php artisan key:generate # Run migrations (main DB + bills DB) php artisan migrate # Start all services (server, queue, logs, vite) composer dev

The composer dev command starts four processes concurrently:

  • php artisan serve --host=0.0.0.0 --port=8001 (API server)
  • php artisan queue:listen --tries=1 (queue worker)
  • php artisan pail -v --timeout=0 (log tail)
  • npm run dev (Vite for module assets)

Development Commands

# Run the full check suite (tests + lint + static analysis) composer check # Individual checks composer check:tests # Pest tests composer check:lint # Pint code style check composer check:static # PHPStan static analysis # Code formatting vendor/bin/pint # Auto-fix code style

Module Commands

# List all modules php artisan module:list # Generate a new module php artisan module:make ModuleName # Run module-specific migrations php artisan module:migrate ModuleName # Generate module components php artisan module:make-controller ControllerName ModuleName php artisan module:make-model ModelName ModuleName php artisan module:make-request RequestName ModuleName

Active Modules

ModuleDescription
BillsBills signup, pricing, tenant management, HubSpot CRM sync
PropertiesHouse search, map markers, enquiries, likes, cities
EventsEvent listings, tickets, RSVPs, applications, wallet passes
RideshareRide creation, requests, ratings, driver profiles
IntegrationsHubSpot, Twilio, Verifalia, Ticketmaster, email logging
ExternalExternal API clients (OAuth tokens, scoped access), quote prefills
RentalViewing requests, user house filters
ScreensApp screen configuration and widgets
HousemateGroupsHousemate group management
PartnersPartner integrations
PerkPartnersPerk partner discounts
PerksPerk tokens and redemption
HousrPlusHousr Plus subscription features
HuddleHuddle contract integration
CRMsCRM integrations (Reapit, Street)
YardiYardi property management integration

Documentation

Last updated on