added full module support
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
# WMS production baseline
|
||||
|
||||
This project is organised as a modular Laravel 13 WMS suite using nwidart-style modules.
|
||||
|
||||
## Modules
|
||||
|
||||
- `Modules/Platform` - companies, MPBA system administration, licence keys, Stripe payment records and tenant/licence middleware.
|
||||
- `Modules/Warehouse` - tenant-owned warehouses and warehouse-specific validation rules.
|
||||
- `Modules/InternalApi` - HMAC-authenticated API for secure communication between separated core/admin applications.
|
||||
|
||||
## PostgreSQL
|
||||
|
||||
Use PostgreSQL 18 in production with HAProxy in front of Patroni-managed primary/replica nodes.
|
||||
|
||||
```env
|
||||
DB_CONNECTION=pgsql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=6432
|
||||
DB_DATABASE=wms_platform
|
||||
DB_USERNAME=wms_app
|
||||
DB_PASSWORD=change_me
|
||||
```
|
||||
|
||||
## Redis
|
||||
|
||||
Use Redis Sentinel for cache, queues and sessions.
|
||||
|
||||
```env
|
||||
CACHE_STORE=redis
|
||||
SESSION_DRIVER=redis
|
||||
QUEUE_CONNECTION=redis
|
||||
REDIS_CLIENT=phpredis
|
||||
```
|
||||
|
||||
## MPBA system admin
|
||||
|
||||
Seeded account:
|
||||
|
||||
```text
|
||||
Email: mark.gregory@mpba.co.uk
|
||||
Password: 987400Kmh
|
||||
Company: MPBA Limited
|
||||
```
|
||||
|
||||
MPBA Limited is marked as `is_system_company = true`; MPBA platform admins bypass licence checks.
|
||||
|
||||
## Internal API signing
|
||||
|
||||
Internal callers must send:
|
||||
|
||||
```text
|
||||
X-WMS-Timestamp: ISO8601 timestamp
|
||||
X-WMS-Signature: hash_hmac('sha256', timestamp + '.' + body, WMS_INTERNAL_API_KEY)
|
||||
```
|
||||
|
||||
Requests older than 5 minutes are rejected.
|
||||
|
||||
## Deployment sequence
|
||||
|
||||
```bash
|
||||
composer install --no-dev --prefer-dist --optimize-autoloader
|
||||
npm ci
|
||||
npm run build
|
||||
php artisan migrate --force
|
||||
php artisan db:seed --force
|
||||
php artisan config:cache
|
||||
php artisan route:cache
|
||||
php artisan view:cache
|
||||
php artisan event:cache
|
||||
php artisan queue:restart
|
||||
php artisan octane:reload
|
||||
```
|
||||
|
||||
Use rolling deployments behind HAProxy for zero downtime.
|
||||
Reference in New Issue
Block a user