1.3 KiB
1.3 KiB
1. Schema & Scaffold
- 1.1
db/schema.sql: idempotentALTER TABLE users ADD COLUMN IF NOT EXISTS is_admin BOOLEAN NOT NULL DEFAULT FALSE;;make db-up - 1.2
admin/docker-compose.yml(php:8.3-fpm + composer bootstrap, port 3030, volume mount admin/); bootstraplaravel/laravelvia composer image;admin/.env→ shared DB on .13:5434 (gitignored)
2. Laravel Core
- 2.1 Eloquent models: User (is_admin), Tag, Scan, Product, Order with relationships (Tag belongsTo Product/Order; User hasMany Tag; Tag hasMany Scan)
- 2.2 Filament install (v3) + admin panel provider; admin auth gate (is_admin); seed admin user (env email/password)
3. Filament Resources
- 3.1 UserResource (list/search, view with tags+scans, suspend)
- 3.2 TagResource (list/search, view scans, product/order assignment selects, suspend/unsuspend)
- 3.3 ProductResource (CRUD sku/name/item_type)
- 3.4 OrderResource (CRUD, status lifecycle)
- 3.5 Dashboard widgets (tags by status, scans 24h, recent scans, lapsed orders)
4. Verification
- 4.1 Admin login works (is_admin user); owner (non-admin) blocked
- 4.2 CRUD smoke: create product, create order, assign product+order to a tag, suspend a tag, update order status
- 4.3 GOAT frontend unaffected (suites 53/53 on shared DB)
- 4.4
openspec validate laravel-admin; commit