admin 63a2cfa5c0 feat(mobile-scanner): scaffold + Phase 1 — full scan flow
Flutter app for scanner staff at drop-off points, package
ph.verde.verde_scanner. Built on the same foundation as
mobile-driver — Riverpod 2, Dio, go_router, secure_storage —
plus mobile_scanner for native MLKit-backed QR/Code-128 detection.

Backend:
- DropOffPointResource now exposes db_id alongside the public uuid.
  The /scanner/scan endpoint takes the integer drop_off_point_id, so
  the picker screen needs both to resolve a tap → scan target.

Auth + tenancy (mirrors driver app):
- Tenant gate at /tenant with the same SAN-PASCUAL-BAT shortcut.
- Login validates user.role ∈ { scanner, admin } and stashes the
  bearer in keychain.
- ResolveTenant headers attached automatically on every request.

DOP picker (new):
- /dop screen lists drop-off points within 50 km of current GPS,
  sorted by distance. Pick one → stored in secure storage as the
  active session DOP. The router redirects authenticated scanners
  here until they pick.
- GPS prompt screen if location services / permission are missing,
  with retry.

Home screen (new):
- "STATIONED AT" banner showing the active DOP with a Change link
  that returns to the picker.
- Premium gradient "Start scanning" CTA. Disabled until a DOP is
  picked.
- Two stat counters (accepted / total) for the current session.
- Recent scans list with outcome-colored icons.

Camera scan screen (new):
- mobile_scanner with QR + Code-128 formats and noDuplicates speed.
- Verde reticle overlay with corner brackets, dimmed surroundings.
- Bottom translucent banner shows active DOP + accepted count.
- Full-screen toast overlay on every scan: green "Accepted" / amber
  "Duplicate" / red "Expired" / red "Invalid" / gray "Network
  error". Haptic + system click on accept. 1.5 s cooldown so the
  same code can't pump.
- Torch + camera-flip controls top-right.

Data layer:
- DopRepository: GET /drop-off-points/nearby, returns DopOption with
  both id and uuid.
- ScanRepository: POST /scanner/scan with current GPS, maps the
  backend's "rejected: reason[]" response onto a typed ScanOutcome
  (accepted / duplicate / expired / invalid / networkError).
- RecentScansController: in-memory ring buffer capped at 50.
  Phase 2 will persist + add an offline buffer.

Permissions:
- iOS Info.plist: NSCameraUsageDescription + NSLocationWhenInUseUsageDescription.
- Android manifest: CAMERA + ACCESS_FINE_LOCATION + INTERNET +
  uses-feature camera.

Tests: TenantScreen builds. flutter analyze: 6 style infos, no errors.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 23:49:20 +08:00

Laravel Logo

Build Status Total Downloads Latest Stable Version License

About Laravel

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:

Laravel is accessible, powerful, and provides tools required for large, robust applications.

Learning Laravel

Laravel has the most extensive and thorough documentation and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.

You may also try the Laravel Bootcamp, where you will be guided through building a modern Laravel application from scratch.

If you don't feel like reading, Laracasts can help. Laracasts contains thousands of video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.

Laravel Sponsors

We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel Partners program.

Premium Partners

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

Description
No description provided
Readme 2.8 MiB
Languages
PHP 62.4%
Blade 36.8%
JavaScript 0.6%
CSS 0.2%