Appearance
Mobile app
Your store as an app on iOS and Android: the kitloom app signs in, prices its cart, places orders and gets push about them from this site.
kitloom/ · admins: kitloom/, kitloom/
Video lessons
Recorded in the Filament admin; the Nova admin works the same way.
- Mobile app: the phones it runs on
- Mobile app: an offer to the phones that said yes
- Mobile app: your store on the phone
Your store or your salon as an app on iPhone and Android. The kitloom app is one app for every kitloom site: it reads your pages from the same addresses as your site (every page answers as JSON), and it asks this module for what a phone needs beyond that — to sign in, to price the cart it keeps and place an order, to book a time and change it, to show the account, and to be told by push when an order or a booking moves. One admin, one database, three screens: the site, the iPhone, the Android phone.
The app shows what the site has. With kitloom/shop it is a store: the cart, the checkout, the orders. With kitloom/bookings it is a salon: the services, the free times, a booking, the staff member's day. With both it is both; the module requires neither, and a module switched off on the Modules screen counts as not there.
The app itself is built from your site's name, icon and colours and published under your own Apple and Google accounts (see Getting the app built). This module is the site's side of it. The admin pages are kitloom/mobile-apps-filament or kitloom/mobile-apps-nova: Mobile app → Settings and Devices.
What the owner does
- Settings → Serve the app. Until it is on, the app's routes answer "not found" and nothing is sent to any phone.
- Install links. Where the app is installed from: the App Store and Google Play links once it is listed, or a public TestFlight link and an APK while it is being tried. The app shows them to nobody; your site's theme and the module's banner do.
- App Store banner. With the App Store id (the number in the App Store link), Safari on an iPhone offers the app at the top of every page of the site. One meta tag, no script, no cookie.
- Push. On, the customer's phone is told when their order is placed, whenever its status changes, and when you write them a note on it, in the site's language. With bookings, the client's phone is told when you confirm, decline, cancel or move their booking, before a visit, to say how it went, and when it is time to book again; the staff member's phone of a new booking and of one a client cancelled or moved (Push bookings to the client, Push bookings to the staff). Always beside the email and the text, never instead, and never to whoever did it. Push goes through Expo's push service, which holds the app's Apple and Google credentials; an access token from Expo's dashboard is optional and kept encrypted.
- Oldest app version served. An older app is told to update before it goes on. Leave it empty to serve every version.
- Downloadable products. Off by default: a downloadable product is bought on the site only, because Apple makes an app sell digital goods through its own purchases. Physical goods and services are paid as on the site.
Devices lists the phones the app runs on — the platform, the app's version, whose it is, when it was last seen. Delete one and it gets no more push.
Offers and news
A message to many phones at once — a sale, a new product, the shop closed on Monday. It reaches only the phones whose person said yes to offers and news in the app: the app asks, the answer is kept with its time, and one tap in the app takes it back. Order notices are apart and need no such yes. Apple and Google require exactly this of an app that pushes offers.
What a message has: a title (a phone shows about 40 characters), a text (about 150), and if you want a link — a product, a category, a post or a page of this site, opened in the app on a tap — and a coupon, put into the cart. Whom it is for: everyone who said yes, only those signed in or only guests, those who bought a product or from a category (a paid order, the category with its subcategories) on a shop, a salon's clients by their visits (seen in the last so many days; not seen for so many weeks with nothing booked ahead — the ones to win back; a staff member's; those who had a service — a visit being a booking marked done), the phones of one language. The count of phones is shown before anything goes.
It goes now or at a time you set. Two things hold it back, both in Settings:
- Quiet hours (21:00 to 09:00 by default, the site's time): a message due then goes in the morning.
- Offers a phone gets in a week (2 by default): a phone that had its share gets the next message in its inbox only, without a push.
How it did is four numbers, and each says less than it seems:
| Number | What it is |
|---|---|
| Aimed | The phones of the audience when it went |
| Pushed | Expo took the push for the phone |
| Delivered | Apple or Google took it for the phone — not that anyone saw it: neither says whether a notification was shown or swiped away |
| Opened | The person opened it — tapped the push, or opened it in the app's inbox. The app says so; counted once per person |
A push is gone once swiped, so the app keeps an inbox: every message sent to the phone, read or not, for 90 days. Signed in, a person sees there what their other phones got too.
Whoever sends needs the permission Send messages to the app (send_), which administrators and editors hold; it is apart from managing the app's settings. An AI agent can write a draft and read how earlier messages did (mobile_, mobile_); it cannot send — a person does.
What the app does on the site
- Signs in with the email or login name and the password, as the site's login form takes them, with the same locks against guessing. A sign-in makes an application password named after the phone ("Ada's iPhone · Green Pantry"), which the phone keeps as its token: it is listed with the user's other application passwords (WordPress REST API → Application passwords, and on their profile), and revoking it signs the phone out. An account that signs in with a second factor (kitloom/two-factor) is asked to use the site: the app has no step for the code.
- Signs up while Account sign-up is on in the shop's settings — on a site without a shop, while Anyone can register is on in Settings → General — and asks for a lost password through the site's own email.
- Prices its cart. The cart lives on the phone. The site prices it — the lines with their cards, the coupons, the shipping rates for the address, the taxes, the total — and says on each line what cannot be bought (sold out, gone, a download). A signed-in customer's lines are also the ones the site keeps for them, so the phone and the browser share one cart.
- Places the order as the site's checkout does, with the same fields and checks, as the customer or as a guest while the shop allows it. Cash on delivery and a bank transfer end in the app; an online gateway's page opens in the phone's browser, and the app reads the order back to learn it is paid.
- Books a time. The services, who does them and the free times are the ones the site's booking form shows. A booking is made as the signed-in client or as a guest with a name, an email and a phone; a taken time is told as the form tells it. A booking with a deposit answers the page it is paid on, which the app opens in the phone's browser. The client cancels and changes the time while your rules allow it, and keeps their own note for you.
- Shows a staff member their day. A user linked to a staff member sees the bookings waiting for them and the day's, confirms, declines, marks done or no-show, and adds a note about a client — what the account page's Schedule shows.
- Shows the account: the sections every module offers the account page — orders, addresses, downloads, appointments, the schedule. The app names no module; a section installed later is there at once.
- Asks for the account to be erased. The App Store requires that an app which makes accounts lets the user delete theirs from the app. With kitloom/privacy installed, the app files an erasure request for the user's own email, as the owner files one: the person confirms it from the email, and the owner erases what the law lets go under Tools → Erase Personal Data. Without kitloom/privacy the app shows the site's email instead.
With kitloom/privacy, Tools → Export Personal Data lists the user's devices (never the push token) with their answer about offers, and the messages their phones got; Erase Personal Data forgets the phones and their inboxes.
Getting the app built
The app's code is kitloom/, an Expo (React Native) project. One file, kitloom., names the site: npm run configure -- reads this module's app/ and writes the name, the icon and the colours into it. Then eas build makes the iPhone and Android builds under your own Apple Developer and Google Play accounts, and TestFlight and Google Play's testing tracks hand them to your first testers before the stores list them. Apple lists a store that ships; a demo store is refused.
Routes
Under the site's REST root, /, with WordPress's JSON errors. A phone sends its token as Authorization:; no session, no CSRF. Every route answers mobile_ (404) while the app is not served, and mobile_ (426) to an app older than the minimum (the X- header names its version).
| Route | Methods | What |
|---|---|---|
/ | GET | The site's name, icon and logo, language, the account's sections and account., the install links, the minimum version, whether push is on, app. (which of the routes below this site answers: reviews, favorites, messages, bookings, forms); with a shop currency, shop (its pages and rules, the payment methods) and reviews, with bookings bookings (the clock, the days a time may be on, what a client may change, the ways a deposit is paid; location and phone — the salon's, the first open location's once there are locations; and, once the salon has made a location, locations — the open ones as the site's booking part lists them: id, slug, name, address lines, phone, hours, page, image, and the ids of the staff who work there and the services done there) — null without |
/ | POST | login, password, app (the app's name), device (name, platform, app_, locale, push_) → token, user |
/ | POST | name, email, password, app, device → token, user (404 while sign-up is off) |
/ | GET | The token's user, with their addresses on a shop (billing, shipping, checkout; null without one) |
/ | POST | Revokes the token; push_ frees the phone |
/ | POST | login — the site's reset email, the same answer whether an account matched or not |
/ | DELETE | password — an erasure request through kitloom/privacy (202), 501 without it |
/ | POST | lines (product_, quantity, variation_, variation), coupons, destination, shipping_, email → the cart as the site's cart page sees it, plus problems per line |
/ | GET, PUT | The signed-in customer's lines kept on the site |
/ | POST | lines, coupons and the checkout's fields (billing_, shipping_, ship_, shipping_, payment_, order_, createaccount, account_, terms) → order, payment. for a gateway, token for an account made here |
/ | GET | The order, the customer's own or a guest's with ?key= |
/ | GET | A section of the account by key, with its own query (id, list) |
/ | POST | The name, the email, a new password with the current one, as the account page saves them |
/ | POST | An address (type: billing or shipping), as the shop's forms save it |
/ | POST | rating, review — a review by the signed-in customer, under the shop's rules (reviews open, verified owners only, moderation); review. says whether it is shown at once |
/ | GET, PUT | The signed-in customer's hearts, kept with the account (items: id, slug, title, image, price, up to 200) so another phone finds them |
/, / | POST | With kitloom/social-accounts: provider and return (the app's own address, myapp://) → url to open in the system browser and a verifier to keep; the browser comes back to return with ?code=, and code with verifier → token, user; a sign-in the site refused comes back as ?error=refused&reason= with kitloom/social-accounts' word for it (email_, no_, no_, linked_, denied, failed). / lists the services under account. |
/ | GET | The salon's open locations in the owner's order, as bookings/ answers the booking form ([] without any) |
/, /, / | GET | What bookings/ answers the booking form: the services, the staff (?service=), a day's free times (?service=&date=, &staff=) or how many each day has (?service=&from=&days=); &location= (a slug or an id) what is done there, who works there, the times there |
/ | POST | service, staff, start, client_, location (required where two or more locations take bookings: else 422 booking_), and for a guest name, email, phone → booking, message, manage, and calendar or, with a deposit, pay. A guest who sends account: (and app) is signed in with the booking where sign-up is open: an account is made for the email, token and user come back, and the link to choose a password goes to the email; an email that has an account books as a guest and gets sign |
/, / | GET, POST | For a staff member or a manager: the client cards they see (?search=), and a booking made for a client — client (a card) or name with phone or email, service, start, client_, location (none: where the staff member works then); a staff member books into their own day |
/ | GET | One booking, for its client (role:) or whoever decides on it (role:), with urls. and urls. |
/, /, /, / | GET, POST, DELETE | A staff member's working side: seven days of their bookings and time off (?from=); the visits behind them with totals (`?period=day |
/, / | GET, POST | The salon moves a booking — its staff member's own, or any for a manager: the free times of a day (?date=) or how many each day has (?from=&days=), with the staff who may take it (a manager's choice, ?staff=); move takes start and from a manager staff. The client is told. POST / asks the salon to give the visit to a colleague and DELETE takes that back; the client is told nothing by either, and salon/ lists such visits under reassign with who is free at that time |
/, /, /, /, /, / | GET, POST, DELETE | desk — who the caller is at the salon (staff, manages). For whoever manages the bookings, the working side of the whole salon: a day of every staff member (?date=, &location= one location's), the totals with by, time off for a staff member (staff) or the salon closed (none), every client |
/, /, /, /, /, /, / | POST, DELETE, GET | With kitloom/booking-checkouts: a visit paid at the salon, by whoever decides on its booking — the bill made on first asking, lines added and taken off, the tip, a payment by hand (method cash or other, amount for a part), money given back by a manager; the day's takings, a staff member's own or the salon's. A card through the salon's own Stripe: / for Tap to Pay on the phone, / and /; / and / (/) for a reader on the counter. / says bookings. |
/ | GET, POST | The talk about a visit between its client and the salon (the staff member it is with, a manager): the thread as the caller reads it — open, side, messages (mine, name, body, date, read) — read by asking; body adds a line, pushed to the other side's phone. / says bookings. while the salon takes them |
/, / | GET, POST | The times the client may move it to, and the move (start) |
/ | POST | cancel by the client; confirm, decline, done, no_, cancel by its staff member or a manager (reason) |
/ | GET | What clients said of their visits: average, count, stars, a page of reviews (?page=, ?staff=) |
/ | POST | rating (1 to 5), body — the client's review of their own visit that happened, once |
/, / | POST | The client's own note and reminders (own_, reminders); a staff member's note about a client (body) |
/ | POST | With kitloom/forms: a contact form of the site, drawn by the app from the page's shortcodes part — its fields, the honeypot's two fields as the page gave them and _ (the page it was on) → the form's own answer (status: mail_, validation_, spam, mail_; message; invalid_). It is the message the site's form makes — in Contact → Messages, the form's emails, the owner's notice — marked Mobile app where the browser is named. The site's captcha is not asked, as a phone cannot draw it: the honeypot and Akismet are, and one address sends three a minute, ten an hour |
/ | PUT | push_, platform, name, app_, locale — a guest's phone too; offers (true or false) is the person's answer about offers and news, left as it was when not sent |
/ | DELETE | Forgets the phone, with its inbox |
/ | GET | The phone's inbox by push_, and the signed-in person's other phones': messages (id, title, body, url, coupon, received_, read), unread, page, more |
/ | POST | The person opened the message (push_) |
The shop's routes — the cart, the checkout, the orders, an address, the reviews, the favorites — answer rest_ (404) on a site without kitloom/shop, and the bookings' on one without kitloom/bookings. The bookings' are kitloom/bookings' own controllers, mounted here so the phone's token signs what the site's session signs under bookings/; the booking itself skips the form's spam protection, which a phone cannot draw, behind a throttle of its own.
The catalogue is not here: a product, a category, a search and the front page are read from their own addresses with Accept: (?include=catalog, product, storefront, menus), as the site's own front end reads them.
Settings
| Option | Default | What |
|---|---|---|
mobile_ | off | The app is served |
mobile_, mobile_, mobile_, mobile_ | — | Install links |
mobile_ | — | The App Store id, for the banner |
mobile_ | off | Safari's App Store banner on the site's pages |
mobile_ | — | The oldest app version served |
mobile_ | on | Push about orders |
mobile_ | — | Expo's access token, encrypted; written by the settings page only |
mobile_ | off | Downloadable products may be bought in the app |
mobile_ | on | A note to the customer on their order rings their phone too |
mobile_ | on | The client's phone hears of their bookings |
mobile_ | on | The staff member's phone hears of new, cancelled and moved bookings |
mobile_ | 2 | Offers a phone is pushed in seven days; 0 — no limit |
mobile_, mobile_ | 21:00, 09:00 | The hours no offer goes out in, the site's time; empty — none |
Push
Send is a queued job: the customer's phones are told from the queue, through https://, one ticket per phone. php artisan mobile- (scheduled hourly) reads the receipts and forgets the phones Apple and Google no longer know, as Expo asks every sender to. The phones are mobile_, the tickets mobile_.
Push\ listens to the shop's Order, Order and Order and carries {type:. Push\ listens to the bookings' Booking, Booking, Booking and Client: a client's push carries {type: (in the language the booking was made in), a staff member's {type:, "time to book again" {type:.
A message is a row of mobile_, written by Messages\ with the acting user: create() and update() (a draft; stage() for an admin that saves the model itself), schedule($message, $at) — now when no time is given — cancel(), reach($audience), test($message, $actor) to the author's own phones. Messages\ sends it a hundred phones at a time (Send, each job the next): a phone gets its row in mobile_ before its push goes, so a chunk tried again pushes only to the phones still waiting. mobile- (every minute) starts what is due and picks up a message left half sent; mobile- (daily) deletes inbox rows older than messages. and the phones of guests unseen for devices.. The push carries {type:. Tests fake Expo with Testing\.
Configuration
php artisan vendor: for kitloom-: routes., push. and push., messages., messages. and messages., devices., ai., privacy., and the admin sections (filament., nova.). The rate limit and the application passwords are kitloom/api's.
Tests
From the application that installs the package: php vendor/.