Code structure and customizing
Most changes don't need code: branding, business rules, catalog, texts, languages and integrations are all in the admin panel. This page is for when you do want to change the code.
Each part has a README with its conventions:
backend/README.md: folders, error format, settings, localisationadmin/README.md: building blocks (API client, data tables, forms)mobile/README.md: architecture, routing, auth, how to add a feature
Run the checks in Local development after every change.
Backend (Laravel)
backend/app/
Http/Controllers/Api/V1/ thin controllers; Admin/ for the admin panel API
Http/Requests/ input validation
Http/Resources/ JSON output (never return models directly)
Actions/ business logic, one class per use case (CreateBooking, AcceptQuote…)
Services/ shared helpers: Settings, SlotCalculator, payment gateways, AI clients…
Enums/ statuses and error codes
backend/config/settings.php every admin setting with its default
backend/lang/<code>/ API texts, emails and notifications per language
backend/resources/prompts/ the prompts behind the AI features
- Money is stored as whole numbers in the smallest unit (cents) plus a currency. Times are stored in UTC.
- Errors always have the shape
{ "message", "errors", "code" }. The app translates bycode, so never rename a code that has shipped. - New setting: add it to
config/settings.php, toApp\Services\SettingsSchema(so the admin can edit it), and toConfigResourceonly if the apps may read it.
Admin panel (React)
admin/src/
features/<area>/ one folder per screen group: api.ts, pages, dialogs, tests
components/layout/ sidebar (nav.ts), header
components/data-table/, components/form/ shared list and form building blocks
i18n/locales/en.json every label in the panel
Add a screen by creating a feature folder and an entry in components/layout/nav.ts. Rebuild with npm run build to ship it.
App (Flutter)
mobile/lib/
core/ routing, theme, networking, translations, shared widgets
features/<name>/ data/ (API calls), domain/ (plain models), presentation/ (screens and cubits)
| You want to change | Look in |
|---|---|
| Any text | lib/core/l10n/arb/app_<lang>.arb, or without a release: Settings → Languages → Change app texts |
| Colors, fonts, corners, layout | Settings → Branding first; built-in values in lib/core/theme/ |
| A screen | lib/features/<name>/presentation/ |
| Routes and deep-link paths | lib/core/router/routes.dart, app_router.dart |
| Category icons | lib/core/theme/category_icons.dart |
After changing models or dependency injection, run dart run build_runner build -d.
Common extensions
| Task | Guide |
|---|---|
| Add a payment gateway (Razorpay, PayPal, Paystack…) | Add a payment gateway |
| Add a language | Languages |
| Add a theme preset or font | Theming |
| Change the AI prompts | AI features |
| Call the API from another app | API reference |
Keep your changes upgradable
Keep your copy in Git and make your changes on top of the original version. When an update arrives, merge it into your branch instead of copying files over. Prefer admin settings, text overrides and the rebrand config over code edits wherever they're enough: they survive updates without merging.