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 |
|---|---|
iphone_app/customer_app/ | The Flutter project of the iPhone (iOS) app (package id com.smarttms.tmsCustomer), with its own ios/ folder, lib/ (code), test/ (77 automatic tests), docs/openapi.yaml (API contract) and assets/ (icon). |
iphone_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)
- A Mac with the latest Xcode and CocoaPods
Phones that can run the app
- iOS 15 or newer
Accounts
- Apple Developer Program (about 99 USD a year)
- 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 & Xcode
- You need a Mac with the latest Xcode from the Mac App Store. iPhone apps cannot be built on Windows or Linux.
- Install the Flutter SDK (3.27 or newer) from docs.flutter.dev and add
flutter/binto your PATH. - Install CocoaPods:
sudo gem install cocoapods(orbrew install cocoapods). - Run
flutter doctorand fix every line that is not a green tick for Xcode. - An Apple Developer Program membership (about 99 USD a year) is needed to publish.
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-iphone-v1.0.0.zipand open a terminal iniphone_app/customer_app. flutter pub get- Optional but recommended, check everything works before touching anything:
flutter analyze flutter test - Choose your own bundle identifier instead of
com.smarttms.tmsCustomer:
In Xcode: Runner target → General → Bundle Identifier. - 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 simulator
Run flutter devices to see what is connected.
On the simulator
open -a Simulator
flutter run --dart-define=API_BASE_URL=https://your-website.com
The simulator reaches a website on your Mac at http://localhost. The camera (QR scan) is not available in the simulator: type the company code instead.
On a real iPhone
- Connect the iPhone, unlock it and tap Trust. Turn on Developer Mode (Settings → Privacy & Security).
- Open
ios/Runner.xcworkspacein Xcode, select the Runner target → Signing & Capabilities → choose your Team and set your own Bundle Identifier. flutter run --dart-define=API_BASE_URL=https://your-website.com
Debug builds accept plain http:// for testing. Release builds need HTTPS.
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 | ios/Runner/Info.plist (CFBundleDisplayName) |
| 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 iOS app with your bundle identifier.
- Download
GoogleService-Info.plistand add it toios/Runnerin Xcode (tick Copy items if needed). - Upload your APNs key (.p8) in Firebase: Project settings → Cloud Messaging → Apple app configuration.
- 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 add Associated Domains:
- In Xcode add the capability Associated Domains with
applinks:your-website.com. - Publish
https://your-website.com/.well-known/apple-app-site-association(no extension, JSON) listing your Team ID + bundle identifier and the path/join/*.
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 & capabilities
- In Xcode open
ios/Runner.xcworkspace→ Runner target → Signing & Capabilities. Choose your Team, keep Automatically manage signing on and set your own Bundle Identifier. - Add the capability Push Notifications and Background Modes → Remote notifications.
- For https invite links add Associated Domains with
applinks:your-website.com(see Invite links). - In the Apple Developer site create an App ID for your bundle identifier, and (for push) an APNs key.
Build the release
cd iphone_app/customer_app
flutter pub get
cd ios && pod install && cd ..
flutter build ipa --release --dart-define=API_BASE_URL=https://your-website.com
The archive is created in build/ios/archive/. Open it in Xcode (Window → Organizer) and choose Distribute App → App Store Connect → Upload.
Always pass your HTTPS address with --dart-define=API_BASE_URL=... for a release, or customers will be asked for the address.
Publish on the App Store
1. Developer account
Join the Apple Developer Program.
2. Create the app in App Store Connect
My Apps → + → New App. Name Smart TMS (or your own), bundle id = your Bundle Identifier, SKU any text.
3. Store listing
- Description, keywords, support URL, privacy policy URL.
- Screenshots for 6.7" and 6.1" iPhones.
4. App privacy
5. Upload and submit
Upload the build from Xcode, wait until it shows in TestFlight, test it, then choose it under App Store → Build and Submit for Review.
Review note: Apple needs a way to sign in. In App Review Information give a demo company code and a demo customer's email and password.
After it is live, copy the App Store link into Super admin → Mobile App → iPhone store link.
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.
iPhone permissions used
| Info.plist key | Why |
|---|---|
| NSCameraUsageDescription | Scan the shop's QR code, take a profile photo. |
| NSPhotoLibraryUsageDescription | Choose a profile photo. |
| NSFaceIDUsageDescription | Optional Face ID 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 Xcode set-up, CocoaPods or signing. |
| "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://localhost/... in the simulator (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 GoogleService-Info.plist, the APNs key and the Push capability, 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: Pods | Run flutter clean, then cd ios && pod repo update && pod install. |
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 bundle identifier, 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. |