high priority low complexity infrastructure pending infrastructure specialist Tier 1

Acceptance Criteria

Directory structure assets/badges/locked/ and assets/badges/unlocked/ exists in the repository
At least three badge types are represented: beginner, intermediate, advanced — each with a locked and unlocked variant (6 files minimum)
All asset files are valid PNG or SVG format and render correctly in Flutter debug builds
pubspec.yaml flutter.assets section includes the assets/badges/ directory (or explicit file paths) so all badge icons are bundled
BadgeIconAssetManager can resolve paths for all six placeholder assets without throwing an AssetNotFoundException
Asset filenames exactly match the naming convention consumed by BadgeIconAssetManager (e.g., badges/unlocked/beginner.png, badges/locked/beginner.png)
No existing pubspec.yaml entries are broken or removed by this change
flutter pub get completes without errors after the pubspec.yaml change
Assets are visible and non-blank when loaded in a minimal Flutter widget test using AssetImage

Technical Requirements

frameworks
Flutter
performance requirements
Each PNG asset must be ≤ 50 KB to avoid unnecessary bundle size increase
SVG assets (if used) must be compatible with flutter_svg and render within one frame at 60 fps on low-end devices
security requirements
Assets must not contain embedded metadata with personally identifiable information
No external URLs or remote resources embedded in SVG files

Execution Context

Execution Tier
Tier 1

Tier 1 - 540 tasks

Can start after Tier 0 completes

Implementation Notes

Use a flat directory registration in pubspec.yaml (assets/badges/) rather than listing every file individually — this avoids pubspec churn as more badge types are added later. Placeholder icons can be simple geometric shapes generated by any vector editor or even created programmatically as minimal valid PNG bytes. Ensure the locked variant uses visually muted styling (e.g., greyscale silhouette) so even at the asset level it communicates a locked state. Coordinate the exact path format with the BadgeIconAssetManager implementation (task-006) before creating files to avoid a mismatch.

If SVG is chosen, add flutter_svg to pubspec.yaml dependencies and confirm it is already present before adding a duplicate entry.

Testing Requirements

Write a widget test (flutter_test) that loads each of the six placeholder assets via AssetImage or flutter_svg SvgPicture.asset and asserts the image widget renders without error. Verify pubspec.yaml registration by running flutter pub get in CI and asserting exit code 0. Confirm that a unit test calling BadgeIconAssetManager.resolveIconPath for each badge type and state returns a non-empty string matching the expected path pattern.

Component
Badge Icon Asset Manager
infrastructure low
Epic Risks (2)
high impact medium prob scope

Badge criteria are stored as structured JSON in badge_definitions. If the JSON schema for criteria (threshold counts, streak lengths, training completion flags) is not well-defined upfront, the evaluation service will be built against a moving target, requiring costly migrations and refactors.

Mitigation & Contingency

Mitigation: Define and document the criteria JSON schema in a shared type file before any repository code is written. Review the schema with all three organisations' badge requirements — especially Blindeforbundet's honorar thresholds — and version the JSON schema using a 'criteria_version' field from day one.

Contingency: If the criteria schema must change after services are built, write a Supabase migration to backfill existing rows and add a migration version column. Keep the evaluation service criteria parser isolated behind an interface so only one function needs updating.

medium impact medium prob dependency

Badge icon assets may not yet exist or may fail WCAG 2.2 AA contrast validation (minimum 3:1 for graphical objects) when rendered over design-token backgrounds. Missing or non-compliant icons could block UI epic delivery for Blindeforbundet, for whom screen reader and visual accessibility is non-negotiable.

Mitigation & Contingency

Mitigation: During this epic, implement the contrast-ratio validator in badge-icon-asset-manager and run it as a Flutter test against all candidate icon assets early. Coordinate with the design team to provide WCAG-compliant SVG icons in both locked and unlocked variants before the UI epic begins.

Contingency: If assets are late or fail contrast checks, ship placeholder icons that are guaranteed compliant (solid design-token colour fills with text labels) and swap in final assets post-QA without requiring a code change.