Phase 1: Backend Image Dashboard¶
Priority: ASAP Complexity: Low Dependencies: None
Goal¶
Create an admin view showing coffee beans with image thumbnails, accessible from the review dashboard.
Current State¶
CoffeeBean.imageUrl: nullable VARCHAR(255) storing external URLs- Images extracted from JSON-LD Product schema or Open Graph
og:imagemeta tags - EasyAdmin 4.x with custom CRUD controllers and dashboards
- Image URL is one of 6 "strongly recommended" fields affecting data quality status
Implementation¶
New CRUD Controller: CoffeeBeanImageCrudController¶
- Focused view with minimal fields: name, roaster name, coffee bean status, available, image thumbnail
- Filters: roaster, has/missing image URL, data status
- Sortable by creation date
Fields Configuration¶
yield ImageField::new('imageUrl')->setLabel('Image');
yield TextField::new('name')->setLabel('Bean Name');
// Roaster name via CrawlUrl relationship (formatted field)
yield ChoiceField::new('status')->setLabel('Status');
Filters¶
RoasterFilter(existing) - filter by roaster- Custom filter for
imageUrl IS NOT NULL/IS NULL ChoiceFilterfor CoffeeBeanStatus
Menu & Dashboard Integration¶
- Add menu item in DashboardController under "Coffee Bean Management"
- Add link card in
review_dashboard.html.twig
Files to Create/Modify¶
| File | Action |
|---|---|
src/Controller/Admin/CoffeeBeanImageCrudController.php |
Create |
src/Filter/HasImageFilter.php |
Create (if needed) |
src/Controller/Admin/DashboardController.php |
Modify (add menu item) |
templates/admin/review_dashboard.html.twig |
Modify (add link card) |
Reference Files¶
src/Controller/Admin/CoffeeBeanCrudController.php- CRUD controller patternsrc/Controller/Admin/DashboardController.php- Menu configurationsrc/Filter/RoasterFilter.php- Custom filter patterntemplates/admin/review_dashboard.html.twig- Dashboard template