Proofora

Photograph a receipt, keep the items you bought, and see the last day to return each one and the day its warranty ends, counted on the phone, with reminders and a claim pack.

Flutter and Material 3Light and dark Laravel back end includedLanding page included

AI disclosure

AI-assisted tools were used during development and testing to help write and review the source code and the documentation of this item. The author reviewed, tested and finalized every part before release. The 14 photographs are licensed Pexels stock, each listed with its photographer in assets/images/goods/LICENSES.txt, and the six sample receipts are SVG drawings written for this item; no image-generation model was used. The app also has an AI-powered feature; the last chapter, AI disclosure, says what it does.

Services you pay for

Reading a receipt is a paid AI call. Outside demo mode, the receipt reader needs an OpenAI, Anthropic or Google Gemini API account: either yours, behind the included key proxy, or each user's own key. The provider bills every receipt read; Proofora and its author charge nothing per use. Also yours to pay for if you use them: hosting for the key proxy (any PHP 8.4 host), an Apple Developer membership and a Google Play developer account to publish, and the stores' commission on in-app purchases. Firebase (push, analytics, crash reports) is optional and on its free tier.

1What Proofora does, in short

Proofora is a Flutter app for keeping the receipts of things people buy and the two dates that matter for each of them: the last day to return it, and the day its warranty ends. A photo of a receipt is read by a vision model of the buyer's choosing; the person checks what was read, keeps the lines they want to watch, and the app counts both dates on the phone from the purchase date and the shop's returns policy. Reminders go off before each date, and everything a shop asks for at the counter (receipt, serial number, product and box photos, warranty card, a note) sits on one clipboard that can be shared in one go.

The download holds three folders. proofora_ai_app/ is the Flutter app (11 routes, 108 tests). backend/ is a Laravel key proxy with a Filament admin panel: it keeps the AI provider keys on your server, runs only this app's three reading jobs, meters each phone and logs every request (128 tests of its own). landing/ is a one-page product website already in the app's colors.

One idea is worth knowing before you read on: the model only copies what is printed. It never works out a date, a policy or a price. Both deadlines come from a small engine in plain Dart, so they are the same on every route, offline, and in the tests.

Every screen
Every screen of the app, from onboarding to the paywall, light and dark.

How the parts fit together

What talks to what, and over which line. Every arrow is a network call; anything without an arrow stays on the phone.

+--------------------------------------------+
| proofora_ai_app/  (Flutter)                |
|   iOS and Android app                      |
|   keeps its own data on the phone          |
+--------------------------------------------+

                      |  HTTPS, JSON under /api, Bearer token
                      v
+--------------------------------------------+
| Laravel key proxy  (backend/)              |
|   holds the AI provider keys               |
|   per-device limits and usage              |
|   admin panel at /admin                    |
+--------------------------------------------+
                      |
                      +--> MySQL / MariaDB (or SQLite to try it)
                      +--> OpenAI / Anthropic / Google Gemini (your keys)
                      +--> Firebase Cloud Messaging (push)

The app also talks straight to:
  - Firebase (push, analytics and crash reports)
  - App Store and Google Play, for in-app purchases
  - an AI provider directly, when the person types their own key into Settings

Out of the box the app runs on sample data with no server at all; giving it the address of your copy of backend/ is what switches the server arrows on. The server never calls a phone first; push messages reach it through Firebase.

2Run it in five minutes

You need Flutter on your machine (any current stable release; flutter doctor should be clean) and a simulator, an emulator or a phone. Nothing else: the app opens in demo mode on six sample receipts, so no key, server or account is needed for a first look.

From the proofora_ai_app folder of the download:

flutter pub get
flutter run                 # pick a simulator or a connected phone

On the first screen tap Skip; there is no account to make. On the Scan tab, tap Scan a receipt, pick the first sample receipt and tap Read the receipt: the roll prints, the faded date waits for you to confirm it, and Track the chosen lines turns its two lines into items with dates.

To check the project itself:

flutter analyze          # expect: No issues found!
flutter test             # expect: All tests passed!  (108 tests)

To read your own receipts, turn demo mode off in Settings and open Who reads the receipts: paste a Gemini, OpenAI or Claude key, or the address of the included server (chapter "The included key proxy").

3Running it without a terminal

Everything in this manual can be done without typing a command.

  • Android Studio or IntelliJ: File → Open the proofora_ai_app folder, accept "Get dependencies" in the banner, choose a device in the toolbar and press Run. Build → Flutter → Build APK / App Bundle makes a release build.
  • VS Code with the Flutter extension: File → Open Folder, then Run → Start Debugging; the device picker is in the status bar.
  • Xcode (for an iPhone build): open ios/Runner.xcworkspace after one "Get dependencies" in an IDE, choose the Runner target and press Run.
  • The server goes online through a hosting control panel (cPanel, Plesk) and phpMyAdmin; the section Shared hosting with no terminal in the production chapter has the seven steps.

4Every command, and what it does

This glossary lists every command the manual uses. Commands that destroy data say so in bold.

CommandWhat it does
flutter pub getDownloads the app's packages. Run it once after unzipping and after editing pubspec.yaml.
flutter runBuilds and starts the app on the chosen device, in debug mode.
flutter analyzeStatic checks over the whole project. It should say No issues found!
flutter testRuns the 108 tests: the date engines, the backup round trip, the AI jobs against the server's prompts, the screens.
flutter run --dart-define=API_BASE_URL=https://<your-server>Starts the app pointed at your key proxy: the server route is chosen and demo mode starts off.
flutter build appbundle --releaseThe Android App Bundle for Google Play, in build/app/outputs/bundle/release/; signed with your upload key from android/key.properties, without which it stops (chapter Demo builds and release builds).
flutter build ipa --releaseThe iOS archive for App Store Connect, in build/ios/ipa/.
dart run flutter_launcher_iconsRebuilds every launcher icon from assets/icon/ after you replace the artwork.
composer installInstalls the server's PHP packages (in backend/).
./install.shFirst-time server setup in one go: packages, .env, app key, database, sample data.
php artisan migrateAdds any new tables to your database. Additive: it never drops a table that holds data.
php artisan demo:seedFills the panel with sample devices and requests so it is not empty on day one.
php artisan demo:clearRemoves the sample devices and requests; asks before it deletes (add --force to skip the question).
php artisan migrate:fresh --seedDeletes every table and builds them again with sample data. Every device, request, setting and kept photo record is gone, and there is no confirmation and no undo. Only for a test copy.
docker compose up -dStarts the server, its database and its scheduler in Docker.
docker compose down -vStops Docker and deletes its database volume: everything stored in it is gone. Without -v the data is kept.
composer testRuns the server's 128 tests on a throwaway database.

5A map of the project folders

proofora_ai_app/
  lib/
    main.dart                     the three stores, the services, start-up
    app/core/                     theme, colors, fonts, shared widgets
      widgets/receipt_roll.dart   the till-paper strip
      widgets/day_stack.dart      the tear-off pages
      widgets/docket_clip.dart    the claim pack clipboard and its tiles
      widgets/awning_card.dart    the shop cards
    app/data/
      engines/                    policy book, deadlines, reminders, claim pack; plain Dart
      providers/                  the three AI jobs: prompt, schema, demo answer
      models/                     receipt, item, shop card, proof, country
      mock/sample_data.dart       the sample receipts and items; screens never import it
      services/                   stores, the AI route, photos, reminders, backup
    app/modules/                  one folder per screen
    l10n/                         English, Spanish, Arabic
  assets/images/goods/            the sample photographs (Pexels) and LICENSES.txt
  assets/images/receipts/         the six sample receipts, with their SVG sources
  packages/                       the nine feature packs and the AI routes package
backend/                          the Laravel key proxy and admin panel
landing/                          the product website

The rule that keeps it easy to change: no screen in app/modules imports a store, an engine or the sample data. Screens ask ProofService and ReaderService, and those two are the only places that know where data lives and which model answers.

6Scan: the first tab

The first tab. A receipt photo runs across the top with the wordmark and the avatar that opens Settings; under it a line of three numbers (items watched, dates in the next 30 days, receipts kept), the next date that is coming up as a tear-off page, and the receipts already kept, newest first. Each receipt row is cut with a torn edge, like the slip it came from; tapping it opens the receipt roll again. The Scan a receipt button opens the camera screen.

The Scan tab
The Scan tab in demo mode: three numbers, the next date (the headphones must go back in three days) and five kept receipts.

In demo mode a line under the numbers says the receipts are samples and nothing is saved. The date the app treats as today is pinned in demo mode (Monday 19 October 2026), so the sample's "in 3 days" reads the same on every run.

7Taking the receipt photo

One receipt is one or two photos: a long receipt can be taken in two halves (at most 2, lib/app/modules/capture/capture_controller.dart:24, the same limit the key proxy applies). Photos come from the camera or the library; on the web the library button opens a file picker. Each photo is resized when it is picked (long edge 1600 px, JPEG quality 85), which keeps it inside the server's per-image limit.

In demo mode the six sample receipts are shown as a grid. Demo mode reads only those six: a real photo comes back empty, for you to fill in by hand, and the screen says so. Read the receipt sends the photos to the route chosen in Settings; No receipt? Add an item by hand opens a short form instead (name, shop, price, purchase date).

The camera screen
The camera screen in demo mode with the first sample receipt chosen; Read the receipt is enabled.

8The receipt roll

What came back is shown as a strip of till paper: the shop, the purchase date, each line with its price, the total, and a chip for the return period printed in the footer. A new reading prints out one row every 120 ms (lib/app/modules/receipt/receipt_controller.dart:34).

The reader reports how sure it was of four groups: shop, date, total and lines. A group it was unsure of is underlined in coral with a Confirm button, and nothing on the receipt can become an item until every such group is confirmed or corrected. Tapping any field opens it for editing, and an edit counts as a confirmation.

