Laravel 12 backend application for the BeLive FlowOffice management system.
- PHP 8.3 or higher
- Composer
- Node.js 18+ and npm
- PostgreSQL (via Supabase) or SQLite for local development
mbstringpdopdo_pgsql(for Supabase/PostgreSQL)pdo_sqlite(optional, for local development)
-
Install dependencies
composer install npm install
-
Environment setup
cp .env.example .env php artisan key:generate
-
Configure environment variables
Edit
.envand configure:- Supabase credentials (see
.env.examplefor details) - Database connection
- Cache driver (recommended:
CACHE_STORE=filefor development)
- Supabase credentials (see
-
Run setup script
composer run setup
This will:
- Install Composer dependencies
- Copy
.envif it doesn't exist - Generate application key
- Run migrations
- Install npm dependencies
- Build assets
composer run devThis starts:
- Laravel development server
- Queue worker
- Log viewer (Pail)
- Vite dev server
# Testing
composer run test # Run all tests
php artisan test --filter=TestName # Run specific test
# Code Quality
vendor/bin/pint --dirty # Format code
# Supabase
php artisan supabase:test # Test Supabase connection
php artisan supabase:seed # Seed database using SQL files
# Laravel Boost (AI Development)
php artisan boost:install # Install/update Boost
php artisan boost:update # Update Boost resources
php artisan boost:mcp # Start MCP serverThe project uses SQL files for seeding Supabase database. This approach is recommended for infrastructure setup and initial data.
Location: SQL seed files are stored in database/seeds/sql/
Usage:
# Seed all SQL files (executed in alphabetical order)
php artisan supabase:seed
# Seed a specific file
php artisan supabase:seed 001_initial_setup.sqlSafety Features:
- Automatically blocks DELETE, TRUNCATE, and DROP operations
- Uses transactions for rollback on errors
- Requires
--forceflag for dangerous operations - Warns in production environment
File Naming Convention:
- Use numbered prefixes:
001_description.sql,002_description.sql - Files are executed in alphabetical order
Example:
# Create your seed file
# database/seeds/sql/001_initial_setup.sql
# Run the seeder
php artisan supabase:seed
# Or seed specific file
php artisan supabase:seed 001_initial_setup.sqlSee docs/SUPABASE_SEEDING.md for detailed guide and best practices.
The application follows a modular monolith pattern:
app/Modules/
├── Shared/ # Cross-cutting concerns
│ ├── Contracts/ # Interfaces
│ ├── Events/ # Domain events
│ └── ValueObjects/
├── Attendance/ # Attendance module
├── Leave/ # Leave management module
└── Claims/ # Claims module
See docs/MODULE_STRUCTURE.md for detailed architecture documentation.
Configure Supabase in .env:
SUPABASE_URL=https://xxxxx.supabase.co
SUPABASE_KEY=your-anon-key
SUPABASE_SECRET=your-service-role-key
SUPABASE_JWT_SECRET=your-jwt-secretTest connection:
php artisan supabase:testFor AI-assisted development with Cursor/Claude Code:
- Install Boost:
php artisan boost:install - Configure MCP server (see docs/LARAVEL_BOOST_INSTALLATION.md)
- Set
CACHE_STORE=filein.envfor development
Tests are located in the tests/ directory:
# Run all tests
php artisan test
# Run specific test file
php artisan test tests/Feature/ExampleTest.php
# Run with filter
php artisan test --filter=testNameSee docs/TEST_PLAN.md for testing guidelines.
This project uses Laravel Pint for code formatting:
vendor/bin/pint --dirty- Module Structure - Architecture details
- Laravel Boost Installation - AI development setup
- Test Plan - Testing strategy
laravel/framework^12.0saeedvir/supabase^1.0 - Supabase integration & JWT generationspatie/laravel-activitylog^4.11 - Audit trail logging
- Replaced by Supabase JWT (validated by Next.js BFF)laravel/sanctum- Replaced by Supabase RLS policiesspatie/laravel-permission
See Architecture Decisions for details on the Supabase-first approach.
laravel/boost^2.1 - AI development assistantlaravel/pint^1.24 - Code formatterphpunit/phpunit^11.5.3 - Testing framework
If Laravel Boost MCP server fails to start:
- Check PHP extensions:
php -m | grep mbstring - Set
CACHE_STORE=filein.env - Clear config cache:
php artisan config:clear - See Laravel Boost Installation Guide
- Verify Supabase credentials in
.env - Test connection:
php artisan supabase:test - Check PDO drivers:
php -m | grep pdo
For development, use file cache:
CACHE_STORE=fileThis avoids database dependencies and PDO driver requirements.
[Your License Here]