Lokal
Everything local in Mauritius, in one place.
Web · iOS · Android

Home 
Businesses 
Business profile 
For owners 
Seller dashboard

Explore 
Map 
Business profile 
For owners
In Mauritius, “who has this, and are they open?” is usually answered by a phone call, a social page nobody has updated, or a drive to go and see. Small businesses have the stock and the hours; what they lack is a place to say so where people actually search. Lokal is that place — and, since version 2.0, it is also where villa and apartment owners rent out their homes, with Lokal holding the guest’s payment until the stay is done.
Lokal is StyloTech’s own product. We define, design, build, run and support it — the React web client, the Flutter app for iOS and Android, the Supabase schema and its row-level security, the Edge Functions, the stays payments and payouts, and the deployment.
Lokal earns two ways and keeps them apart. Businesses pay one flat monthly plan and Lokal takes no commission on their orders — their customers pay them directly. Holiday stays are free to list, and Lokal keeps 7% of each paid booking. Both are enforced in Postgres rather than in the screens, so the web and both apps answer to the same rules.
- Website
- Mobile app
- E-commerce
- Web
- iOS
- Android
- Web client
- React 19
- TypeScript
- Vite
- Tailwind CSS
- TanStack Query
- Zustand
- Leaflet
- Mobile client
- Flutter
- Cubit
- go_router
- get_it
- flutter_map
- geolocator
- Backend
- Supabase
- PostgreSQL
- Row Level Security
- Edge Functions
- pg_cron
- Infrastructure
- Supabase Realtime
- Firebase Cloud Messaging
- OpenStreetMap
- iCal
- Sentry
- nginx
- Quality & delivery
- Vitest
- pgTAP
- Deno test
- Playwright
- oxlint
- GitHub Actions
- Codemagic
- Product strategy
- UI/UX design
- Design system
- Technical architecture
- Frontend development
- Backend development
- Mobile development
- Database design
- Integrations
- Testing & QA
- Deployment
- Maintenance
What it does
Each part was built for a real job on the day, not for a feature list. The product’s own site walks through them in full.
Search by what you need
A search for “brochette” or “mechanic” matches what businesses sell, not only what they are called — weighted in Postgres across names, tags, descriptions and products, and kept current by triggers.
Who can serve you now
Open, closing soon, busy, delivery available. A status the seller sets expires after 12 hours and falls back to their opening hours and special days, always read in Mauritius time, and the label says when the hours next change.
Holiday stays, booked through Lokal
Villas, apartments, bungalows, campements and guesthouses. The guest requests dates, the host accepts, the guest pays Lokal within 48 hours, and only then is the exact address released. Calendars sync both ways with Airbnb and Booking.com over iCal.
Hosts paid every month
Lokal keeps 7% of each paid booking and pays the host the rest by bank transfer early in the month after the stay. Cancellation policies, refunds to the guest’s bank account and disputes within 48 hours of check-out are all handled by the database.
Profiles, catalogues and deals
Photos, opening hours, contact links and a catalogue with options, stock counts and fixed or “from” prices. A seller can set a limited-time deal price, and the order is charged at that price by the server, never by the client.
Order in the app or on WhatsApp
A cart, a checkout and an order followed from pending to completed, with the buyer paying the seller directly. Where the seller prefers it, the same basket is sent as a ready-written WhatsApp message instead.
Alerts that bring people back
Customers can ask to be told when a product is back in stock or drops in price, and hear about deals from the businesses they saved — each one a push notification in their own language.
Reviews you can trust
Only a customer with a completed order can review, within 60 days, with up to four photos. Sellers reply; anyone can report a review, and an operator moderates it.
Verified, and checked by a person
Businesses can have their registration number checked for a verified badge. Subscriptions — one plan at Rs 490 a month, with 12 months for the price of 11 — are approved by an operator, and a nightly job unpublishes lapsed listings.
Insights for sellers
Profile visits, calls, WhatsApp taps and orders, saves and online orders, charted week by week in Mauritius time, so a seller can see whether being listed is working.
An operator console
Moderation, activations, verifications, review reports, hosts, stay payments, payouts and disputes, platform analytics, and a door-to-door team whose field visits are logged against each business.
Three languages, one product
English, French and Mauritian Kreol throughout the web and both apps, push notifications written in each recipient’s own language, light and dark themes, and a side rail for the iPhone’s unfolded landscape display.
One order, traced
A customer finds a shop on Lokal and orders from it. This is everything between pressing “Place order” and the seller’s phone lighting up.
Read from orders.service.ts, the place_order and resolve_order_lines functions, the orders insert policy, migration 036 and the push-dispatch Edge Function. Every name below appears in the source exactly as written.
- 01
Checkout needs a signed-in buyer
The checkout page sits behind the authentication guard, and the delivery details are validated by a Zod schema before anything is sent.
- RequireAuth
- checkoutSchema
What it says when it refuses
An anonymous visitor is sent to sign in first; a name under two characters or a phone number under six never leaves the form.
- 02
The client previews; the database prices
usePlaceOrder hands the basket to the orders service, which calls one function, place_order. The total on screen is only a preview — the function runs as the buyer, so every rule below still applies to it.
- usePlaceOrder
- placeOrder
- place_order
- 03
Every line is priced again on the server
resolve_order_lines reads each product fresh: its price, the deal price if a deal is running right now, and the options the buyer picked.
- resolve_order_lines
- deal_is_active
- product_not_orderable
- options_changed
What it says when it refuses
A product that has sold out or stopped taking orders, or whose options changed since the page loaded, is refused with a message saying which.
- 04
Two tables, one transaction
The order is written as pending, in rupees, with payment marked direct — Lokal holds no money for orders. Each line keeps its own name, price and regular price, so a later change never rewrites a past order.
- orders
- order_items
- payment_method: 'direct'
- regular_unit_price
- 05
Row-level security checks the buyer
The insert policy requires that the buyer on the row is the signed-in user, and that the business is published.
- buyer_id = auth.uid()
- business_is_public
What it says when it refuses
Ordering as someone else, or from a listing that is not active, is refused by Postgres itself — whatever the client sends.
- 06
…and then the business
The same policy asks whether this business takes orders at all: its switch is on and its subscription is active.
- business_accepts_orders
- accepts_orders
- subscription_status = 'active'
What it says when it refuses
A lapsed subscription, or a seller who has just switched orders off, refuses the insert — even from a browser tab opened before the change.
- 07
Stock is taken under a lock
A trigger on each line locks the product row, takes the quantity off its stock — or off the stock of the option picked — and records that it did, so a cancelled order puts it back.
- order_items_take_stock
- for update
- insufficient_stock
What it says when it refuses
Two buyers racing for the last one cannot both have it; the second is told there is not enough left.
- 08
The seller is told, in their language
A trigger on the new order queues a notification for the seller, rendered from notification_copy in the language on their profile — English, French or Kreol — with English as the fallback.
- queue_order_notification
- notify_user
- notification_copy
- 09
Delivery that survives a failure
The outbox row nudges the push-dispatch Edge Function at once, and a cron job drains anything left every minute. Each row is claimed once, sent to every one of the seller’s devices over FCM and retried up to five times.
- notification_outbox
- push-dispatch
- push-dispatch-drain
- 10
Both sides stay in step
Orders are published over Realtime, so the seller’s list updates live. When the buyer uploads their proof of payment, its timestamp comes from the database clock, not from the phone.
- supabase_realtime
- orders_stamp_payment_proof
Engineering detail
Taken from the project source, not from marketing material.
- Data model
- Supabase Postgres: 47 tables, every one under row-level security with 106 policies between them (and 28 more on storage), 234 SQL functions, 89 triggers, 17 enums and 11 scheduled jobs, built up across 98 migrations
- Authorisation
- Enforced in the database, not the screens — a seller cannot publish their own listing, only an operator can confirm a guest’s payment for a stay, and a rental’s exact address stays private until that payment is confirmed; the service-role key never reaches a client
- Web client
- React 19 with strict TypeScript and Vite, TanStack Query, Zustand, React Hook Form and Zod; 18 feature modules split into domain, application, infrastructure and presentation layers; 88 lazy-loaded pages behind 6 route guards
- Mobile client
- Flutter with Cubits, go_router and get_it on the same Supabase project and the same copy — 307 hand-written Dart files across 21 features, with flutter_map, geolocator, Firebase Cloud Messaging and Sentry
- Stays and payments
- Quotes, availability and refunds computed by Postgres functions; iCal import and export through two Edge Functions; host payouts generated monthly by pg_cron, held while a dispute is open
- Quality gates
- 801 Vitest tests on the web client, pgTAP tests of the row-level security, Deno tests of the Edge Functions and over 700 Flutter tests; every push to main is type-checked, linted, tested, built and released atomically, then smoke-tested against the live site
Everything local in Mauritius, in one place.
