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 devThe 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 styleModule 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 ModuleNameActive Modules
| Module | Description |
|---|---|
| Bills | Bills signup, pricing, tenant management, HubSpot CRM sync |
| Properties | House search, map markers, enquiries, likes, cities |
| Events | Event listings, tickets, RSVPs, applications, wallet passes |
| Rideshare | Ride creation, requests, ratings, driver profiles |
| Integrations | HubSpot, Twilio, Verifalia, Ticketmaster, email logging |
| External | External API clients (OAuth tokens, scoped access), quote prefills |
| Rental | Viewing requests, user house filters |
| Screens | App screen configuration and widgets |
| HousemateGroups | Housemate group management |
| Partners | Partner integrations |
| PerkPartners | Perk partner discounts |
| Perks | Perk tokens and redemption |
| HousrPlus | Housr Plus subscription features |
| Huddle | Huddle contract integration |
| CRMs | CRM integrations (Reapit, Street) |
| Yardi | Yardi property management integration |
Documentation
Last updated on