A high-performance, multi-tenant team productivity SaaS built with Laravel 11.
FocusFlow is a modern project management platform designed for teams. It features deep multi-tenancy, real-time collaboration via WebSockets, and a robust API-driven architecture.
It was built as a comprehensive portfolio project demonstrating senior-level Laravel architecture, test-driven development (TDD), and modern SaaS best practices.
(Placeholder for 2-minute Loom Video URL)
(Placeholder for Production Deployment URL)
- Multi-Tenant Architecture: Complete data isolation using scoped pivot tables (
workspace_user) and dynamic Eloquent Global Scopes. - Real-Time Collaboration: Live task updates (assigned, moved, commented) and presence channels using Laravel Reverb.
- Role-Based Access Control (RBAC): Fine-grained permissions using Policies and Gates (Admin, Member, Viewer).
- Stripe Billing Integration: Pro vs Free tiers using Laravel Cashier with webhook processing.
- Background Processing: Redis-backed queues managed by Laravel Horizon for email digests and Slack webhook notifications.
- 100% Test Coverage: Developed using Strict TDD with Pest PHP. Fully automated CI pipeline.
FocusFlow follows the Action-Domain-Responder (ADR) pattern over traditional MVC to keep controllers thin and logic highly testable.
graph TD
Client[Vue 3 SPA] -->|REST API| Router[Laravel Router]
Client <-->|WebSockets| Reverb[Laravel Reverb]
Router --> Middleware[WorkspaceScope / Auth / Rate Limits]
Middleware --> Controller[API Controllers]
Controller --> Actions[Action Classes e.g. CreateTaskAction]
Actions --> DB[(PostgreSQL)]
Actions --> Events[Domain Events]
Events --> Listener[Event Listeners]
Events --> Broadcaster[BroadcastManager]
Listener --> Queue[Redis / Horizon]
Queue --> External[Slack / Stripe / SMTP]
👉 Read the full Architecture Decision Record (ADR) for a deep dive into the design patterns.
👉 Review the complete API Documentation for endpoint details.
To get FocusFlow running locally in under 5 minutes, you only need Docker and PHP installed.
git clone https://github.com/dreamymc/focusflow.git
cd focusflow
composer install
cp .env.example .env
php artisan key:generateStart the required external services (PostgreSQL, Redis) via Docker Compose:
docker-compose up -dRun migrations and populate the database with realistic sample data:
php artisan migrate:fresh --seed --seeder=DemoSeederRun the local development servers:
# Terminal 1: Laravel API
php artisan serve
# Terminal 2: Reverb WebSockets
php artisan reverb:start
# Terminal 3: Vite Frontend
pnpm install && pnpm run devOpen your browser to http://localhost:8000 to access the Interactive WebSocket Demo.
Since FocusFlow is primarily a headless API, we included a lightweight Vue 3 harness to demonstrate Reverb WebSockets in real-time.
- Import the Postman collection located at
docs/postman/FocusFlow.postman_collection.json. - Trigger the "Move Task" API endpoint or fire an event via Tinker.
- Watch the Notification Bell on the dashboard light up instantly!
The codebase maintains 100% test coverage using Pest PHP. The test suite includes full feature testing for WebSockets and Stripe Webhooks without requiring external services.
# Run the test suite
php artisan test
# Run with coverage report
php artisan test --coverageThis project is open-sourced software licensed under the MIT license.