The round button beside each line chooses what to track; taxes, fees and discounts have no button. Track the chosen lines makes one item per line, each with its own return and warranty dates, and goes to the Items tab, where the new ones carry a New mark. When the footer's return period and the shop's card disagree, a note says so; the receipt wins for the items made from it.

A sample receipt read, confirmed and tracked
The first sample receipt is chosen and read; the roll prints row by row with the date underlined in coral; Confirm clears it, Track the chosen lines turns the thermostat and the mounting plate into items, and the Items tab shows both marked New.
A receipt waiting for a confirmation
A reading with one unsure field: the faded purchase date waits for Confirm, and Track stays disabled until it is.

9Due: the tear-off wall

Every dated deadline of every open item, soonest first, as a wall of tear-off calendar pages. The binding strip says which date it is (Return by or Warranty ends); a page within 7 days turns coral (lib/app/data/engines/deadline_engine.dart:52), and a date that has gone stays on the wall, struck through, for 14 days (lib/app/data/services/proof_service.dart:55). The header counts the dates in the next 30 days; the chips show returns only or warranties only.

The top page has two buttons: Claim pack opens the item, and Returned (on a return date) or Claimed (on a warranty date) closes the item. The page tears off and the next one moves up; the item moves to Items → Done, where it can be opened again.

The top page torn off
The wall opens on the headphones' return date, coral because it is three days away; Returned is tapped, the page lifts, tilts and fades, and the smartphone's warranty date becomes the top page.

10Items and their claim packs

The items being watched, open ones by their nearest date and the returned or claimed ones under Done. Each card shows the product photo, the shop, the nearest date (coral when it is close) and how many of the six pieces of proof it has. The + button adds an item that has no receipt.

Opening an item shows its two dates, each with where its period came from: set for this item, from the receipt, from the shop's card or from the default card. Tapping a date sets a period for this one item only.

An item and its two dates
The washer: the return date comes from the shop card (90 days), the warranty from the receipt (24 months).

Under the dates is the claim pack: a clipboard with six tiles, receipt, serial number, product photo, box, warranty card and note. A tile with something on it is ticked; an empty one has a dashed outline and adds the piece. Share the claim pack sends the photos and a plain-text summary through the share sheet. What to say at the counter writes three short lines from the facts on the page, with no photo sent.

A complete claim pack
A complete pack: all six pieces, ready to share.
Counter lines
The three counter lines for the washer, written from the dates and the proof it holds.

11Stores and their policies

Each shop has a card under a striped awning: its return window in days, its own warranty in months, and whether it needs the receipt. The gray Default policy card is used for every shop without a card of its own. Shop names are matched loosely, so "HARBOR APPLIANCES INC." on a receipt finds the card called "Harbor Appliances".

Opening a card shows two steppers, a switch and the shop's conditions. Read the policy fills the card from text pasted off the shop's website, or from a photo of the sign at the till; the photo is used for that one reading and deleted afterwards. Nothing changes until Save, and once saved, every date that depends on the card moves.

The Stores tab
The default card and four shop cards, each with its return window, warranty and receipt rule.
A policy read from text
Fernway Outfitters' card after reading the pasted policy: the return window changed from 45 to 30 days.

12Settings, AI routes and the paywall

Settings opens from the avatar on the Scan tab. From the top:

  • Demo mode: sample receipts, nothing written to disk. Turn it off and the app keeps what you add.
  • Reading receipts: Who reads the receipts opens the AI routes screen (below); Where the receipts are from decides whether 03/04 is March 4th (United States, Canada) or 3 April.
  • Reminders: on or off, and which of 30, 7 and 1 day before.
  • Appearance, language, lock, push and usage statistics: the feature packs' switches.
  • Keep photos on the server: off until switched on (chapter "Where receipts and photos are kept").
  • Your data: export a backup, restore one, copy every item as CSV, delete everything.
Settings
Reading receipts and Reminders: the route, the country and the three reminder leads.

