7.8 KiB
Technology Stack
Analysis Date: 2026-02-13
Languages
Primary:
- PHP 8.1+ - Backend framework, ORM, business logic
Secondary:
- TypeScript - Not used (JavaScript tooling only)
- JavaScript - Frontend interactivity via Alpine.js and Vite build
Runtime
Environment:
- Laravel 10 (minimum 10.10)
- PHP 8.1+ (configured in
composer.json)
Package Managers:
- Composer (PHP) - Dependency management for backend
- Lockfile:
composer.lock(present)
- Lockfile:
- npm (Node.js) - Frontend asset builds and development
- Lockfile:
package-lock.json(present)
- Lockfile:
Frameworks
Core Backend:
- Laravel 10 - Full-stack web framework for routing, models, migrations, services
- Location:
app/,routes/,config/,database/
Frontend Templating:
- Blade (Laravel templating engine) - Server-side template rendering
- Location:
resources/views/
Frontend Interactivity:
- Alpine.js 3.4 - Lightweight reactive JavaScript for form handling and DOM manipulation
- Package:
alpinejs@^3.4.2inpackage.json
Build & Asset Pipeline:
- Vite 5 - Fast build tool for compiling CSS/JS
- Package:
vite@^5.0.0 - Config:
vite.config.js(Laravel Vite plugin configured)
- Package:
- Laravel Vite Plugin - Integration between Laravel and Vite
- Package:
laravel-vite-plugin@^1.0.0
- Package:
Styling:
- Tailwind CSS 3.1 - Utility-first CSS framework
- Package:
tailwindcss@^3.1.0 - Dark mode:
darkMode: 'class'configured in tailwind config - Forms plugin:
@tailwindcss/forms@^0.5.2for styled form elements
- Package:
- PostCSS 8.4.31 - CSS processing
- Autoprefixer 10.4.2 - Browser vendor prefixes
Testing:
- PHPUnit 10.1 - PHP unit testing framework
- Config:
phpunit.xml - Test directory:
tests/
- Config:
- Laravel Dusk 8.3 - Browser testing framework for end-to-end tests
- Run:
php artisan dusk
- Run:
- Mockery 1.4.4 - PHP mocking library for tests
Development Quality:
- Laravel Pint 1.0 - Code style formatter (PSR-12)
- Laravel Tinker 2.8 - Interactive PHP REPL
- Laravel Breeze 1.29 - Lightweight authentication scaffolding
- FakerPHP 1.9.1 - Fake data generation for seeders
- Spatie Ignition 2.0 - Error page debugging companion
- Collision 7.0 - Error page styling
DevOps/Deployment:
- Laravel Sail 1.18 - Docker-based local development environment (optional)
Key Dependencies
Critical Business Logic:
-
spatie/laravel-permission6.23 - RBAC role and permission system- Used for: Finance approvals, user role management
- Config:
config/permission.php - Tables:
roles,permissions,model_has_roles,model_has_permissions,role_has_permissions
-
barryvdh/laravel-dompdf3.1 - PDF generation for finance reports- Used for: Document export, compliance reports
- Provider:
Barryvdh\DomPDF\ServiceProvider
-
maatwebsite/excel3.1 - Excel file import/export- Used for: Member data imports, financial report exports
- Laravel 10 compatible version
HTTP & API Integration:
guzzlehttp/guzzle7.2 - HTTP client for external requests- Used in:
SiteRevalidationServicefor Next.js webhook calls - Location:
app/Services/SiteRevalidationService.php
- Used in:
QR Code Generation:
simplesoftwareio/simple-qrcode4.2 - QR code generation library- Used for: Member ID verification, document tracking
Authentication:
laravel/sanctum3.3 - API token authentication and CSRF protection- Used for: Public API endpoints (
/api/v1/*) - Config:
config/sanctum.php - Stateful domains:
localhost,127.0.0.1(customizable via env)
- Used for: Public API endpoints (
Configuration
Environment Configuration:
.env.example- Template for environment variables- Required variables (non-secret):
APP_NAME,APP_ENV,APP_DEBUG,APP_URL- Application identityDB_CONNECTION,DB_HOST,DB_PORT,DB_DATABASE,DB_USERNAME,DB_PASSWORD- DatabaseMAIL_MAILER,MAIL_HOST,MAIL_PORT,MAIL_FROM_ADDRESS- EmailCACHE_DRIVER,QUEUE_CONNECTION,SESSION_DRIVER- Caching/queueingREGISTRATION_ENABLED- Toggle public registration on/offNEXTJS_REVALIDATE_URL,NEXTJS_REVALIDATE_TOKEN- Webhook to frontendNEXTJS_PUBLIC_PATH- Optional: Local Next.js repo for asset syncing
Core Configs:
config/app.php- Timezone:Asia/Taipei, Locale:zh_TW, Cipher:AES-256-CBCconfig/database.php- Database connection options (MySQL primary, SQLite dev)config/auth.php- Authentication guards (session-based), public registration toggleconfig/mail.php- SMTP, Mailgun, Postmark, SES supportconfig/accounting.php- Account codes, amount tier thresholds, currency (TWD)config/filesystems.php- Local, public, private, and S3 disk definitionsconfig/cache.php- File (default), Redis, Memcached, DynamoDB supportconfig/queue.php- Sync (default), database, Redis, SQS, Beanstalkd supportconfig/services.php- Third-party service credentials (Mailgun, Postmark, AWS SES, Next.js webhooks)config/logging.php- Monolog channels (stack, single, daily, Slack, Papertrail)config/cors.php- CORS policy for API endpointsconfig/session.php- Session driver and lifetime (120 minutes default)
Database
Primary (Production):
- MySQL 5.7+ (configured in
config/database.php) - Character set:
utf8mb4, Collation:utf8mb4_unicode_ci - Strict mode enabled
Development:
- SQLite supported as alternative (
DB_CONNECTION=sqlite) - Location:
database/database.sqlite
Migrations:
- Directory:
database/migrations/ - Run:
php artisan migrate - Fresh reset:
php artisan migrate:fresh --seed
Caching & Session
Cache (Default: File):
- Driver:
file(can be switched to Redis, Memcached, DynamoDB) - Location:
storage/framework/cache/data/ - Used for: Settings caching (
settings()helper), query result caching
Sessions (Default: File):
- Driver:
file(can be switched to database, Redis, etc.) - Lifetime: 120 minutes
- Storage:
storage/framework/sessions/
Queue (Default: Sync):
- Driver:
sync(processes jobs immediately in production, can usedatabase/redis) - Used for: Email sending, bulk operations
- Failed jobs table:
failed_jobs
Mailers Supported:
- SMTP (default) - Mailgun, custom SMTP servers
- Mailgun API
- Postmark API
- AWS SES
- Log (development)
- Failover chains (SMTP → Log)
Dev Default:
- Mailpit (mock SMTP server) on
localhost:1025 - Configured in
.env.examplefor local testing
Mail Queue:
- All transactional emails use
Mail::...->queue()for async sending - Location: Email classes in
app/Mail/
File Storage
Private Files:
- Disk:
private(stores instorage/app/) - Access: Served via controller responses only (no direct URL)
- Used for: Encrypted documents, sensitive uploads
Public Files:
- Disk:
public(stores instorage/app/public/) - URL: Accessible via
/storage/...after runningphp artisan storage:link - Used for: Admin-uploaded images, article attachments
Optional S3:
- Disk:
s3(configured for AWS S3) - Requires:
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_DEFAULT_REGION,AWS_BUCKET
Next.js Asset Sync (Optional):
- Location:
config/services.php→nextjs.public_path - Feature: Auto-copy uploaded images to Next.js
public/directory - Git integration: Optional auto-commit and push of assets
- Used for: Serving static images from static Next.js build
Deployment
Hosting Targets:
- Dedicated servers (traditional deployment with PHP-FPM + Nginx)
- Docker (via Laravel Sail)
- Vercel/Netlify (headless API mode)
Production Considerations:
- Database: Migrate to MySQL 8.0+
- Cache: Switch from
fileto Redis for multi-server setups - Queue: Switch from
synctodatabaseorredis - Session: Switch from
filetodatabaseorredis - Mail: Configure Mailgun/SES for production email
- Storage: Use S3 for file uploads instead of local disk
- Assets: Compile with
npm run buildbefore deployment
Stack analysis: 2026-02-13