Build the Wadaq mobile app from this prototype
This page holds the design system, the mobile patterns and the rules for the Wadaq app. Every colour, size and duration on this page is read live from the shared tokens. When a token changes in packages/ui/src/styles/globals.css and the vendor copy is synced, this page changes too.
The prototype shows how the app looks and behaves. It is not production code. Rebuild each screen with native components and the tokens below.
Run the prototype
Open it
cd design/mobile
bunx --bun serve
# open http://localhost:3000
Opening index.html from disk also works. The folder is self-contained. Restart the server after you pull.
Use it
- Desktop: one live phone and a panel. The panel sets language and theme and jumps to any screen.
- Phone, 760px or less: the app opens full screen. Add it to the home screen to test safe areas.
- Everything inside the phone works: tabs, sheets, swipe, voice capture, approvals and confirms.
URL options
| Option | Example | Effect |
|---|---|---|
?screen= | index.html?screen=deal.html | Opens that screen inside the phone. |
?lang= | home.html?lang=en | Arabic (ar, default) or English (en). The choice is stored. |
?theme= | home.html?theme=dark | Light or dark. The choice is stored. |
#sheet-id | deal.html#sheet-stage | Opens a bottom sheet on load. |
?q= | assistant.html?q=Late orders | Posts the question in the Wadaq chat. |
Folder
*.html | One file per screen. See the screen map. |
css/mobile.css | The mobile patterns. It defines no colour of its own. |
js/mobile.js | The one runtime. Screens use data-* attributes only. See the runtime. |
vendor/ | Synced copies of the tokens, components, icons and fonts. Do not edit. Change the source, then run bun sync-design-system.ts. |
css/prototype.css, js/prototype.js | The phone frame and the panel. Presentation only. |
Principles
Wadaq serves store owners and service businesses in the Middle East and North Africa. Most users are not CRM experts. Many use Arabic and work on a phone between other jobs. The app must feel calm, friendly and obvious.
Colour
Each swatch shows light on the left and dark on the right. Click a token name to copy it. Every grey is neutral: red, green and blue are equal. --primary and --destructive are the same in both themes.
Surfaces
Text
Brand and intent
Tones
Pills, icon tiles, avatars and notices take a tone, never a raw colour. One meaning has one tone everywhere. Free categories hash a stable id to a tone, and never to red. The samples follow the page theme. Switch it to see the other set.
Type
Arabic uses Thmanyah Sans (400, 500, 700; 600 uses the 700 file). English uses Geist. Numbers use Geist with tabular figures in both languages. Titles use −0.02em tracking. Body text is 15pt. Never go below 12pt.
Space and size
Use the steps below and nothing in between. The base unit is 4pt.
Mobile metrics
| Token | Value | Use |
|---|
Safe areas come on top of these values. The navigation bar adds the top inset. The tab bar, action bar, composer and sheet footer add the bottom inset.
Radius and elevation
Never use another radius. rounded-none is correct only where two elements join edge to edge.
Nothing floats unless it sits on top of something. A card at rest has --shadow-xs.
Motion
| Token | Value | Use |
|---|
- A pushed screen slides in from the inline end. Back slides the other way. In Arabic the inline end is the left.
- A tab switch cross-fades. The tab bar, the Ask bar and the navigation bar stay still.
- A sheet rises from the bottom. A drag on the grabber or the head closes it.
- A button scales to 0.98 when pressed. A round send or mic button scales to 0.94.
- Reduce motion removes every transition and animation.
Icons
0 icons, 24pt grid, 1.75pt stroke, round caps. Click an icon to copy its name. A directional icon (back, forward, send) mirrors in Arabic. A clock, a check or a logo never mirrors.
Components
These samples use the prototype's own classes. Switch "Component samples" in the side bar to see RTL and LTR.
Mobile patterns
| Pattern | Rule |
|---|---|
| Tab bar | Home, Customers, Deals, Tasks, Inbox. Icon and label on every tab. The current tab has a --primary-soft chip behind a green icon. A solid --card bar with a top hairline. No blur. |
| Navigation bar | Back (chevron and the previous title) at the inline start. Title in the middle. At most three icon actions at the inline end. Create is a plus icon. No filled button. |
| Large title | 28pt under the bar. It collapses into the bar on scroll, and the bar gets a hairline. |
| Lists | White cards of 60pt rows: a 40pt avatar, logo or icon tile, a title and one muted line, then a value or a pill at the inline end. Separators start after the leading tile. |
| Filters | A horizontal row of 36pt chips. The selected chip is the foreground fill. A segmented control switches sections on a record. |
| Bottom sheets | They replace side sheets and dialogs. A grabber, a head with a close button, and a footer with one full-width primary button. A destructive confirm is a sheet with the red button. |
| Record screens | A centred hero (avatar or logo, name, amount, pills), four quick actions (call, WhatsApp, email, note), the agent box, then the details. A deal adds a stage track and a fixed action bar with one primary button. |
| Tasks | A tap on the round check, or a swipe toward the inline end, finishes a task. The toast offers Undo. The title opens the task screen. |
| Confirm | An action that sends to a customer, removes access, signs out or deletes asks first: a tile, one question, one line with the effect, Cancel and one button. Red only when you cannot undo it. Resume does not ask. |
| Busy and state | An action that reaches a server shows a spinner in its button, then a toast. A state change shows on the screen: Pause becomes Resume, Connect becomes a Connected pill. |
AI-first patterns
Wadaq is one tap away on every screen. Agents prepare work. The user approves it. Nothing goes to a customer without the user.
طلبت لينا عرض السعر أمس ولم يُرسل رد.
على الأرجح، إن خرج العرض اليوم.
| Pattern | Rule | Open |
|---|---|---|
| Ask bar | A white field with a brand tile and a hint for that tab, then a round primary mic. The field opens the Wadaq hub. The mic opens voice capture. | Home |
| Voice capture | Two steps. Listening shows a mic, a live wave and the transcript. Done shows "Wadaq will do N things", one row per record with a switch, and "Save N items". | Voice |
| Wadaq hub | Greeting, privacy line, composer with attach and mic, suggestions, then Waiting for you, agents and recent chats. | Hub |
| Approvals | One card per prepared item: agent and channel, the action, why, the draft and the linked records. Approve, Edit, Skip. Approve and Skip give Undo. Approve all asks first. | Approvals |
| Inline questions | Two question chips in an agent box. A chip shows a thinking line, then the answer in a white block in the box, with at most one primary action. | Deal |
| Agents | List with status. Detail: stats, questions, Overview, Activity, Settings, Pause and Run now. A new agent is built in chat with a build card and a saffron follow-up question. | Agent |
| Write with Wadaq | A sparkles button in the thread composer. The sheet lists replies built from the deal, then translate, summarize and attach. | Thread |
RTL, numbers and money
ar-u-nu-latn. Dates and counts keep 0–9 in Arabic.51–200 shows as 200–51.Accessibility
- Every text pair meets WCAG AA at 4.5:1 in both themes. Re-run the contrast check when a value changes.
- Focus is always visible: a 2pt
--ringoutline, 2pt away from the control. - Touch targets are 44pt on mobile. Icon-only buttons have a spoken label in both languages.
- Colour is never the only signal. A status pill has text. A delta has an arrow. A saffron mark has text or a label.
- The spoken name of a control contains its visible text.
- A sheet moves focus into itself and returns focus to its trigger on close. A swipe action also has a tap equivalent.
- Reduce Motion removes every transition and animation.
Screen map
"Phone" opens the screen inside the prototype. "File" opens the screen alone.
| Screen | What it holds | Open |
|---|---|---|
| Home · tab | Agent picks with questions, KPIs, target, tasks, deals closing | Phone · File |
| Customers · tab | Contacts, companies, leads with the agent ranking | Phone · File |
| Deals · tab | Forecast, stage chips, deal cards, sort | Phone · File |
| Tasks · tab | Day plan, views, swipe to finish | Phone · File |
| Inbox · tab | WhatsApp and email, drafts row, compose | Phone · File |
| Contact | Hero, quick actions, agent box, info, deals, activity | Phone · File |
| Company | Agent summary, people, deals, details, delete | Phone · File |
| Lead | Research, fit score, convert, disqualify | Phone · File |
| Deal | Stage track, agent box, tabs, stage and delete sheets | Phone · File |
| Task | Agent offer, details, notes, snooze, delete | Phone · File |
| Thread | Conversation, suggested reply, Write with Wadaq | Phone · File |
| Orders | Order list and order sheet | Phone · File |
| Wadaq hub | Composer, approvals preview, agents, chats | Phone · File |
| Approvals | Approve, edit, skip, approve all | Phone · File |
| Chat and past chats | Wadaq chat, chat history | Phone · History |
| Agents, agent, new agent | List, detail, build in chat | Phone · Agent · New |
| Notifications | All and unread, settings | Phone · Settings |
| Account | Profile, store, Wadaq, settings, sign out | Phone · Profile · Connections · Team |
| Search | Results and Ask Wadaq instead | Phone · File |
| Sign in and onboarding | Sign in, sign up, forgot password, onboarding | Phone · Sign up · Forgot · Onboarding |
Prototype runtime
Use this table to read a screen's behaviour, or to change the prototype. A screen has no script of its own. js/mobile.js reads these attributes.
| Attribute | Does |
|---|---|
data-tab | On body. Draws the tab bar and the Ask bar, and marks the current tab. |
data-sheet="#id" | Opens a bottom sheet. data-sheet-close closes it. |
data-include | Mounts shared sheets: create, new task, deal, contact, note, edit contact, voice. |
data-back | Goes back. The href is the fallback. |
data-filter-group | Chips or segments that show [data-show] items. |
data-toast | Shows a toast. data-en-toast is the English text. |
data-confirm | Asks in the shared confirm sheet first. Options: -body, -ok, -icon, -tone="destructive". |
data-busy | Spinner for 800 ms, then the action. |
data-swap | Flips a [data-swap-root] between [data-when="off"] and [data-when="on"]. |
data-reveal | Thinking line, then a hidden answer. |
data-steps | One step at a time. data-step-to moves. data-think shows the thinking line first. |
data-resolve, data-resolve-all | Approve or skip cards in a [data-queue], with Undo. |
data-compose | Writes text into the composer. |
data-check, data-clear | Finish a task from a button. Remove unread dots. |
The full contract is in design/mobile/README.md. The rules are in docs/design.md and docs/design-system.md §6. When this page and the spec disagree, the spec wins.
Build it natively
Tokens
- 1 CSS px on this page is 1 pt on iOS and 1 dp on Android.
- Use "Copy tokens as JSON" at the top. It gives light and dark colours, sizes and durations.
- Name native tokens like the CSS ones:
primary,primarySoft,space4,radiusXl. - Map tones to one enum. A view takes a tone, never a colour.
Platform
- Respect safe areas. Bars carry the inset. Content scrolls under the navigation bar.
- Use the platform's back gesture. It must also mirror in Arabic.
- Sheets use the native bottom sheet with a grabber and drag to close.
- Bundle Thmanyah Sans, Geist and the riyal font. Do not load fonts at runtime.
- Follow the system theme. The user can override it in Profile.
Ship checklist
- The screen matches the prototype in Arabic light, Arabic dark, English light and English dark.
- At most one green filled button in each region. Red only for actions you cannot undo.
- Every tint has a meaning from the tone table.
- Only token values. No literal colour, size or radius.
- Directional icons mirror once in Arabic. Numbers stay Latin.
- Every action that sends, signs out, removes access or deletes has a confirm. Approve and Skip have Undo.
- Every list has loading, empty and error states.
- Agent output sits in the agent box, with one primary action and no emoji.