Cartan is a Flutter app for managing loyalty cards, allowing you to add, organize, and access all your cards in one place.
-
Install Flutter (follow official guide):
-
Clone the repository:
git clone https://github.com/cogniwave/cartan.gitcd cartan -
Configure environment variables:
- Copy
.env.exampleto.envand fill in required keys (e.g.,SLACK_WEBHOOK_URL).
- Copy
-
Install dependencies:
flutter pub get -
Generate localization files (i18n):
flutter gen-l10n -
Run the app locally:
-
Default:
flutter run -
Dev flavor (debug):
flutter run --flavor dev --debug --target=lib/main_dev.dart -
Staging flavor (debug):
flutter run --flavor staging --debug --target=lib/main_staging.dart -
Production flavor (debug):
flutter run --flavor production --release --target=lib/main_prod.dart
-
-
Dev (debug):
flutter build apk --flavor dev --debug --target=lib/main_dev.dart -
Staging (release):
flutter build appbundle --flavor staging --release --target=lib/main_staging.dart -
Production (release):
flutter build appbundle --flavor production --release --target=lib/main_prod.dart
Generated artifacts:
- APK:
build/app/outputs/flutter-apk/app-<flavor>-<mode>.apk - AAB:
build/app/outputs/bundle/<flavor><Mode>/app-<flavor>-<mode>.aab
-
Dev (debug):
flutter build ios --flavor dev --debug --target=lib/main_dev.dart -
Staging / Production:
- Open
ios/Runner.xcworkspacein Xcode - Select the
stagingorproductionscheme - Choose your device/simulator and go to Product → Build
- Open
-
Generate the artifact (see Build section) for the desired flavor.
-
Android: Upload the
.aabto Google Play Console:- Internal Testing → Create Release → Upload
.aab→ Submit. - Production → Create Release → Upload
.aab→ Review & Publish.
- Internal Testing → Create Release → Upload
-
iOS: Submit via App Store Connect:
- Xcode → Product → Archive → Organizer → Distribute App → App Store Connect.
-
Release Notes:
- Fill in titles, descriptions, and release notes for PT and EN.
-
Credentials & Keystore:
- Android: Keep
key.propertiesin.gitignoreand store keystore securely. - iOS: Manage certificates and provisioning profiles in Apple Developer Portal.
- Android: Keep
- Open
lib/assets/data/merchants.json. - Add a new JSON entry with:
{ "id": "unique_identifier", "displayName": "Merchant Name", "formats": ["regex1", "regex2"] "assetImagePath": "assets/images/merchants/icon.svg", "website": "https://www.website.pt/", "category": "Simple" }
- Save and commit your changes.
- On next app launch, the repository will automatically load the new merchants.
Whenever you add new keys in the .arb files (under lib/l10n/), run:
flutter gen-l10n
Store assets generated with app-mockup. Base files exist in the project drive
Feel free to open issues or pull requests. Thanks for helping improve Cartan!