SailfishOS application for fidelity cards, inspired by Apple Wallet and Google Wallet.
- QML 59.6%
- Shell 22.6%
- C++ 13%
- JavaScript 3.4%
- QMake 0.8%
- Other 0.6%
| icons | First release | |
| qml | Version 0.2.0: Import/Export | |
| rpm | Version 0.2.0: Import/Export | |
| scripts | First release | |
| src | Version 0.2.0: Import/Export | |
| tests | First release | |
| .gitignore | First release | |
| harbour-sailcards.desktop | Version 0.2.0: Import/Export | |
| harbour-sailcards.pro | Version 0.2.0: Import/Export | |
| README.md | First release | |
Sailcards
Sailcards is a SailfishOS fidelity card wallet. It lists cards with a name, a color, and a code, and shows the barcode/QR code when a card is tapped. It also provides actions to scan (take a picture) a new code and to remove cards. The app is built incrementally and follows Sailfish native UI expectations.
Install from OpenRepos.net via Storeman app: https://openrepos.net/content/amol/sailcards
User experience flow
- Open the app to a list of cards showing their names in white text on colored tiles.
- Tap a card to reveal its barcode or QR code for scanning at a store.
- Use the scan action to take a picture and add a new code.
- Use the remove action to delete a card you no longer need.
Minimal data model
Each card stores:
name: Display name for the card.color: Card color used for the list tile background.code: The barcode/QR code payload.code_type: The detected barcode type for rendering (for exampleqr,ean13,code128).
Notes:
- Names always render in white text for contrast.
- The default color for new cards is a randomly chosen hue that works with white text.
Features
- List cards with name, color, and code
- Tap to show barcode/QR code view
- Scan (take a picture) to add a new code
- Remove cards
- Persist cards across launches
- Sailfish native UI components and navigation
- Reorder cards
Development quickstart
Prerequisites:
- Docker
Commands:
./scripts/dev <target>to build and run QML tests in the Docker builder container../scripts/build <target>to build only../scripts/test <target>to run QML tests only../scripts/deploy-device USER@HOSTto install built RPMs on a real Sailfish device../scripts/emulateto build, deploy, and launch the app in a Sailfish emulator on x86_64 hosts.
Notes:
scripts/build,scripts/test, andscripts/devrun fully inside a Linux/amd64 Docker container.- Set
BUILD_NATIVE=1to opt out of Docker and run against a locally installed SDK. - The first run builds a local builder image and installs the Sailfish SDK into
.cache/container-home/SailfishOS. - The Sailfish SDK build engine still runs in Docker, through the Docker socket mounted into the builder container.
- Override the builder image platform with
SAILCARDS_DOCKER_PLATFORM=<platform>(default:linux/amd64). scripts/emulateis host-native by design and requires an x86_64 host with VirtualBox (VBoxManage) and hardware virtualization support.scripts/emulateauto-installs the selected emulator image when missing.- If emulator startup fails due host dependencies,
scripts/emulateprints manual setup guidance instead of trying distro-specific package installs. - If SDK build engine setup is broken, run
./scripts/reset-sdk --yesto reinstall the SDK.
Examples:
./scripts/emulateto use the SDKlatestemulator and matching-i486target../scripts/emulate --emulator SailfishOS-5.0.0.62to pin emulator version../scripts/emulate --skip-buildto redeploy and relaunch without rebuilding.
If the Sailfish SDK installer URL changes, override it on the build entrypoint:
SAILFISH_SDK_INSTALLER_URL=<url> ./scripts/build <target>SAILFISH_SDK_INSTALLER_VERBOSE=1 ./scripts/build <target>enables verbose installer logs.
The installer is downloaded into .cache/sailfish-sdk by default.
Roadmap / next steps
- Add validation and duplicate detection for codes
- Add import/export for backups