Server Running: http://localhost:8001
Admin Panel: http://localhost:8001/admin
- Email: admin@pos.com
- Password: password
- Role: super-admin
- Access: Full system access
# Check Laravel version
php artisan --version
# Expected: Laravel Framework 12.38.1
# Check modules
php artisan module:list
# Expected: Core [Enabled], User [Enabled]
# Check database connection
php artisan tinker
>>> DB::connection()->getPdo();
# Should show PDO object without errorphp artisan tinker
# Test currency formatting
>>> format_currency(1234.56)
# Expected: "$1,234.56"
# Test date formatting
>>> format_date(now())
# Expected: "2025-11-17 21:23:17" (or similar)
# Test reference number generation
>>> generate_reference_number('TEST')
# Expected: "TEST-20251117212317-ABC123" (format)
# Test discount calculation
>>> apply_discount(100, 10, 'percentage')
# Expected: 90.0
# Test tax calculation
>>> calculate_tax(100, 15)
# Expected: 15.0php artisan tinker
# Test Core config
>>> config('core.currency')
# Expected: "USD"
>>> config('core.pagination.per_page')
# Expected: 15
>>> config('core.date_format')
# Expected: "Y-m-d"php artisan tinker
# Check roles
>>> \Spatie\Permission\Models\Role::pluck('name')
# Expected: ["super-admin", "admin", "manager", "cashier"]
# Check permissions count
>>> \Spatie\Permission\Models\Permission::count()
# Expected: 39 (27 custom + 12 Shield)
# Check super admin user
>>> App\Models\User::first()
# Should show user with email: admin@pos.com
# Check user has role
>>> App\Models\User::first()->roles->pluck('name')
# Expected: ["super-admin"]
# Check user permissions
>>> App\Models\User::first()->hasPermissionTo('users.view')
# Expected: trueStep 1: Navigate to Login
- Open browser: http://localhost:8001/admin
- You should see Filament login page
Step 2: Login
- Enter email:
admin@pos.com - Enter password:
password - Click "Sign in"
- Should redirect to admin dashboard
Step 3: Verify Navigation Check that you can see:
- Dashboard
- User Management group
- Users (with badge showing user count)
- Click on "Users" in navigation
- Should show users table with:
- Avatar column
- Name column
- Email column
- Phone column
- Roles badge(s)
- Active status icon
- Actions (View, Edit, Delete)
- Click "New user" button
- Fill in the form:
- Name: "Test Manager"
- Email: "manager@pos.com"
- Phone: "+1234567890"
- Password: "password"
- Is Active: ON
- Roles: Select "manager"
- Click "Create"
- Should see success notification
- New user should appear in table
- Click "Edit" on the test user
- Modify fields (e.g., change phone number)
- Click "Save changes"
- Should see success notification
- Changes should be reflected in table
- Click "View" on any user
- Should see all user details in read-only format
- Should show Edit and Delete buttons
- Edit a user
- In "Roles & Permissions" section, select multiple roles
- Save
- Verify roles show as badges in table
- Click Delete on a user
- Confirm deletion
- User should disappear from default view
- Apply "Trashed" filter
- Deleted user should appear
- Test "Restore" action
- User should be restored
- Test "Filter by Roles" - select a role
- Should show only users with that role
- Test "Active" filter
- Select "Active users only"
- Should hide inactive users
- Test "Trashed" filter
- Should show deleted users
- Use search bar to search by:
- Name
- Phone
- Results should filter instantly
- Select multiple users (checkboxes)
- Test bulk delete
- Verify all selected users are deleted
php artisan tinker
# Create a cashier user (shouldn't access panel)
>>> $cashier = \App\Models\User::create([
'name' => 'Test Cashier',
'email' => 'cashier@pos.com',
'password' => \Hash::make('password'),
'is_active' => true
]);
>>> $cashier->assignRole('cashier');
# Test panel access
>>> $cashier->canAccessPanel(app(\Filament\Facades\Filament::class)->getCurrentPanel())
# Expected: false (cashier cannot access admin panel)php artisan tinker
# Check manager permissions
>>> $manager = \App\Models\User::where('email', 'manager@pos.com')->first();
>>> $manager->hasPermissionTo('products.view')
# Expected: true
>>> $manager->hasPermissionTo('users.delete')
# Expected: false (managers can't delete users)
>>> $manager->hasPermissionTo('pos.access')
# Expected: truephp artisan tinker
# Test isActive method
>>> $user = App\Models\User::first();
>>> $user->isActive()
# Expected: true
# Test active scope
>>> App\Models\User::active()->count()
# Expected: count of active users
# Test soft deletes
>>> $user = App\Models\User::find(2);
>>> $user->delete();
>>> App\Models\User::withTrashed()->find(2)->deleted_at
# Should show deletion timestamp
>>> $user->restore();
# User should be restored- Login as super-admin
- Create a new manager user
- Logout
- Try to login as the new manager
- Verify manager can access admin panel
- Verify manager sees appropriate navigation items
- Verify manager cannot see Users management (no permission)
php artisan tinker
# Super Admin - should have all permissions
>>> $superAdmin = App\Models\User::first();
>>> $superAdmin->getAllPermissions()->count()
# Expected: 39 (all permissions)
# Manager - should have limited permissions
>>> $manager = App\Models\User::where('email', 'manager@pos.com')->first();
>>> $manager->hasPermissionTo('users.delete')
# Expected: false
>>> $manager->hasPermissionTo('sales.create')
# Expected: true- Edit a user
- Upload an avatar image
- Save
- Verify avatar appears in table
- Check file exists:
storage/app/public/avatars/
php artisan tinker
# Enable query log
>>> DB::enableQueryLog();
# Load users with roles
>>> App\Models\User::with('roles')->get();
# Check queries
>>> count(DB::getQueryLog())
# Should be minimal (2-3 queries with eager loading)- Open browser developer tools (F12)
- Navigate to Users page
- Check Network tab
- Page load should be < 2 seconds
- Try creating user with:
- Invalid email format → Should show error
- Duplicate email → Should show "email already taken"
- Empty required fields → Should show validation errors
- Logout
- Try accessing http://localhost:8001/admin directly
- Should redirect to login page
- Try wrong credentials
- Should show "These credentials do not match our records"
php artisan tinker
>>> $user = App\Models\User::where('email', 'manager@pos.com')->first();
>>> $user->update(['is_active' => false]);- Try logging in as manager@pos.com
- Should be denied access (inactive user)
- Login page displays correctly
- Dashboard loads without errors
- Navigation menu is visible and clickable
- Users table displays data correctly
- Create form has all fields
- Edit form pre-fills data
- Delete confirmation dialog appears
- Success notifications show on actions
- Error messages display for validation
- Avatars display as circular images
- Role badges have colors
- Active/Inactive icons are clear
- Search works in real-time
- Filters apply correctly
- Pagination works (if > 15 users)
- Responsive design on mobile
- Login works
- Logout works
- Create user works
- Edit user works
- Delete user works
- Restore user works
- Role assignment works
- Avatar upload works
- Password is hidden
- Password reveal toggle works
- Search filters results
- Role filter works
- Active filter works
- Trashed filter works
- Bulk actions work
- Sorting columns works
# Test module commands
php artisan module:list
php artisan module:enable User
php artisan module:disable User
php artisan module:enable User
# Test database
php artisan migrate:status
php artisan db:show
# Test cache
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan optimize:clear
# Test queue (if using)
php artisan queue:work --oncephp artisan tinker
# List all tables
>>> DB::select('SHOW TABLES')
# Check users table structure
>>> DB::select('DESCRIBE users')
# Check permissions table
>>> DB::table('permissions')->count()
# Expected: 39
# Check roles table
>>> DB::table('roles')->count()
# Expected: 4
# Check role_has_permissions
>>> DB::table('role_has_permissions')->count()
# Expected: Many (based on assigned permissions)-
Core Module
- All helper functions working
- Configuration loading correctly
- Module autoloaded properly
-
User Module
- Login/Logout functional
- User CRUD operations
- Role assignment
- Permission checking
- Soft deletes
- Avatar uploads
- Filters and search
-
Filament Admin
- Dashboard accessible
- Navigation working
- Forms validating
- Tables displaying
- Actions functioning
- Notifications showing
-
Security
- Passwords hashed
- Unauthorized access blocked
- Panel access controlled by role
- Policies enforcing permissions
- No products yet (Phase 4)
- No inventory system (Phase 5)
- No sales transactions (Phase 8)
- No POS interface (Phase 9)
- No reports (Phase 10)
Solution:
php artisan db:seed --class='Modules\User\Database\Seeders\SuperAdminSeeder'Solution:
php artisan permission:cache-reset
php artisan optimize:clearSolution:
php artisan storage:linkSolution:
npm run build
php artisan filament:upgradeOnce you've tested everything:
- Stop the server: Press Ctrl+C in terminal or
# In another terminal
pkill -f "php artisan serve"-
Report any issues found
-
Ready for Phase 4: If everything works, we can proceed to Product Module
Run this to verify everything quickly:
# Quick verification
php artisan --version && \
php artisan module:list && \
php artisan route:list --path=admin/users | head -5 && \
php artisan tinker --execute="echo 'Users: ' . App\Models\User::count() . PHP_EOL; echo 'Roles: ' . Spatie\Permission\Models\Role::count() . PHP_EOL; echo 'Permissions: ' . Spatie\Permission\Models\Permission::count() . PHP_EOL;"Server URL: http://localhost:8001/admin
Login: admin@pos.com / password
Status: ✅ Ready for Testing