Overview
Smart TMS is the customer app for the Smart TMS – Tailor Management System website. A tailoring shop's customers follow their orders, bills, quotations and visits on their phone. Shop owners and staff keep using the website. The app talks only to your website, so all data stays on your server.
What is in the package
| Folder / file | What it is |
|---|---|
android_app/customer_app/ | The Flutter project of the Android app (package id com.smarttms.tms_customer), with its own android/ folder, lib/ (code), test/ (77 automatic tests), docs/openapi.yaml (API contract) and assets/ (icon). |
android_app/README.md | Short setup, build, push and publishing guide. |
The website itself (Smart TMS SaaS, version 1.7 or newer) is sold separately and must run on an HTTPS domain. The app is an add-on.
Features
- Find the shop by typing its company code, scanning its QR code or opening an invite link
- Sign in with email and password, two-factor code, optional fingerprint / face / PIN lock
- Home: orders in progress and ready, amount to pay, overdue and quotation alerts, the next visit, quick actions
- Orders with filters and a production thread timeline (cutting, stitching, finishing, trial, ready), photos, link to the bill, public tracking link
- Billing: bills, payments so far, pay online; quotations you can accept or decline
- Visits: book a measurement, fitting, pickup or chat in half-hour slots; move or cancel
- Shop: garments and starting prices with photos; ask for a quotation
- Measurements on file, a how-to-measure guide, and your own measurements from home that the shop checks and keeps
- Reviews: rate a finished order; the shop can show kind words on its website
- Chat with the shop and an inbox with push notifications
- Profile: name, phone, photo, language, shop contact buttons, password, app lock, delete account
- Last pages kept for offline viewing
Not included
- A staff / employee app (the apps are for customers).
- Translations of the app's own screens (English only; shop messages follow the customer's language).
Requirements
Your computer (to build the app)
- Flutter 3.27 or newer (Dart 3.x)
- Android Studio with the Android SDK, Java 17 (included with Android Studio)
- Windows, macOS or Linux
Phones that can run the app
- Android 7.0 (API 24) or newer
Accounts
- Google Play Console (25 USD, one time)
- A Firebase project (free) if you want push notifications
Website
- Smart TMS SaaS v1.7 or newer, installed, on an HTTPS domain
- Run the migrations once (
php artisan migrate, done automatically by the installer / updater)
Install Flutter & Android Studio
- Install the Flutter SDK (3.27 or newer) from docs.flutter.dev and add
flutter/binto your PATH. - Install Android Studio and, in SDK Manager, the latest Android SDK, Command-line Tools and Platform-Tools.
- Run
flutter doctor --android-licensesand accept everything. - Run
flutter doctor. Fix every line that is not a green tick for Android.
Prepare the website
- Log in as the super admin and open Mobile App in the menu. Paste the store links (later), set the minimum app version (leave empty for none), a default colour and a welcome text.
- Log in as a shop owner and open Mobile App. You see the company code, the QR code and the invite link. Fill in the app title, colour, logo and which parts customers can see. Use New code if a code ever leaks.
- On the owner's Website, the Get our app block shows the QR code and the store buttons (it is on the home page of new websites; add it to older pages from Edit pages). It is also at
/site/<shop>/app. - Open
https://your-website.com/api/v1/company/<code>in a browser. You should see the shop's JSON branding. If you do, the app will work.
Set up the project
- Unzip
smart-tms-android-v1.0.0.zipand open a terminal inandroid_app/customer_app. flutter pub get- Optional but recommended, check everything works before touching anything:
flutter analyze flutter test - Choose your own application id instead of
com.smarttms.tms_customer:android/app/build.gradle.kts (namespace and applicationId) android/app/src/main/kotlin/... (move MainActivity to the same package) - Set the website address. Either pass it when you run / build (
--dart-define=API_BASE_URL=https://your-website.com), or leave it out and the first screen asks for the address (handy for testing).
Run on a phone or emulator
Run flutter devices to see what is connected.
On a real phone
- Turn on Developer options and USB debugging (Settings → About phone → tap Build number seven times).
- Connect the phone by USB and accept the prompt.
flutter devicesmust list it. flutter run --dart-define=API_BASE_URL=https://your-website.com
On the emulator
Create a device in Android Studio → Device Manager, start it and run the same command. The emulator reaches your computer's own website at http://10.0.2.2 instead of localhost:
flutter run --dart-define=API_BASE_URL=http://10.0.2.2/product/smart-tms/smart-tms-saas/main_file
Debug builds accept plain http:// for testing. Release builds need HTTPS.
A test APK to share
flutter build apk --release --dart-define=API_BASE_URL=https://your-website.com
The file is build/app/outputs/flutter-apk/app-release.apk. Send it to a tester and ask them to allow installs from this source.
Which account to sign in with
Use a customer account of a shop (a user of type customer), with that shop's company code. Owner and staff accounts are not accepted by the app. A wrong password and a wrong shop give the same message.
Branding & customisation
Changes that need no new build (from the website)
- Per shop (owner, Mobile App): title, tagline, colour, welcome text, logo, support phone / email / WhatsApp, parts customers can see, company code.
- Platform (super admin, Mobile App): store links, minimum app version, maintenance notice, default colour and welcome text, on / off switch per shop.
Changes in the code (then build again)
| What | Where |
|---|---|
| App name in the code | lib/config.dart (AppConfig(appName: 'Smart TMS')) |
| Launcher name | android/app/src/main/AndroidManifest.xml (android:label) |
| Icon | Replace assets/icon.png and assets/icon_foreground.png, then dart run flutter_launcher_icons |
| Look (colours, cards, fonts) | lib/util/theme.dart (the "atelier" theme) |
| Screens | lib/screens/ |
The app's own screens are in English. The shop's messages (order updates, server errors) follow the language each customer picks in their profile.
Push notifications (Firebase)
Optional. Without it everything works and the in-app inbox still fills up; only the phone pop-ups are missing.
- Create a project in the Firebase console and add an Android app with the package name
com.smarttms.tms_customer. - Download
google-services.jsonand put it inandroid/app/. The build switches push on only when this file exists. - Server: Project settings → Service accounts → Generate new private key. Save the JSON on the server (outside the web folder) and set in
.env:FCM_CREDENTIALS=/full/path/to/service-account.json
When customers are notified
- Their order moves on, is ready or is delivered
- A new bill or a payment received
- A new quotation
- A visit is booked, moved, or is tomorrow
- The shop sends a chat message
Customers who never installed the app get no inbox items.
Invite links that open the app
tmsapp://join/<code> opens the app with no setup. For normal https://your-website.com/join/<code> links (what the QR page shares) add Android App Links:
- In
android/app/src/main/AndroidManifest.xmladd to the main activity:<intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="https" android:host="your-website.com" android:pathPrefix="/join/"/> </intent-filter> - Publish
https://your-website.com/.well-known/assetlinks.jsonwith your package name and the SHA-256 of your signing key.
Version numbers
Change the number in pubspec.yaml (version: 1.0.0+1): the part before + is the version people see, the number after is the build number that must grow with every upload.
The super admin can force an update from Mobile App → Minimum app version: older apps then show an "update required" screen.
Signing key (keystore)
Google Play needs every release signed with your own key. Create it once and keep a backup: if you lose it you cannot update the app.
keytool -genkey -v -keystore ~/tms-upload.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload
Tell the build where the key is
Create android/key.properties (it is git-ignored):
storeFile=/home/you/tms-upload.jks
storePassword=your-store-password
keyAlias=upload
keyPassword=your-key-password
Without this file, release builds are signed with the debug key. That works for your own testing but Google Play will refuse it.
Build the release
cd android_app/customer_app
flutter pub get
flutter build appbundle --release --dart-define=API_BASE_URL=https://your-website.com
The file to upload is build/app/outputs/bundle/release/app-release.aab.
Always pass your HTTPS address with --dart-define=API_BASE_URL=... for a release, or customers will be asked for the address.
Publish on Google Play
1. Developer account
Register at Google Play Console (one-time 25 USD fee).
2. Create the app
Create app → name Smart TMS (or your own name), language, App, Free.
3. Store listing
- Short and full description. Suggested short text: Follow your tailoring orders, bills, quotations and visits.
- Icon 512×512, feature graphic 1024×500, at least 2 phone screenshots.
4. App content
- Privacy policy URL (required, your website's page is fine).
- Data safety: see Privacy & data safety.
- Ads: none. Target audience: 18+.
5. Upload and release
Production → Create release → upload the .aab → add release notes → review → Start rollout. The first review can take a few days.
After it is live, copy the Play Store link into Super admin → Mobile App → Android store link. Every shop's website QR page then shows the button.
Privacy & data safety
The app sends data only to your website. It has no ads and no third-party analytics. Firebase is used only to deliver notifications.
| Data | Why | Required |
|---|---|---|
| Name, email, phone | Account and the shop's contact with the customer | Yes |
| Orders, bills, quotations, visits, measurements | The app's purpose | Yes |
| Messages with the shop | Chat | Yes |
| Profile photo | Optional | No |
| Device token | Push notifications | Optional |
Customers can delete their account in the app (Profile → Delete account). Say this in the store forms.
Android permissions used
| Permission | Why |
|---|---|
| INTERNET | Talk to your website. |
| CAMERA | Scan the shop's QR code, take a profile photo. |
| POST_NOTIFICATIONS | Push notifications (Android 13+). |
| USE_BIOMETRIC | Optional fingerprint / face lock. |
Code structure
lib/
main.dart, config.dart, core.dart start-up, app name, shared imports
api/ API client, repository and models
state/ sign-in, cache, connectivity, push, deep links
util/ theme, formatting, app config
screens/ home, orders, billing, visits, shop, measurements, chat ...
widgets/ floating tab bar, stitched cards, garment drawings, thread timeline
test/ unit and screen tests (offline, fake server)
docs/ openapi.yaml (API contract)
assets/ app icon
API reference
The app uses /api/v1 on your website with Laravel Sanctum bearer tokens (ability customer, 90 days). The full contract is in docs/openapi.yaml.
| Call | Purpose |
|---|---|
GET /api/v1/company/{code} | Shop branding by company code (no sign-in) |
POST /api/v1/auth/login | Sign in with company code, email, password |
GET /api/v1/customer/dashboard | Home data |
/api/v1/customer/orders, quotations, invoices, appointments, measurements, catalogue, messages | Lists and actions (each can be hidden per shop) |
Platform rules: 426 update_required below the minimum version (the app sends X-App-Version), 503 during maintenance, 403 app_disabled when the shop's app is off.
Updating to a new version
- Update the website first and run
php artisan migrate. - Copy your changes (see Branding) into the new project, or copy the new
lib/over yours. - Raise the version in
pubspec.yaml, runflutter pub get,flutter testand build again.
Troubleshooting
| Problem | What to do |
|---|---|
flutter doctor shows a red cross | Fix that line first; most problems come from missing Android licences or SDK tools. |
| "Company not found" | Check the code on the owner's Mobile App page and that the shop's app is switched on by the super admin. |
| Cannot connect / handshake error | Use https:// with a valid certificate in release builds. For a local website use http://10.0.2.2/... in the emulator (debug only). |
| "Update required" | The minimum version is higher than the app's. Lower it, or install the new build. |
| Wrong password message | The email must belong to a customer of that shop. Another shop's account gives the same message. |
| No push notifications | Check google-services.json, the server's FCM_CREDENTIALS path, and that the phone allowed notifications. |
| QR scan does nothing | Allow the camera. Or type the company code. |
| Build fails: Gradle / SDK | Run flutter clean, then flutter pub get; make sure Java 17 and the Android SDK are installed. |
FAQ
Do I need a separate app for every shop?
No. One app serves all shops on your website; customers pick theirs with the code or QR.
Can I make an app only for one shop?
Yes: set your own name, icon and application id, build and publish it under your own account. The shop's branding still comes from the website.
Can staff or the owner use it?
No, it is a customer app. Staff use the website.
Do customers need to register?
The shop creates the customer account (Customers in the website). The customer signs in with that email and password.
Where do customers pay?
The app opens the shop's secure payment page already signed in. The payment methods are the ones the shop set up on the website.
Support & changelog
Support covers installation questions, bugs and help with the steps in this guide. Customisations (new features, design changes) are not included but can be ordered separately. Create a support ticket here.
Changelog
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | November 2026 | First release: company code / QR sign-in, shop branding, home, orders with thread timeline, bills and online payment, quotations, visits and booking, shop and quotation requests, measurements incl. your own from home, reviews, chat, notifications inbox and push, app lock, offline cache. |