3.3 KiB
OpenParcelBox Mobile App
Flutter application for local OpenParcelBox setup and administration.
User Interface
- Dark solid background
#333333, button surfaces#292929, modal surfaces#303030, accent#c19d60, and text#c6c6c6. - Project logo used for the Android launcher icon and centered native splash.
- Native splash uses the project
background.jpg. - Automatic French or English selection from the phone, with a manual override.
- Empty state restricted to box registration and encrypted-backup restoration.
- Shortcut bar for opening and history, plus modal cards for codes, NFC tags, guests, and settings.
- Guest mode hides NFC, guest administration, factory reset, and future firmware update controls.
Registration and Secure Storage
The first phone connecting to an unprovisioned box:
- chooses the box identifier;
- generates a random 128-bit administrator identity;
- sends both values over the encrypted BLE link;
- stores the remote BLE identifier, box name, role, and identity in the phone secure keystore.
An administrator creates named guest identities and displays an invitation QR code. A guest scans that QR code to register the same box and its unique guest identity. Saved boxes reconnect automatically when the application starts.
Application backups contain the saved connection records. They are protected with AES-256-GCM and a PBKDF2-SHA256 key derived from the user password before a file is written. During restoration, the application first asks for the backup file and only then requests the password needed to decrypt it.
Features
- Direct lock opening and seven-day opening history.
- Eight permanent and twenty one-time access codes.
- NFC tag listing, renaming, deletion, manual UID entry, phone NFC scanning, and enrollment through the box reader.
- Named guest creation, invitation QR display, and revocation.
- Firmware clock synchronization after connection.
- Language override, encrypted backup/restore, factory reset, and local removal of a saved box.
- Reserved disabled entry for a later firmware-update flow.
BLE Security and Protocol
The firmware requires BLE LE Secure Connections and encrypted GATT access. Bluetooth uses AES-CCM link encryption. Every application command is also authorized with the random administrator or guest identity stored in the phone keystore.
Service UUID:
f2a00000-8e7a-4f8d-9b1d-7d8e4b7a0001
Command characteristic:
f2a00001-8e7a-4f8d-9b1d-7d8e4b7a0001
State characteristic:
f2a00002-8e7a-4f8d-9b1d-7d8e4b7a0001
See docs/firmware/bluetooth.md from the repository root for the command and
state formats.
Dependencies
The app uses:
flutter_blue_plusfor BLE;flutter_secure_storagefor connection identities;mobile_scannerandqr_flutterfor guest invitations;nfc_managerfor optional phone-side NFC UID scans;file_pickerandcryptographyfor encrypted backups.
flutter_blue_plus 2.3.10 requires a license mode when connecting. The app uses
License.nonprofit for this open-source project.
Development
flutter pub get
flutter analyze
flutter test
flutter build apk --debug
Native assets can be regenerated with:
dart run flutter_launcher_icons
dart run flutter_native_splash:create