The AI routes screen lists the included server and the three providers. The chosen one opens up: the server address and a Test the server button, or a key field, a model field (empty means the route's default) and links to get a key and to the provider's current model names.

AI routes
The AI routes screen with Gemini chosen: key, model and the two links.

The paywall lifts the free plan's limit on watched items; About explains, in the app, how the dates are worked out.

Free and Pro, side by side

FeatureFreePro
Items watched at the same time10No limit
Receipts read, with any of the four routesEvery oneEvery one
Return and warranty dates, reminders, claim packsYesYes
Store policies, backup, CSV, the server's photo copiesYesYes

Closed items (returned, claimed, past both dates) do not count toward the limit. As shipped the paywall runs on the mock store and says so; chapter "Setting up in-app purchases" switches the real stores on. A build connected to your server with no store switched on holds nothing back and never shows the paywall.

The first run

Onboarding, the Scan tab and the paywall
What a new user meets, left to right: the first and the last onboarding page, the Scan tab the app opens on (there is no sign-in: records stay on the phone) and the paywall.

13How the two dates are counted

Both dates are worked out by DeadlineEngine in lib/app/data/engines/deadline_engine.dart, which has no Flutter import, no clock of its own and no randomness: the same item and policy always give the same dates.

  • Last day to return = purchase date + the return period in calendar days. A 30-day window from 1 October ends on 31 October.
  • Warranty ends = the same day of the month, that many months later, clamped to the month's last day: 31 January + 1 month is 28 February (29 in a leap year) (lib/app/data/engines/deadline_engine.dart:56).
  • A period that nobody stated gives no date. The app never guesses one.

Which period counts is decided by PolicyBook (lib/app/data/engines/policy_book.dart:43), separately for the return window and the warranty, first one that states a number:

  1. a period set on the item itself;
  2. what the receipt's footer printed ("Returns within 30 days");
  3. the shop's card;
  4. the default card.

The tests in test/engines_test.dart pin each rule: month ends, 29 February, a footer that contradicts the card, a shop with no card, and six ways a shop name can be written.

14The receipt reader and its three jobs

Three jobs ask a model anything, one file each in lib/app/data/providers/:

JobSendsGets back
receipt_readone or two receipt photos and a country lineshop, date, currency, total, lines, printed return and warranty periods, and how sure it was of each group
policy_readpasted policy text, a photo of the sign, or bothreturn days, warranty months, whether a receipt is required, up to four conditions
claim_linesthe item, shop, dates and proof held, as textthree short sentences to say at the counter

Each file holds the instruction, the JSON schema of the reply and the demo answer. The instruction is the same text the server keeps for the job in backend/config/ai_tasks.php; test/proxy_tasks_sync_test.dart fails if the two drift apart, so all four routes ask the model the same thing. The instruction tells the model to copy only what is printed, never to invent a period or estimate a price, and not to return card numbers, names or addresses.

Four routes answer: Google Gemini, OpenAI and Anthropic Claude with the person's own key, called directly over REST, and the included key proxy, which holds the keys itself. Demo mode is a fifth route that answers on the phone. AiService (lib/app/data/services/ai_service.dart:12) picks the route; no screen holds one.

Error handling: every failure comes back as a sentence a person can act on (no key, a rejected key, a model name that no longer exists, an exhausted quota, an unreachable server, a photo too large), shown with Try again and, when the fix is a setting, Open settings. Typed-in items, dates, reminders, shop cards and claim packs keep working whatever the route says.

15Where receipts and photos are kept

Receipts, items and shop cards are three stores in the phone's encrypted storage: the Keychain on iOS, EncryptedSharedPreferences on Android. Each is written as one versioned JSON envelope, so a later release can migrate it on first launch. Photos (receipts, products, boxes, warranty cards) are files in the app's documents folder, and records name a photo by file name only, never by a device path.

Where photos go. A receipt photo leaves the phone to be read, to the route chosen in Settings. Copies stay on the included server only when the person switches on Keep photos on the server: then each new photo goes up a few seconds after it is taken, under this phone's device id, and a photo deleted on the phone is deleted there. Turning the switch off deletes every copy on the server. A policy-sign photo is never kept: it is deleted right after it is read.

Delete everything in Settings removes the three stores and every photo on the phone, the photo copies on the server, and the server's record of this phone; the next reading registers as a new device.

16Keeping a copy: backup and CSV

Export a backup writes one JSON file with every receipt, item and shop card and hands it to the share sheet, so it can go to Files, iCloud Drive, Google Drive, mail or another phone. Each store's part is exactly what that store writes to the phone, so a round trip is byte for byte (test/backup_service_test.dart exports, wipes, imports and compares, once through the clipboard path and once through the file picker).

Restoring a backup

Settings → Restore a backup asks where the backup is:

  • A file on this phone opens the system file picker (Files on iOS, the document picker on Android, both of which also reach cloud drives such as iCloud Drive or Google Drive when they are set up on the phone). It offers .json and .txt files and needs no permission on either platform. This is the usual way: save the exported file on the new phone, then pick it here.
  • The clipboard is the fallback for a file that only opens in another app: open it there, Select All, Copy, come back and choose this.

Either way the app first checks the text and shows how many items it holds and when it was exported (Restore this backup?); nothing changes until you press Restore. A restore replaces every receipt, item and shop card on the phone, and turns demo mode off first so the restored records are kept. A file that is not a backup, or one from another app, is refused with a sentence saying why. The picker is the file_selector plugin, called from BackupService.pickFileText in lib/app/data/services/backup_service.dart.

Photos after a restore on a new phone

Photos are not inside the backup file. A record names its photos (photo-….jpg) and the photos themselves stay in the app's folder on the old phone, so a backup restored on a new phone brings back every receipt, item, date and note, and points at photos that are not there yet. What the app does with that:

  • Each missing photo shows as a plain gray tile with a receipt icon wherever the photo would be (items list, item page, claim pack, receipt). Nothing crashes and no record is lost.
  • The claim pack still counts that piece as held, because the record names it. Share the claim pack sends the summary and every photo that is on the phone, and leaves out the ones that are missing.
  • To put a product, box or warranty card photo back, open the item, tap its tile and choose Camera or Library; the new photo takes the old one's place. Remove this photo on the same sheet clears it instead, so the claim pack lists it as missing.
  • A receipt's own photo cannot be swapped: the receipt screen has no button for it. Everything read from it (shop, date, lines, prices) is in the backup and stays.

Copies on the included server, for people who switched on Keep photos on the server, are kept per install, under the old phone's device token, not under an account. A new phone registers as a new device with a new random key, so the app on it does not see them and does not download them. They stay on the server until that old device is deleted on the Devices page, or until the old phone switched the option off or used Delete everything, which delete them. If you run the server and someone asks for their photos:

  1. In the admin panel open Pictures. The Owner column names the device (its note from the Devices page, or its number and platform) and File is the photo's name.
  2. The files are on the server's private disk at storage/app/private/media/device-<id>/<file>; copy that device's folder (SFTP or the host's file manager) and send the pictures to the person.
  3. On the new phone they save the pictures to the photo library and attach each one with Library on the item's tile, as above.

Copy everything as CSV puts one row per item on the clipboard, with both dates, for a spreadsheet.

17Demo mode and the sample receipts

Demo mode is on in a fresh install and in the Live Preview. The stores are filled from lib/app/data/mock/sample_data.dart (five receipts, eight items, four shop cards and the default card) and nothing is written to disk; the date is pinned to Monday 19 October 2026, so the sample dates read the same every time.

Reading in demo mode answers from the same file: each of the six sample receipt photos has the reply a model would give, including one with a faded date the reader is unsure of. A photo that is not a sample comes back empty. Turning demo mode off in Settings makes the stores live; turning it on again sets your own data aside and brings it back when demo mode goes off.

The shops, lines and amounts on the sample receipts are invented; nothing copies a real shop's layout, logo or barcode. Replace the files under assets/images/receipts/ and assets/images/goods/, and the sample file, with your own.

18Return and warranty reminders

Every open date gets a reminder per lead switched on in Settings (30, 7 and 1 day before by default), at 9 in the morning (lib/app/data/engines/reminder_engine.dart:39). A lead that has already passed is skipped, and a return window shorter than a week gets only the 1-day reminder. The list is worked out again whenever an item, a receipt or a shop card changes, and handed to the phone, which keeps the earliest 60 (iOS keeps at most 64 per app). Reminders are the phone's own: no server and no push service is involved, and none are scheduled in demo mode.

19Your name, bundle id and icon

<angle-brackets> in this manual stand for your own values.

The name. The brand is written in one file, lib/app/core/values/app_identity.dart:13: name (shown in the app), slug (the storage key prefix) and wordmark (the splash). The name under the icon is set in three more places: android:label in android/app/src/main/AndroidManifest.xml, and CFBundleDisplayName and CFBundleName in ios/Runner/Info.plist.

The bundle id. Android: namespace and applicationId in android/app/build.gradle.kts (now com.proofora.proofora_ai_app), and the folder path of MainActivity.kt. iOS: open ios/Runner.xcworkspace, select the Runner target, Signing & Capabilities, and change Bundle Identifier (now com.proofora.prooforaAiApp).

The app icon.

  1. Make one square PNG, 1024 × 1024 px, with no transparency and no rounded corners (the stores round it themselves).
  2. For Android's adaptive icon, make a second 1024 × 1024 PNG with a transparent background and the mark kept inside the middle 72%, so the circular mask cannot cut it.
  3. Save them as assets/icon/app_icon.png and assets/icon/app_icon_foreground.png, and set adaptive_icon_background in pubspec.yaml to your color.
  4. Run dart run flutter_launcher_icons: it rewrites every mipmap-* folder and ios/Runner/Assets.xcassets/AppIcon.appiconset.
  5. Delete the app from the device and install it again; launchers cache the old icon.

The splash draws the same mark in code (BrandMark in lib/app/modules/splash/splash_view.dart); replace its painter with your own shape.

20Re-skinning

Four files decide the look:

  • lib/app/core/theme/app_colors.dart: every color, light and dark side by side. The brand has three grades: the fill (buttons, the tile, white text on it), a bright grade for the dark theme and large blocks, and a deep grade for brand-colored words on the light ground. Coral is kept for one meaning: a date that is close or a field that waits for a tap.
  • lib/app/core/theme/app_text_theme.dart: the three families. Fonts are bundled files in assets/fonts/, never downloaded at run time; to swap one, drop the files in, update the fonts: block of pubspec.yaml and the constant here, and update assets/fonts/LICENSES.txt.
  • lib/app/core/widgets/app_card.dart: the paper-slip card and its torn edge.
  • lib/app/core/values/app_spacing.dart: page margin, gaps and corner radii.

The admin panel takes the same teal from backend/app/Providers/Filament/AdminPanelProvider.php, and the landing page from the :root color variables at the top of landing/index.html.

21Changing which tabs sit at the bottom

The four bottom tabs are wired in three places:

  1. lib/app/modules/main/main_controller.dart: the MainTab indexes (lib/app/modules/main/main_controller.dart:16).
  2. lib/app/modules/main/main_view.dart: the IndexedStack children, the _tabIds list (the keys tests tap) and the navItem(...) rows of the bottom bar.
  3. lib/app/modules/main/main_binding.dart: one Get.lazyPut per tab controller.

To add a tab, add one entry in each, a tab.<name> key to the three language files in lib/l10n/, and a glyph in lib/app/core/widgets/tab_glyphs.dart. To remove one, take it out of all three and renumber MainTab so the indexes stay 0, 1, 2. Watch two things: an index left pointing past the end shows an empty page, and test/app_smoke_test.dart taps the tabs by key.

22Left for you to wire up, and the constants

Everything below works in demo mode as shipped and is left for you to wire up with your own accounts. Each item says which file to touch.

  • Firebase (push and analytics): run flutterfire configure, then set const bool firebaseConfigured = false; (lib/firebase_config.dart:18) to true. Chapter "Feature packs".
  • In-app purchases: your product ids go in iapProductIds (lib/app/core/values/feature_config.dart:56); build with --dart-define=IAP=on. Receipt validation is a hook for your own code: PurchaseGateway in packages/qh_iap.
  • Store links for update prompts: androidStoreUrl and iosStoreUrl in feature_config.dart, once the app is listed.
  • Published terms and privacy pages: termsUrl and privacyUrl; until then the texts in assets/legal/ open in the app. Fill the [square brackets] in both.

Switching Firebase on, once flutterfire configure has written lib/firebase_options.dart:

const bool firebaseConfigured = false;

// becomes

const bool firebaseConfigured = true;

The constants worth knowing, and where they live:

WhatWhereNow
Free plan's watched itemslib/app/data/services/subscription_service.dart:11910
When a date turns coral (days)lib/app/data/engines/deadline_engine.dart:527
How long a passed date stays on the wall (days)lib/app/data/services/proof_service.dart:5514
Reminder leads (days before)lib/app/data/services/settings_service.dart:5230, 7, 1
Hour reminders go offlib/app/data/engines/reminder_engine.dart:399
Photos per receiptlib/app/modules/capture/capture_controller.dart:242
Characters of pasted policy textlib/app/data/providers/policy_read_job.dart:13600
Default policy for new installslib/app/data/mock/sample_data.dart:15030 days, 12 months
Requests per phone per day (server)backend/app/Models/AiSetting.php (and the AI proxy page)50
Requests per day, all phones (server)backend/app/Models/AiSetting.php2000

23Changing the reader and its limits

When a model name is retired. Providers retire model names every so often; the app then shows "the model is no longer available" with an Open settings button. Type a current name in the route's Model field (the screen links to each provider's model list). The defaults are defaultModel in packages/qh_ai/lib/src/gemini_provider.dart, openai_provider.dart and claude_provider.dart; on the server they are set on the admin panel's AI proxy page.

Adding a piece of proof. Add a value to ProofKind (lib/app/data/models/proof.dart:3); say whether it is a photo in isPhoto; add proof.<name> to the three language files. The clipboard, the count and the shared summary pick it up.

Changing the default policy. On a phone: Stores → Default policy. For every new install: the Default policy entry in lib/app/data/mock/sample_data.dart.

Adding a country. Add it to Country (lib/app/data/models/country.dart:4) with its date order and currency mark, add a country.<CODE> key, and if the code is not two capital letters widen the input_line pattern of receipt_read in backend/config/ai_tasks.php (the sync test checks every country against it).

Changing what the model is asked. Edit the instruction in the job's file and the same text in backend/config/ai_tasks.php; flutter test fails until the two match.

24Release builds for Google Play and the App Store

Android, for Google Play.

  1. Make an upload keystore once: keytool -genkey -v -keystore ~/<upload-keystore>.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload. Keep it and its passwords safe; a lost keystore cannot be recovered.
  2. Create android/key.properties with storePassword, keyPassword, keyAlias=upload and storeFile=<path to the .jks>; it is not in version control.
  3. android/app/build.gradle.kts already reads that file for every release build (android/app/build.gradle.kts:15); without it a release build stops with No android/key.properties. A release is never signed with the debug key.
  4. flutter build appbundle --release and upload build/app/outputs/bundle/release/app-release.aab in Play Console → your app → Production → Create new release.

iOS, for the App Store.

  1. Open ios/Runner.xcworkspace in Xcode, select the Runner target, open Signing & Capabilities, tick Automatically manage signing and choose your Team (it is None as shipped).
  2. Check the privacy texts in ios/Runner/Info.plist; the app uses four: NSCameraUsageDescription (photographing receipts and products), NSPhotoLibraryUsageDescription (picking a photo), NSPhotoLibraryAddUsageDescription (saving a shared image) and NSFaceIDUsageDescription (the lock).
  3. flutter build ipa --release, then upload build/ios/ipa/*.ipa with Transporter or Xcode → Organizer → Distribute App, and finish the listing in App Store Connect.

Both stores ask for a privacy policy URL and a data safety form: say that receipt photos go to the AI provider you use, and to your server only when the person keeps them there.

25When Proofora gets a new version

When a newer release of Proofora comes out:

  • Replace lib/app/data/engines/, lib/app/data/providers/, packages/ and the server's app/, database/migrations/ and routes/.
  • Keep yours: app_colors.dart, app_text_theme.dart, app_identity.dart, feature_config.dart, lib/l10n/ if you changed wording, assets/, and on the server .env, config/panel.php and config/ai_tasks.php if you changed a prompt.
  • Database: php artisan migrate only adds tables and columns; check the new files in database/migrations/ for any drop or rename before you run it on a live install, and take a database export first.
  • Customizations survive if they stay in the files above. Compare the two releases with a diff tool before copying, and copy folder by folder rather than over the whole project.

Phones keep their data across an update: each store is versioned and migrated on first launch.

If a migration fails halfway

MySQL and MariaDB commit every table change as it runs, so a migration that stops in the middle cannot roll itself back: some of its changes are in, the rest are not, and Laravel has not recorded it as run. Back up before every update so this is never more than an inconvenience:

mysqldump --single-transaction -u USER -p DATABASE > before-update.sql
  1. Put the site in maintenance mode so nothing writes meanwhile: php artisan down.
  2. Find where it stopped. php artisan migrate:status lists every migration as Ran or Pending; the first Pending one is the one that failed. The error itself is at the end of storage/logs/laravel.log.
  3. Open that migration file and compare it with the database: a table it creates that already exists, or a column it adds that is already there, is what it got through before it stopped.
  4. Either remove those half-made pieces by hand and run php artisan migrate --force again, or restore the backup (mysql -u USER -p DATABASE < before-update.sql), fix the cause (most often a full disk, a timeout or a missing database permission) and run the update again.
  5. php artisan up when migrate:status shows nothing pending.

Never run migrate:fresh or migrate:reset on a live server: both drop every table.

26Who bills you for what

Third-party services this app can talk to, and who pays:

  • AI providers (Google Gemini, OpenAI, Anthropic): every reading is a billed request on the key that makes it, the person's own or the one on your server. Gemini has a free tier through AI Studio.
  • Your server for the key proxy: any PHP 8.4 host or a Docker machine.
  • Firebase (push, analytics, crash reports): free tiers, then billed by Google.
  • Apple Developer Program and Google Play Console: needed to publish and to sell in-app purchases.

Each of them bills you directly; none is included in the purchase price.

27Troubleshooting

Each row starts with what you will actually see, the app's own words in italics, then why and what to check next. Questions that are not errors are in the chapter Questions buyers ask first.

What you seeWhyWhat to check next
Add your OpenAI key in Settings to read receipts this way.The chosen route has no key (demo mode is off, or this is a release build)Settings → Who reads the receipts: paste a key, or choose the included server; a demo build can also switch demo mode back on
OpenAI did not accept this key.The key was cut short when pasted, revoked, or belongs to another providerPaste it again; check it is active in the provider's console
Your OpenAI account is out of credit or over its limit for now.The provider account has no credit or hit its rate limitThe provider's billing page. A new OpenAI or Anthropic key needs a payment method before it reads anything
The model "gpt-4o-mini" is not available any more. Enter a current model name in Settings.The provider retired that model nameType a current one in that route's Model field (chapter "Changing the reader and its limits")
Could not reach the server.Wrong address, the site is down, or plain http on a phoneSettings → Test the server; open https://your-server.com/api/version in the phone's browser
The server is not ready to read yet: reading is switched off, or it has no provider key.Reading is switched off, or no provider key is saved on the serverAdmin panel → AI proxy: switch reading on and save at least one key. Under Details for the developer the server's answer reads provider
The server's reading allowance is used up for now.The phone or the whole server reached a daily limit, or the month's token budget is spent; the server answered 429 with Daily request limit reached for this device. Try again tomorrow or use your own API key in the app.Admin panel → AI proxy for the limits, Usage for who used them
This phone has been blocked on the server.The phone was blocked on the Devices pageAdmin panel → Devices: unblock it
That photo is larger than the server accepts in one request.The photo is over the server's per-request sizeRaise AI_MAX_IMAGE_BYTES in .env, or take the photo from further away
Could not reach the reader.No connection on the phoneItems and dates work offline; read the receipt again once online
A date is not what you expectedThe period came from somewhere other than you thoughtOpen the item: the line under each date says whether it came from the receipt's footer, the shop's card or the item
No reminders arriveNotifications are blocked for the app, Reminders is off, or demo mode is on (it never schedules any)The phone's notification settings for the app, then Settings → Reminders
Server: a blank page at the domain; storage/logs/laravel.log says Permission deniedstorage/ and bootstrap/cache/ are not writableSet both to 775 in the file manager, or chmod -R 775 storage bootstrap/cache
Server: a blank page, the log is emptyThe domain points at backend, not backend/publicThe document root in your host's domain settings
Server: 500; the log says No application encryption key has been specified.APP_KEY is emptyphp artisan key:generate, on a first install only
Real prices never appear; the paywall still says Demo checkout: nothing is charged..The app is still on the mock store: IAP=on was not passed, or iapProductIds is emptyBuild with --dart-define=IAP=on after filling the ids (chapter "Setting up in-app purchases", steps 1 and 4). Live billing is on when that note is gone and the prices are in your store's currency

28The included key proxy

backend/ is a Laravel application with a Filament admin panel whose job is to read receipts for phones that have no AI key of their own. It keeps the OpenAI, Anthropic and Gemini keys on your server; a phone registers a random device key once and gets a token back, so there are no accounts to create for reading. It runs only the three jobs in config/ai_tasks.php, with the instruction fixed on the server: a phone can send a job's name, its short input and its photos, but never a prompt, a provider or a model. The panel sets a daily limit per phone, a daily limit for all phones and a monthly token budget, can stop new devices, and lists every request by device, job, provider, tokens and time.

It also keeps the photo copies of people who switch on Keep photos on the server (stored per device, with thumbnails in the panel), sends push notifications and publishes app-update notices. There are no user accounts on it, only the admin who opens the panel. Without it the app still reads receipts with a key of its own, and runs in demo mode with no key at all.

AI proxy settings
AI proxy: switch reading on and off, save the provider keys, set the per-phone and server-wide daily limits and the monthly budget.
The usage log
Usage: every reading request by device, job, provider, tokens and time.
The device list
Devices: every phone that registered, its platform, app version and requests so far; label, block or delete one here.
The dashboard
The dashboard after signing in.

Connecting the app, two ways:

  • At build time: flutter run --dart-define=API_BASE_URL=https://<your-server> (or the same flag on flutter build). The server route is then chosen and demo mode starts off.
  • Without the command line: Settings → Who reads the receipts → The included server, and type the address; or edit the default value of apiBaseUrl in lib/app/core/values/feature_config.dart:18 to 'https://<your-server>'.

HTTP or HTTPS. Use https with a valid certificate (Let's Encrypt is free) for anything a real phone talks to: the device token travels in an Authorization header. Android refuses plain http by default (cleartext traffic), and so does iOS (App Transport Security); this project keeps both defaults. For a local test against http://10.0.2.2:8000 only, allow cleartext in a debug network_security_config.xml on Android and add an NSAppTransportSecurity exception in ios/Runner/Info.plist; never ship either.

29Putting the key proxy online

Requirements: PHP 8.4 or later (Laravel 13 needs it; many hosting plans still default to 8.2, so check before you buy), the extensions Laravel lists (including fileinfo), MySQL 8 or MariaDB 10.6, and Composer; or any machine with Docker.

A. Docker, from backend/:

# first edit .env.docker: APP_URL, and the AI keys (or set them later in the panel)
docker compose up -d --build  # the server, MySQL and the scheduler

The first start copies .env.docker into a volume as the live .env, writes the app key, creates the tables and loads the sample devices; later starts keep all of it. Editing .env.docker after that changes nothing: backend/docs/DEPLOY.md shows how to edit the live .env in the volume. Do not run key:generate yourself: a new key cannot read the provider keys already saved in the panel.

B. A server with a terminal: ./install.sh checks the PHP version, installs the packages, writes .env and the app key, creates the tables, loads the sample devices and makes storage/ writable. Then point your web server's document root at backend/public.

C. Shared hosting with no terminal (cPanel, Plesk): run the one-time setup from your own computer against the host's database, then upload the folder. The seven steps are in Shared hosting with no terminal, in the chapter on running the server in production.

Everyday tasks without a terminal:

TaskHow
Back up the databasephpMyAdmin → the database → Export → Go; restore with Import.
Change a provider key or a limitAdmin panel → AI proxy.
Block a phoneAdmin panel → Devices → Block on that row.
See what was readAdmin panel → Usage, filtered by device or job.
Delete kept photosAdmin panel → Pictures; or the person turns the switch off.
Run the schedulerOne cron line in the panel: * * * * * php <path-to-backend>/artisan schedule:run.

Before going live, sign in once as the seeded admin (the panel asks for a new password before anything else opens), keep APP_DEBUG=false, and remove the sample devices with php artisan demo:clear. The full walkthrough, with the same steps, is in backend/docs/DEPLOY.md.

30Setting up the admin panel, step by step

The admin panel is part of the Laravel application in backend/. These are the steps for a server where you run the commands yourself; install.sh does steps 2 to 6 in one go, and the Docker route at the end needs none of them.

1. What the server needs

  • PHP 8.4.1 or newer with the pdo_mysql (or pdo_sqlite), mbstring, openssl, fileinfo, zip and intl extensions
  • Composer
  • A database: MySQL 8 / MariaDB 10.6 or newer for a live server, or SQLite for a quick look

2. Create the environment file

cd backend
cp .env.example .env

Set APP_URL to the address the panel will be served from, and APP_TIMEZONE to your own timezone.

3. Configure the database

MySQL or MariaDB. Create an empty database and a user that owns it, then put them in .env:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=proofora
DB_USERNAME=proofora
DB_PASSWORD=choose-a-strong-password

SQLite. Leave DB_CONNECTION=sqlite as shipped and create the file it points at:

touch database/database.sqlite

4. Install the dependencies and generate the app key

Install with the development packages included: the demo data in step 6 is generated with them. Once the demo data is cleared you can reinstall with --no-dev.

composer install --optimize-autoloader
php artisan key:generate

Generate the key on the first install only. The server encrypts the secrets it stores with it, so a new key on a live server makes them unreadable; install.sh skips this step when .env already has a key.

5. Create the tables

php artisan migrate --force

Run it again after every update you install; it only adds what is new and never drops your data.

6. Load the demo data, once

php artisan demo:seed

This creates the admin account below and the sample records on a fresh install, and does nothing on every later run. When you are ready to go live, Settings → Clear demo data in the panel (or php artisan demo:clear) removes every seeded record and leaves yours; running the installer again afterwards does not bring them back. The admin account is kept so you can still sign in; it asks for a new password at the first sign-in.

7. Serve it and sign in

Point your web server's document root at backend/public (docs/DEPLOY.md in the back end covers web servers and shared hosting), or try it locally:

php artisan serve

Open /admin and sign in:

EmailPassword
admin@proofora.testpassword

The panel then asks for a new password and opens nothing else until it has one, so the published password never survives the first sign-in. Or create your own admin account under Users and delete this one.

8. Scheduled jobs

Notifications you schedule for later are sent by Laravel's scheduler. Add one cron line on the server:

* * * * * cd /path/to/backend && php artisan schedule:run >> /dev/null 2>&1

Or: Docker

With Docker installed, steps 1 to 8 are one command. It starts MySQL, creates the tables, loads the demo data on the very first start only and runs the scheduler:

cd backend
docker compose up -d --build

The panel is then at http://localhost:8000/admin, with the same login. docker compose down keeps your data; docker compose down -v deletes it and the next start loads the demo data again.

Port 8000 speaks plain HTTP, which is fine on your own computer and nowhere else. Before the server is reachable from outside, put it behind a web server that serves HTTPS with a certificate (Nginx, Caddy or your host's proxy) and set APP_URL to the https:// address.

31API reference

Every endpoint the app uses, in one table. There is one kind of token: a device token from POST /api/ai/device, for reading and photos. There are no user accounts.

Authentication headers: send Authorization: Bearer <token> and Accept: application/json on every call; Accept-Language picks the language of error messages.

MethodPathAuthBodyReturns
POST/api/ai/devicenonedevice_key, platform, app_versiontoken, device
GET/api/ai/statusdevice tokennoneproviders, today's requests, the daily limit
POST/api/ai/chatdevice tokentask, input, images[] (mime, data)text, provider, model, usage
DELETE/api/ai/devicedevice tokennone204; the device and its token are removed
GET/api/mediadevice tokennonekept photos: name, sha256, size; totals
PUT/api/media/{name}device tokenthe image bytes201 or 200
GET/api/media/{name}device tokennonethe image
DELETE/api/media/{name}device tokennone204
GET/api/versionnonenonelatest and minimum app versions, message, store links

Register this phone

POST /api/ai/device
{"device_key": "k3v9q2m8x1c7r5t0b4n6y8w2e1u3i9o7", "platform": "ios", "app_version": "1.0.0"}

201 {"token": "12|8fQe...", "device": {"id": 7, "platform": "ios"}}

Read a receipt

POST /api/ai/chat
Authorization: Bearer 12|8fQe...
{"task": "receipt_read", "input": "country: US",
 "images": [{"mime": "image/jpeg", "data": "<base64>"}]}

200 {"provider": "openai", "model": "gpt-4o-mini",
     "text": "{\"merchant\": \"Harbor Appliances\", \"purchase_date\": \"2026-10-03\", ...}",
     "usage": {"prompt_tokens": 1210, "completion_tokens": 214}}

Today's allowance

GET /api/ai/status
Authorization: Bearer 12|8fQe...

200 {"enabled": true, "providers": {"openai": {"available": true}, ...},
     "requests_today": 3, "daily_request_limit": 50}

A task the server does not run, a second photo on policy_read, or free text on receipt_read is answered with 422; a phone over its daily limit with 429.

Error responses

Every error is JSON with a message; a 422 adds errors, one list per field. These are the bodies the included server sends:

401

No token, or a revoked one: GET /api/ai/status without Authorization.

HTTP/1.1 401 Unauthorized
{"message": "Unauthenticated."}

422

A field is missing or wrong: POST /api/ai/device with an empty body.

HTTP/1.1 422 Unprocessable Content
{"message": "The device key field is required.",
 "errors": {"device_key": ["The device key field is required."]}}

429

On POST /api/ai/chat: the phone, or the whole server, is over its daily limit, or the month's budget is spent.

HTTP/1.1 429 Too Many Requests
{"message": "Daily request limit reached for this device. Try again tomorrow or use your own API key in the app."}

Open-source licenses

The server is built on these packages, at the versions composer.lock pins. Each license allows use and redistribution inside a commercial product, with no fee per seat or per site for you or your customers. Their full texts are in vendor/<package>/LICENSE after composer install.

PackageVersionLicense
filament/filamentv5.7.8MIT
kreait/firebase-php8.4.2MIT
laravel/frameworkv13.30.1MIT
laravel/sanctumv4.3.2MIT
laravel/tinkerv3.0.2MIT

32Every .env setting, explained

Every key in backend/.env.example, its default, and what it decides. Shared-host owners can check a configuration against this table.

KeyDefaultIn the fileWhat it decides
APP_NAMEProoforasetName shown by the panel and in emails.
APP_ENVlocalsetproduction on a live server, local on your machine.
APP_KEYemptysetEncryption key; php artisan key:generate fills it. Never change it on a live install.
APP_DEBUGfalsesetDetailed error pages; false on a live server.
TRUSTED_PROXIESemptysetSet when the server sits behind a proxy or load balancer, so per-network limits see real addresses. Comma-separated, no spaces, for example 10.0.0.5,10.0.1.0/24; Cloudflare and * are under Behind a proxy or load balancer in the production chapter.
APP_URLhttp://localhostsetThe server's public address, with https.
APP_TIMEZONEUTCsetTime zone for daily limits and logs.
APP_LOCALEensetDefault language of server messages.
APP_FALLBACK_LOCALEensetLanguage used when a translation is missing.
APP_FAKER_LOCALEen_USsetLocale of generated sample data.
APP_MAINTENANCE_DRIVERfilesetHow maintenance mode is stored.
APP_MAINTENANCE_STOREdatabasecommented outCache store for maintenance mode, when the driver is cache.
PHP_CLI_SERVER_WORKERS4commented outWorkers for php artisan serve on your machine.
BCRYPT_ROUNDS12setCost of password hashing.
LOG_CHANNELstacksetWhere logs go.
LOG_STACKsinglesetChannels in the log stack.
LOG_DEPRECATIONS_CHANNELnullsetWhere deprecation notices go.
LOG_LEVELdebugsetLowest level logged.
DB_CONNECTIONsqlitesetmysql on a live server; sqlite for a quick local try.
DB_HOST127.0.0.1commented outDatabase host.
DB_PORT3306commented outDatabase port.
DB_DATABASElaravelcommented outDatabase name.
DB_USERNAMErootcommented outDatabase user.
DB_PASSWORDemptycommented outDatabase password.
SESSION_DRIVERdatabasesetWhere panel sessions are kept.
SESSION_LIFETIME120setMinutes before a panel session expires.
SESSION_ENCRYPTfalsesetEncrypt the panel's session data.
SESSION_PATH/setCookie path.
SESSION_DOMAINnullsetCookie domain.
BROADCAST_CONNECTIONlogsetBroadcast driver; unused by this app.
FILESYSTEM_DISKlocalsetDisk for kept photos (local by default).
QUEUE_CONNECTIONdatabasesetQueue for push sends; sync works everywhere.
CACHE_STOREdatabasesetCache for limits and locks.
CACHE_PREFIXemptycommented outPrefix for cache keys.
MEMCACHED_HOST127.0.0.1setMemcached host, if used.
REDIS_CLIENTphpredissetRedis client, if used.
REDIS_HOST127.0.0.1setRedis host.
REDIS_PASSWORDnullsetRedis password.
REDIS_PORT6379setRedis port.
MAIL_MAILERlogsetHow email is sent (smtp).
MAIL_SCHEMEnullsetsmtp or smtps.
MAIL_HOST127.0.0.1setSMTP host of your email provider.
MAIL_PORT2525setSMTP port.
MAIL_USERNAMEnullsetSMTP user.
MAIL_PASSWORDnullsetSMTP password.
MAIL_FROM_ADDRESS"hello@example.com"setSender address of the mail this server sends.
MAIL_FROM_NAME"${APP_NAME}"setSender name.
AWS_ACCESS_KEY_IDemptysetS3 key, if photos are kept on S3.
AWS_SECRET_ACCESS_KEYemptysetS3 secret.
AWS_DEFAULT_REGIONus-east-1setS3 region.
AWS_BUCKETemptysetS3 bucket.
AWS_USE_PATH_STYLE_ENDPOINTfalsesetPath-style S3 addresses, for S3-compatible stores.
APP_LATEST_VERSION1.0.0setNewest app version; older apps are offered an update.
APP_MINIMUM_VERSION1.0.0setOldest version allowed; older apps must update.
APP_UPDATE_MESSAGEemptysetText of the update prompt.
APP_STORE_URL_ANDROIDemptysetWhere the Android prompt sends people.
APP_STORE_URL_IOSemptysetWhere the iOS prompt sends people.
MEDIA_FILE_MAX_BYTES2097152setLargest single kept photo.
MEDIA_MAX_TOTAL_BYTES52428800setMost bytes of photos kept per device.
MEDIA_MAX_SERVER_BYTES5368709120setMost bytes of photos on the whole server.
FIREBASE_CREDENTIALSstorage/app/firebase-service-account.jsonsetPath to the service account JSON used to send push.
AI_OPENAI_KEYemptysetOpenAI key; a key saved in the panel wins.
AI_ANTHROPIC_KEYemptysetAnthropic key.
AI_GEMINI_KEYemptysetGemini key.
AI_TIMEOUT_SECONDS90commented outSeconds before a provider call gives up.
AI_MAX_IMAGES2commented outMost photos per request (2).
AI_MAX_IMAGE_BYTES1258291commented outLargest photo per request.

33Feature packs

Every pack lives in packages/ inside the app folder and has its own README with the full setup. In short:

PackWhat it doesWhat you set upIts README
qh_aiFour routes to a language model, one interface, no vendor SDKNothing for the three key routes and demopackages/qh_ai/README.md
qh_analyticsAnalytics behind one interfaceNothingpackages/qh_analytics/README.md
qh_analytics_firebaseAnalyticsGateway on Firebase Analytics + CrashlyticsA Firebase project (flutterfire configure), Analytics and Crashlytics enabled in the console, firebaseConfigured = true in lib/firebase_config.dart.packages/qh_analytics_firebase/README.md
qh_biometricFace ID / Touch ID / fingerprint lock behind one interfaceiOS: NSFaceIDUsageDescription in Info.plist (shipped; change the sentence)packages/qh_biometric/README.md
qh_iapIn-app purchases behind one interfaceiOS (App Store Connect), Android (Play Console), Bothpackages/qh_iap/README.md
qh_imageOne image widget for URLs that may be empty, slow, dead , or bundledNothingpackages/qh_image/README.md
qh_l10nMulti-language for a GetX app, without code generationNothingpackages/qh_l10n/README.md
qh_pushPush notifications behind one interfaceNothing herepackages/qh_push/README.md
qh_push_firebasePushGateway on Firebase Cloud MessagingA Firebase project; iOS: an APNs key in the console, the Push Notifications capability (the aps-environment entitlement and UIBackgroundModes are shipped); Android: POST_NOTIFICATIONS (shipped).packages/qh_push_firebase/README.md
qh_shareThe system share sheet, reduced to what an app needsNothing.packages/qh_share/README.md
qh_upgradeVersion-upgrade prompts driven by your own backend--dart-define=API_BASE_URL=… and, on the included Laravel back end, four .env lines (latest, minimum, message, store URLs).packages/qh_upgrade/README.md

Nine feature packs live in packages/, each a small local package with one interface and a working default, switched on in lib/app/core/values/feature_config.dart and chosen in lib/app/data/services/feature_packs.dart.

  • qh_l10n: English, Spanish and Arabic with right-to-left; add a language by copying one file in lib/l10n/ and registering it, step by step in the chapter Adding a language.
  • qh_biometric: Face ID, Touch ID or fingerprint on launch; Settings → Lock on launch.
  • qh_share: the system share sheet for the claim pack, backups and CSV.
  • qh_upgrade: optional and required update prompts from the server's APP_*_VERSION lines.
  • qh_analytics (+ Firebase): screen views and errors, only after consent in Settings. Needs a Firebase project.
  • qh_push (+ Firebase): remote push sent from the admin panel, and the local return and warranty reminders. Remote push needs a Firebase project and an APNs key in it.
  • qh_iap: App Store and Google Play purchases behind PurchaseGateway; a mock checkout until product ids are set.
  • qh_image: bundled and remote pictures with placeholders and fallbacks.

Plus qh_ai, the four AI routes behind one adapter. Each pack's own README.md lists its console steps.

Costs: switching on Firebase, in-app purchases or the stores will involve those providers' own accounts, which will incur their own separate costs.

34Setting up in-app purchases

The paywall and the qh_iap pack are finished; what is left is on the stores' side. Until you do the steps below the app runs a mock checkout: every purchase succeeds instantly, charges nothing and says so on screen, which is what the walkthrough and the Live Preview show. Do the store you ship to first; each takes about an hour, most of it waiting for the store.

What the app already doesWhere
Reads prices from the store, in the buyer's currencySubscriptionService · StorePurchaseGateway
Keeps Pro after a purchase, offline toothe encrypted store on the phone
Restore purchases (one tap on the paywall)PurchaseGateway.restore()
Android's billing permissioncom.android.vending.BILLING is already in AndroidManifest.xml
Verifies each purchase with your own serverleft to you: the verify hook on StorePurchaseGateway

1. Put the product ids in one file

Pick one id per plan and use the same id in both stores. The keys are the plan ids the paywall already shows; the values are what you create in the stores:

// lib/app/core/values/feature_config.dart
static const iapProductIds = <String, String>{
  'monthly': 'com.proofora.prooforaAiApp.pro.monthly',
  'yearly': 'com.proofora.prooforaAiApp.pro.yearly',
  'lifetime': 'com.proofora.prooforaAiApp.pro.lifetime',
};

Store ids cannot be reused after you delete them, so settle on the names first.

2. App Store Connect (iOS)

  1. Agreements, Tax, and Banking → accept the Paid Apps agreement and fill in tax and bank details. Until its status is Active, the store returns no products at all. That is the most common reason a paywall shows the mock prices on a real phone.
  2. Apps → + → New App with bundle id com.proofora.prooforaAiApp (it must match Xcode exactly).
  3. In the app: Monetization → Subscriptions → create a subscription group (for example Proofora Pro), then one subscription per recurring plan with the ids from step 1. A one-off plan (lifetime) goes under In-App Purchases as Non-Consumable.
  4. Give each product a price, a display name and a review screenshot (the paywall screen is fine). Products stay Missing Metadata, and invisible to the app, until all three are there.
  5. Users and Access → Sandbox → Test Accounts → add a tester with an e-mail that is not a real Apple ID.
  6. In Xcode open ios/Runner.xcworkspace → Runner → Signing & Capabilities → + Capability → In-App Purchase. (It adds no file to the project; the capability lives on the App ID.)

3. Play Console (Android)

  1. Create app, then complete the payments profile (Settings → Payments profile); without it, products cannot be created.
  2. Upload one build signed with your upload key (android/key.properties, chapter Demo builds and release builds; flutter build appbundle) to Testing → Internal testing. Google only serves products to an app it has seen; with no build uploaded, every product answers not found.
  3. Monetize → Products → Subscriptions → one subscription per recurring plan with the ids from step 1, each with a base plan and a price. A one-off plan goes under In-app products. Activate each one.
  4. Settings → License testing → add the Google accounts that will test; they are charged nothing and can cancel at once.
  5. Join the internal test from that account (the opt-in link on the Internal testing page) and install from the Play Store once. A build side-loaded with flutter run works afterwards, a build that was never installed from Play may not see products.

4. Turn it on and try it

flutter run --release --dart-define=IAP=on
# a real phone, signed in with the sandbox (iOS) or license-test (Android) account

The paywall now shows the store's prices. Buy a plan: the sheet is the store's own, marked as a test. Then delete and reinstall the app and tap Restore purchases: Pro comes back. Leave out --dart-define=IAP=on and the app goes back to the mock, which is why simulator runs and the Live Preview never touch a store.

When products do not load

What you seeWhyFix
Mock prices on a real phoneBuilt without --dart-define=IAP=on, or iapProductIds is emptyStep 1 and step 4
iOS: the paywall lists no plansPaid Apps agreement not active, or a product still Missing MetadataApp Store Connect step 1 and 4
iOS: Cannot connect to iTunes StoreSigned in with a real Apple ID on a debug buildSign out under Settings → App Store → Sandbox Account and use the tester
Android: item not found / BILLING_UNAVAILABLENo build on a testing track, the product is inactive, or the Play Store app is not signed inPlay Console step 2 and 3
Android: This version of the application is not configured for billingThe running build's version code is higher than any uploaded oneUpload the build you are running to internal testing

Checking each purchase on your server

The app trusts the store's answer on the phone. For anything you would not want a modified phone to unlock, check each purchase on a server before Pro switches on. The seam is already in the pack: StorePurchaseGateway takes a verify function, calls it for every purchase the store reports, and counts the purchase only when it returns true. Its signature, in packages/qh_iap/lib/src/store_purchase_gateway.dart:

final Future<bool> Function(PurchaseDetails details)? verify;

1. In the app, pass it where the gateway is made, lib/app/data/services/feature_packs.dart. A starting point that posts the store's receipt to your server (in_app_purchase and http go under dependencies in pubspec.yaml if the app does not list them yet):

// lib/app/data/services/feature_packs.dart
FeatureConfig.useStorePurchases
    ? StorePurchaseGateway(verify: verifyOnServer)
    : MockPurchaseGateway(),

// anywhere in lib/, for example lib/app/data/services/purchase_check.dart
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:in_app_purchase/in_app_purchase.dart';

Future<bool> verifyOnServer(PurchaseDetails d) async {
  final res = await http.post(
    Uri.parse('https://<your-server>/api/purchases/verify'),
    headers: {'Content-Type': 'application/json'},
    body: jsonEncode({
      'platform': d.verificationData.source,          // 'app_store' or 'google_play'
      'product_id': d.productID,
      'receipt': d.verificationData.serverVerificationData,
    }),
  );
  return res.statusCode == 200 && jsonDecode(res.body)['valid'] == true;
}

2. On the server, one route that asks the store and answers valid. A Laravel starting point; the two store calls are where your credentials go:

// routes/api.php
Route::post('purchases/verify', PurchaseCheckController::class)->middleware('throttle:auth');

// app/Http/Controllers/Api/PurchaseCheckController.php
class PurchaseCheckController
{
    public function __invoke(Request $req)
    {
        $data = $req->validate([
            'platform' => 'required|in:app_store,google_play',
            'product_id' => 'required|string',
            'receipt' => 'required|string',
        ]);

        $valid = $data['platform'] === 'app_store'
            // App Store Server API: look the transaction up with your
            // In-App Purchase key (App Store Connect -> Users and Access -> Keys)
            ? $this->askApple($data['receipt'], $data['product_id'])
            // Google Play Developer API: purchases.subscriptionsv2.get with a
            // service account that has access in Play Console
            : $this->askGoogle($data['receipt'], $data['product_id']);

        return response()->json(['valid' => $valid]);
    }
}

Return false on any doubt, a network error included: the purchase is then not counted and the paywall says the check failed. The store still has the payment, so once the server answers again the person taps Restore purchases and the check runs once more. The stores keep their standard commission on every sale.

35Questions buyers ask first

Do I need a server?

No. The app reads receipts with a key of the user's own (OpenAI, Anthropic or Gemini, pasted in Settings), and with no key at all it runs in demo mode. The included key proxy is for when you would rather your users never handle a key: it keeps your keys on your server, with daily limits and a usage log.

What happens offline?

Items, both dates, reminders, store policies and claim packs all live on the phone and need no connection. Reading a new receipt does: offline the app says Could not reach the reader. Check the connection and try again; your items and dates work without it.

One business or many?

Each phone is one person's own record of what they bought. One key proxy serves every phone that installs your app: each registers once and is counted and limited on its own, and the admin panel lists them. There are no user accounts and no shared company workspace: nobody signs up, and nothing is kept under a person's name.

How do I switch the demo off?

Demo mode ships on (demoMode in lib/app/data/services/settings_service.dart:61). Users switch it off in Settings and then need a reading route. To ship with it off, change that default to false.

What does reading a receipt cost?

With the user's own key, the user's provider bills them. With the key proxy, your provider account is billed for every receipt your users read (the example in the API reference used 1,210 tokens in and 214 out; the usage log shows your real figures). The per-phone and server-wide daily limits and the monthly budget on the AI proxy page cap what you can be billed.

A user moved to a new phone. Do the photos come back?

The records do, from the backup file (Settings, Restore a backup, then pick the file). The photos are not in that file, and the app on the new phone does not download the old phone's server copies, so each missing photo shows as an empty tile until it is attached again. Photos after a restore on a new phone has what the app shows and how you, running the server, can hand the kept copies back.

Locked out after Face ID or the fingerprint stopped working?

The lock only stands in the way while the phone can still check a face or a fingerprint. If the phone no longer offers one (Face ID switched off for the app, the last fingerprint removed, no passcode set), the app opens without asking. If the phone has locked biometrics after too many failed tries, unlock the phone itself once with its passcode, then tap Unlock again. The lock never deletes anything: if all else fails, re-enabling a fingerprint or Face ID in the phone's settings gets the person back in, and they can then turn Lock on launch off in the app's settings. Demo mode never locks.

What if I lose my Android keystore?

The keystore signs every Android release, and Google Play only accepts an update signed by the same key. Two habits make losing it survivable:

  • Enroll in Play App Signing when you create the app (Play Console offers it on the first upload). Google then keeps the key that signs what users install; yours is only an upload key, and a lost upload key can be replaced through Play Console's App integrity page, with a request to Google support.
  • Keep the .jks file and its key.properties passwords in two places outside the project folder (a password manager and an offline copy). Never commit them.

Without Play App Signing a lost key cannot be recovered: the only way forward is a new app listing with a new package name.

Before you ship: a checklist

Store rejection

Publishing with the placeholder text still in the Terms or the Privacy Policy is very likely to get the app rejected by both the App Store and Google Play: both require a privacy policy that names who runs the app and how to reach them. Fill every blank and publish the two pages at a web address before you submit.

  • Fill in every blank in the legal texts:
    • proofora_ai_app/assets/legal/terms.md: 5 blanks in [square brackets]
    • proofora_ai_app/assets/legal/privacy.md: 9 blanks in [square brackets]
  • Switch the demo off (above) and add one real record of your own once.
  • Sign in once as the seeded admin, if your item runs the included server: the panel asks for a new password before anything else.
  • Replace the app name, the bundle id and the icon (chapter on renaming).
  • Build a release on a real phone and go through every tab once.
  • Read the chapter on the services you pay for, and set up only the ones you use.

36Running the server in production

Shared hosting with no terminal: set it up from your own computer

The database tables are made by one command, and a host without a terminal cannot run it. Run it from your own computer instead, against the host's database, then upload the result. You need PHP 8.4.1 and Composer on your computer (once), and the host's file manager and database page.

  1. Create the database. In cPanel open MySQL Databases: create a database and a user, and add the user to the database with All privileges. Write down the three names; shared hosts put your account name in front of each one.
  2. Let your computer in. Open Remote MySQL (cPanel) or Remote database access (Plesk) and add your computer's public IP address (search "what is my IP" to see it). Note the host name the page shows for remote connections; it is often your domain, not localhost. Some hosts do not offer remote access at all: ask their support to run step 5 for you, or use a host with a terminal.
  3. Prepare the folder on your computer. In the backend folder copy .env.example to .env and set APP_URL=https://<your-domain>, APP_ENV=production, APP_DEBUG=false and the database lines with the remote host from step 2:
    DB_CONNECTION=mysql
    DB_HOST=<the remote host from step 2>
    DB_PORT=3306
    DB_DATABASE=<account>_<database>
    DB_USERNAME=<account>_<user>
    DB_PASSWORD=<its password>
  4. Install the packages and make the key, on your computer:
    composer install --optimize-autoloader
    php artisan key:generate
    php artisan vendor:publish --tag=livewire:assets --force
    The last line copies the admin panel's scripts into public/; a server with a terminal gets them from Composer on its own.
  5. Make the tables and the demo data in the host's database, still from your computer:
    php artisan migrate --force
    php artisan demo:seed
    If this stops with Access denied or Connection refused, step 2 is not done for the address your computer has now.
  6. Point the database at the host itself. In .env change DB_HOST to localhost (what PHP on the host uses), then upload the whole backend folder, vendor/ and .env included, next to public_html, not inside it.
  7. Finish in the panel. Set the domain's document root to backend/public, choose PHP 8.4.1, make storage/, bootstrap/cache/ writable (775) in the file manager, open https://<your-domain>/admin and sign in. Remove your IP address from Remote MySQL again.

For each update, repeat steps 4 to 6 with the new files: migrate --force only adds what is new. Back up the database first (phpMyAdmin → Export).

Behind a proxy or load balancer: TRUSTED_PROXIES

When nginx, Cloudflare or a load balancer sits in front of PHP, every request reaches the server from the proxy's address. Until that address is trusted, the server sees one visitor, so all your users share one rate limit. TRUSTED_PROXIES names the proxies whose X-Forwarded-For header the server believes. Write IP addresses or CIDR ranges separated by commas, then run php artisan config:clear.

Your setupValue in backend/.env
PHP faces the internet directlyleave it empty
nginx or Apache on the same machineTRUSTED_PROXIES=127.0.0.1
A load balancer on a private network (cloud VPC, Docker network)TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
One proxy at a known addressTRUSTED_PROXIES=203.0.113.10 (the proxy's own address)
CloudflareCloudflare's published ranges, listed at cloudflare.com/ips, joined with commas: TRUSTED_PROXIES=173.245.48.0/20,103.21.244.0/22,…
A firewall lets nothing but the proxy reach PHPTRUSTED_PROXIES=*

Never use * on a server the internet can reach directly: anyone could then send a made-up X-Forwarded-For header and get a fresh rate limit with every request.

Rate limits

Every limit the server applies to the API. A request over a limit gets 429 Too Many Requests with a Retry-After header in seconds; the apps show a short message and the request can be tried again after that.

RoutesLimitCountedDefined in
Every route under /api120 a minutePer phone once it has a device token; per network before that'api'
POST /api/ai/device10 a minutePer network (an IPv6 /64 counts as one)'auth'

The named limits are in app/Providers/AppServiceProvider.php (RateLimiter::for); a limit written on a route (->middleware('throttle:10,1'): 10 per 1 minute) is in routes/. Change the number there and run php artisan config:clear. Behind a proxy, set TRUSTED_PROXIES (above) or every user is counted as one network.

How far it scales, and SQLite or MySQL

The server ships with DB_CONNECTION=sqlite. How many people it carries depends on your host far more than on the code: the number of PHP workers, the CPU, the disk and the database server. That is why this manual prints no user count; measure your own server instead (below).

SQLiteMySQL / MariaDB
How it writesOne file; one write at a time, the others wait their turnMany writes at once, row by row
Good forTrying the item, a demo, one person or a small teamAnything live with real users
BackupsCopy the file while nothing writesmysqldump, or the host's backup tool
More than one serverNo: the file lives on one diskYes

Move to MySQL before you go live, or as soon as one of these is true:

  • more than a handful of people use the app at the same time;
  • database is locked appears in storage/logs/laravel.log;
  • you want a second server behind a load balancer, or your host does not keep local files.

To move: create the MySQL database, set the DB_* lines in .env as in Configure the database, then php artisan config:clear and php artisan migrate --force. There is no one-step copy of the rows from SQLite to MySQL, so switch before real data goes in.

The rate-limit counters live in the cache, kept in the database as shipped (CACHE_STORE=database). That is fine on MySQL; with several servers, point the cache at Redis so they share one count.

To see what your own server carries, send it a burst from another machine and watch the response times and the error count, for example with hey (a free load tool, github.com/rakyll/hey):

hey -n 2000 -c 50 https://<your-domain>/api/version
# raise -c until responses slow down or errors appear

What the server keeps about a person

For a privacy policy, a GDPR request or a store's data form: every table in which a row points at one device, the columns it has, and how long it stays. Nothing here is sent to the author of this item or to anyone else; it lives in your database only.

TableColumnsHow long it is kept
usersname, role, email, email_verified_at, password, remember_token, must_change_passwordThe admin accounts of the panel. Deleted on the panel's Users page.
password_reset_tokensemail, token, created_atLaravel's own reset table for the admin panel; a row stops working after 60 minutes (config/auth.php).
sessionsuser_id, ip_address, user_agent, payload, last_activityAdmin panel browser sessions. One expires after SESSION_LIFETIME minutes without use, and Laravel clears expired rows on its own.
media_filesowner_type, owner_id, name, sha256, size_bytes, mime, pathThe pictures a phone uploaded. Deleted, files included, together with their owner.
push_sendskind, target, title, body, route, status, send_at, sent_at, delivered, gone, refused, error, sent_byThe panel's history of push messages: who they went to and what they said. Nothing removes it on its own; delete old rows in phpMyAdmin if your policy needs it.
devicesdevice_key, platform, app_version, label, blocked, last_seen_atOne row per phone. Deleted by Delete everything in the app's Settings, or by you on the Devices page; either way its token and its kept photos go with it.
ai_usage_logsdevice_id, device_key_hash, provider, model, prompt_tokens, completion_tokens, latency_ms, status, errorCounts and timings per request, never the prompt, the photo or the answer. Kept for the totals until you delete rows on the usage page (select, then delete); deleting a device clears its link and keeps the numbers with a hash of its key.
ai_device_registrationskey_hash, ip, blockedThe network address each new device registered from and a hash of its key. Kept so the per-network daily limit and a block survive deleting the device; nothing removes it on its own, so clear old rows in phpMyAdmin when you no longer need them.
personal_access_tokenstokenable_type, tokenable_id, name, token, abilities, last_used_at, expires_atOne per registered phone. Deleted with its device (the delete button in the app's Settings, or the Devices page); they do not expire on their own (expiration in config/sanctum.php is how to make them).

Deleting one person's data

  1. In the admin panel open Devices, find the phone (the page lists each one's platform, app version and when it was last seen) and delete it. Its token, its pictures and its link in the usage log go with it.
  2. Or have the person use the delete button in the app's Settings, which does the same.

Two copies the server cannot reach: what is stored on the person's phone (it goes when they delete the app or use the delete button in it), and your own database backups, which keep a row until the backup itself is deleted.

37Demo builds and release builds

Every build is one of two kinds. Which one is decided when you build, not by a setting a user can change:

BuildCommandWhat it is
Demo build
flutter run
flutter build web --release --dart-define=DEMO=on
What you try the app on, and what the Live Preview runs: the sample data and the Demo mode switch in Settings, a demo checkout that charges nothing.
Release build
flutter build appbundle --dart-define=API_BASE_URL=https://api.example.com
flutter build ipa --dart-define=API_BASE_URL=https://api.example.com
The app you publish, signed with your upload key (below). No sample data, no Demo mode switch, no demo checkout: the upgrade screen appears only once your store products are set up (IAP=on, chapter Setting up in-app purchases).

DEMO=on is the only switch back to the demo; leave it out of anything you upload to a store.

A release build needs the server address. The app reaches its online features through the included server, so a release build without API_BASE_URL stops at launch, with this line in the device log: This release build has no server address. Pass the address of your server as above, on every release build.

Android release builds are signed with your own upload key. The project never signs a release with the debug key: without android/key.properties a release build stops with No android/key.properties. Make the key once, keep it safe, and point the build at it:

keytool -genkey -v -keystore ~/upload-keystore.jks -storetype JKS \
  -keyalg RSA -keysize 2048 -validity 10000 -alias upload

Then create android/key.properties (it is ignored by git, like the keystore itself):

storePassword=<the store password you chose>
keyPassword=<the key password you chose>
keyAlias=upload
storeFile=<the full path of upload-keystore.jks>

Google Play re-signs what you upload with the app-signing key it keeps for you (Play App Signing); your upload key only proves the upload is yours.

38Adding a language

The apps ship in 3 languages (ar, en, es). Adding one takes four steps in the app and one optional step on the server; French (fr) is the example.

  1. Copy a table. Copy lib/l10n/es.dart to lib/l10n/fr.dart. In the copy, rename the constant (const spanish → const french), set locale: Locale('fr') and nativeName: 'Français', and translate every value. Keep the keys and the @p1 placeholders exactly as they are; under date.* put the month and weekday names in their order.
  2. Register it. In lib/l10n/app_languages.dart add the import and the name:
    import 'fr.dart';
    
    const appLanguages = <AppLanguage>[
      english,
      spanish,
      arabic,
      french,
    ];
    That list is the only registration: the language picker in Settings, the date words, right-to-left layout and the Accept-Language header all follow it. The first entry stays the fallback.
  3. Check it. Run flutter test test/l10n_test.dart. It fails on a key the new table lacks or has extra, and on a value left in English, and names each one.
  4. Try it. flutter run --dart-define=LOCALE=fr pins the new language for one run; or pick it under Settings. On iOS nothing else is needed: a build step writes the list into the app (ios/scripts/sync_localizations.sh), which is what lets iOS open the app in the phone's language.
  5. The server's messages (optional). The API answers in the language the app sends in Accept-Language, if it has it. Copy backend/lang/es.json to backend/lang/fr.json and translate the values; the server picks the new file up on its own (config/mobile.php reads the folder). For Laravel's validation messages, take the French files from the Laravel-Lang project (lang/fr/*.php there) into backend/lang/fr/, keeping their license header; or copy backend/lang/es/ and translate every value.

Removing a language is the reverse: take its name and import out of the list; the file can go too.

39Tests and continuous integration

Every suite the item ships, run on your own computer:

cd proofora_ai_app && flutter analyze && flutter test && cd ..
cd backend && composer test

The same as a GitHub Actions workflow: put your copy of the item in a GitHub repository, save this as .github/workflows/tests.yml at its root, and every push and pull request runs the app and server tests. The same file is in backend/docs/github-actions-tests.yml. The server job uses SQLite, so it needs no database service.

# Copy to .github/workflows/tests.yml at the root of your repository.
name: tests
on:
  push:
  pull_request:
jobs:
  proofora-ai-app:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: proofora_ai_app
    steps:
      - uses: actions/checkout@v4
      - uses: subosito/flutter-action@v2
        with:
          flutter-version: '3.47.2'
          channel: stable
          cache: true
      - run: flutter pub get
      - run: flutter analyze
      - run: flutter test
  backend:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: backend
    steps:
      - uses: actions/checkout@v4
      - uses: shivammathur/setup-php@v2
        with:
          php-version: '8.4'
          extensions: mbstring, intl, pdo_sqlite, fileinfo, zip
          tools: composer
      - run: composer install --no-interaction --prefer-dist
      - run: cp .env.example .env && php artisan key:generate
      - run: composer test

Other CI services take the same commands: install Flutter stable and run flutter pub get, flutter analyze and flutter test in each app folder, then PHP with Composer and composer test in backend/.

40The landing page

landing/ is a one-page website for the app: one HTML file with its styles inside, a fonts/ folder and an img/ folder. There is no build step and no server code, so it opens straight from the disk and goes online on any static host.

The landing page
The page as it ships, 1280 pixels wide. On tablets and phones it rearranges itself into fewer columns.

What is on it

Each block is a <section> in landing/index.html, in this order:

BlockIts heading as shipped
class="hero"Photograph the receipt. Keep the proof. Never miss a return or a warranty.
class="features"Made for the day something breaks.
class="gallery"Receipt roll, due stack, claim pack, stores.
class="band"What reads the receipt.
class="faq"Questions from the kitchen drawer.
class="closing"Keep the proof before you need it.

Changing the words

  • The browser tab and search result: <title> and <meta name="description"> at the top (now: Proofora - Photograph the receipt. Keep the proof. Never miss a return or a warranty.).
  • Every heading and paragraph is plain text inside its section; edit it in any text editor.
  • The contact address hello@proofora.app: search for mailto: and replace each one.
  • The 3 store buttons point at #: put your App Store and Google Play links in their href once the app is live.
  • The footer's Privacy and Terms links point at # too: link them to the pages you publish (the texts in the app's assets/legal/ are a starting point).

Changing the colors and pictures

The colors are CSS variables in the :root block near the top of the file; the rest of the page is mixed from them, and a second :root under prefers-color-scheme: dark holds the dark version:

VariableShipped value
--primary#0B6E8A
--accent#E8542C
--surface#F2F8FA
--ink#12232B

The screenshots are the files in landing/img/ (7 of them, 07-home.png and on). Replace a file with your own of the same name, or change the src that points at it.

Putting it online

  1. Upload the whole landing/ folder, keeping fonts/ and img/ beside index.html. Any static host serves it as it is: Netlify, Cloudflare Pages, GitHub Pages, or the public_html folder of ordinary shared hosting.
  2. Point your domain at it in the host's settings and turn on HTTPS there.
  3. Open the address on a phone and on a computer; check the store buttons and the contact links.
# try it on your own computer first
cd landing
python3 -m http.server 8080
# then open http://localhost:8080

The page loads nothing from other servers: no web fonts from a CDN, no scripts, no tracking.

41Version history

What changed in each version, newest first. The same list is in CHANGELOG.md in the app folder; when you install an update, it tells you what to look at without comparing every file.

1.0.0

  • First release.
  • Receipt reading through the included Laravel key proxy (OpenAI, Anthropic or Google Gemini), or with a key of your own.
  • Return and warranty dates counted on the phone, with reminders 30, 7 and 1 day before each one.
  • Claim pack per item: the receipt, the serial number, photos of the product, box and warranty card, and a note, shared in one go.
  • Backup to a JSON file, and restore from a file on the phone or from the clipboard.
  • Optional copies of photos on the included server, per install.
  • English, Spanish and Arabic, light and dark themes.

42AI disclosure

AI-assisted tools were used during development and testing to help write and review the source code and the documentation of this item. The author reviewed, tested and finalized every part before release. The 14 photographs are licensed Pexels stock, each listed with its photographer in assets/images/goods/LICENSES.txt, and the six sample receipts are SVG drawings written for this item; no image-generation model was used.

In addition, Proofora's receipt reader is AI-powered. A vision model from the provider you choose copies what is printed on the receipt: the shop, the date, each line, the total and any return period in the footer. It never works out a date, a policy or a price; both deadlines are counted on the phone from the purchase date and the shop's card. Fields it was unsure of wait for a tap before any line becomes an item. The same route reads a pasted returns policy and writes three short counter lines from facts the app already holds. Without a key or a server, demo mode answers on the phone from the sample receipts.

All demos