Introducing a new way to review your PRs.

Read the announcement

ndolestudio / httpsms

Send and receive SMS messages using your Android phone programmatically via a simple HTTP API with end to end encryption supported.

View on GitHub

22 documents · Updated Nov 18, 2026

docs / dashboard-message-experience

Dashboard message experience

The dashboard message experience gives an authenticated user one place to manage contacts, view message threads, inspect message history, search across messages, and start single or bulk sends. It links the selected Android phone to the message view so that the user can see activity for the right sender and receive updates as delivery work changes. It is the messaging child page of Web dashboard.

Message workspace

The message workspace is the dashboard's main entry point for SMS activity. The /threads page presents the thread list, while the default layout adds the same list and controls as a desktop navigation drawer and keeps a compact header-led view on smaller screens.

The workspace keeps the active phone, its recent heartbeat, and the archive view close to the thread list. A user can switch the sender phone, view archived threads, open a thread, start a message, upload a bulk file, open message search, or manage contacts from the shared menu. All message pages require authentication before they load.

The main navigation and message refresh path connect the user’s selected phone to the visible conversation state.

flowchart LR
    A[Authenticated user] --> B[Selected phone]
    B --> C[Thread list]
    C --> D[Conversation]
    C --> E[Search messages]
    C --> F[New message]
    C --> G[Bulk messages]
    C --> H[Contacts]
    D --> I[Updated thread and message state]
    E --> I
    F --> I
    G --> E
    H --> D

Phone context

The phone context identifies which connected number owns the thread view and which number sends a new message. The dashboard loads the user’s phones, selects the saved active phone when available, and otherwise uses the first available phone; changing the selection reloads the thread list. A heartbeat indicator gives a quick view of phone activity without leaving the workspace. web/…/phones.ts• L5-41 web/…/MessageThreadHeader.vue• L39-67

References: web/…/phones.ts• L5-41 web/…/MessageThreadHeader.vue• L39-67

Shared workspace controls

The shared header and list form the common message UI on desktop and mobile. The header owns phone selection, archive switching, and links to contacts and message actions; the list shows each contact’s latest content, date, read state, and a compact delivery state. When no phone exists, the list changes from an empty inbox to a prompt to install the Android app. web/…/MessageThreadHeader.vue• L84-209 web/…/MessageThread.vue• L64-120 web/…/default.vue• L18-82

References: web/…/MessageThreadHeader.vue• L84-209 web/…/MessageThread.vue• L64-120 web/…/default.vue• L18-82

Contact management

Contact management gives the dashboard a small directory that adds names and other contact data to message work. The /contacts page supports server-backed search and paging, while the same contact form can be used from the directory or from a thread.

Contact directory

The contact directory lets a user add, edit, delete, and import contacts from a CSV file. It searches by name, phone number, or email and keeps sorting and paging with the server result, so the table can handle a contact set larger than one page. Imported rows return row-level errors in the page while general request results use the shared notification path. web/…/index.vue• L21-207 web/…/index.vue• L225-418

References: web/…/index.vue• L21-207 web/…/index.vue• L225-418

Contact records

The contacts store is the shared state and action boundary for the directory. It owns the current search result, total count, loading state, and last paging and sort window; create, update, import, and delete actions keep that state aligned with the service and reject stale loads from replacing newer results. web/…/contacts.ts• L6-115 web/…/contacts.ts• L117-238

References: web/…/contacts.ts• L6-115 web/…/contacts.ts• L117-238

Contact form

ContactDialog is the shared add and edit form for contact records. It requires a name and at least one phone number, and it can hold more phone numbers, email addresses, and custom properties; when a thread opens it, saving refreshes the thread’s contact details without reloading the directory. web/…/ContactDialog.vue• L26-217 web/…/ContactDialog.vue• L220-410 web/…/index.vue• L136-138 web/…/index.vue• L703-709

References: web/…/ContactDialog.vue• L26-217 web/…/ContactDialog.vue• L220-410 web/…/index.vue• L136-138 web/…/index.vue• L703-709

Thread browsing

Threads are the dashboard’s mailbox view: each thread groups activity for one contact and one selected owner. The thread store loads up to the current inbox set, tracks the selected thread, and supports a separate archived view. The list uses the thread’s last message and status as a quick summary rather than loading the full message history for every row.

The thread page first loads the user, phones, and threads. If the requested thread is not in that list, it fetches the thread directly and aligns the active owner and archive view with that thread before opening the conversation. A missing or invalid thread returns the user to the inbox instead of showing an unrelated message view. web/…/index.vue• L202-255

Thread state

The thread store is the shared client state for the inbox. It holds the visible threads, the selected thread ID, the archive filter, and loading state. It also provides the actions that change thread state: mark a thread read, archive or unarchive it, and delete it. A successful archive or unarchive removes the thread from the current list, while deleting a thread clears the selection and lets the conversation page return to the inbox.

Unread state is part of the thread summary. Opening a thread marks it read, and incoming activity can force the read update so that the list does not keep an old unread marker. web/…/threads.ts• L7-25 web/…/threads.ts• L46-87 web/…/threads.ts• L90-162

The store also preserves contact details when a read update returns only thread fields. This keeps a contact name visible after the user opens a thread or receives new activity. web/…/threads.ts• L27-44

References: web/…/threads.ts• L7-25 web/…/threads.ts• L27-44 web/…/threads.ts• L46-87 web/…/threads.ts• L90-162

Thread list

The thread list turns the thread summaries into a mailbox-like view. A colored avatar identifies the contact, unread threads use stronger text and a count badge, and the latest status gives a fast signal for delivery or receipt. The list routes each row to the conversation detail page and switches to an archived banner when the archive filter is active. When no connected phone exists, it offers the Android app download path instead of an inbox. web/…/MessageThread.vue• L18-61 web/…/MessageThread.vue• L64-120 web/…/MessageThread.vue• L121-209

References: web/…/MessageThread.vue• L18-61 web/…/MessageThread.vue• L64-120 web/…/MessageThread.vue• L121-209

Conversation detail

Conversation detail shows the message history for the selected contact and lets the user continue the exchange. It presents inbound and outbound messages as a time-ordered conversation, includes attachments and missed-call entries, and exposes actions for thread and message management.

The detail view also bridges dashboard actions to live message activity. It reloads the visible history after sends and relevant phone events, marks received activity as read, and keeps the user in the current conversation while the message state changes. Its thread menu can add or edit the contact shown for the conversation.

Message history

The conversation loads the selected thread’s messages and reverses the service result for display in conversation order. The view distinguishes inbound, outbound, and missed-call records, then maps message status to simple visual states such as pending, sent, delivered, failed, or expired. Messages for phones that use the URL notification format render supported WhatsApp-style text such as emphasis, code, quotes, and links as safe rich text. A message menu supports resend for eligible failed or expired outbound messages, copying the message ID, and deletion. web/…/index.vue• L88-133 web/…/index.vue• L176-200 web/…/index.vue• L452-623 web/…/whatsapp-format.ts• L43-200

References: web/…/index.vue• L88-133 web/…/index.vue• L176-200 web/…/index.vue• L452-623 web/…/whatsapp-format.ts• L43-200

Live conversation updates

The detail view listens for message sent, send failed, received, and missed-call events for the signed-in user. These events trigger a history refresh when the page is not already loading; received and missed-call events also force the thread read state. A request ID prevents an older history response from replacing a newer one. web/…/index.vue• L148-200 web/…/index.vue• L331-365

References: web/…/index.vue• L148-200 web/…/index.vue• L331-365

Reply actions

The reply bar sends a single message to the current thread contact through the selected phone. It blocks sending when the contact is not a valid phone number and limits the message to 2048 characters; after a successful request it reloads the history and clears the draft. Thread-level archive, unarchive, and delete actions remain available from the conversation header. web/…/index.vue• L68-73 web/…/index.vue• L257-329 web/…/index.vue• L387-445

The standalone /messages page provides the normal new-message flow. It loads the selected sender phone, accepts a full phone number or a short code, sends the message through that phone, and returns the user to the thread list after success. web/…/index.vue• L19-113 web/…/index.vue• L116-182

References: web/…/index.vue• L68-73 web/…/index.vue• L257-329 web/…/index.vue• L387-445 web/…/index.vue• L19-113 web/…/index.vue• L116-182

Message search is the dashboard’s broad view of stored message activity. The /search-messages page filters by sender phone, message type, delivery status, or message text, then displays server-paged results that can be selected for follow-up actions.

Search uses a short-lived Cloudflare Turnstile token with each search request. It supports a query from the URL, which lets bulk history open the search page already filtered to one upload request. The page keeps filter, page, size, and sort choices together so a table change produces a matching server query.

Search results

The search result table gives a cross-thread view of message identity, time, owner, contact, type, status, and content. It recognizes inbound, outbound, and missed-call records and uses status labels that match the conversation view. Selected records can be exported as CSV, deleted permanently, or resent when every selected record is an expired or failed outbound message. The page adapts its search and action controls to the available screen size while keeping the same result and selection model. web/…/index.vue• L53-126 web/…/index.vue• L128-215 web/…/index.vue• L217-331 web/…/index.vue• L359-666

References: web/…/index.vue• L53-126 web/…/index.vue• L128-215 web/…/index.vue• L217-331 web/…/index.vue• L359-666

Message actions

The messages store is the shared action boundary for sending, searching, and deleting messages. Single sends report the result through the notification store and refresh the thread list so a new message can appear in the inbox. Search passes its filters and paging values to the API while keeping the browser page focused on results; bulk upload has its own page-level request because it also owns file and batch history state. web/…/messages.ts• L16-93 web/…/notifications.ts• L19-44 web/…/index.vue• L49-107

References: web/…/messages.ts• L16-93 web/…/notifications.ts• L19-44 web/…/index.vue• L49-107

Bulk messaging

Bulk messaging gives the user a file-based path for sending one message set to many recipients. The /bulk-messages page accepts the supported CSV or Excel template, submits the upload, and shows the ten most recent bulk orders with counts by delivery state.

Bulk history is connected to search rather than to a second message viewer. Selecting a history row opens /search-messages with the order’s request ID as the query, so the user can move from a batch summary to its individual messages and use the same search actions. For the delivery and scheduling behavior behind the dashboard, see Bulk and scheduled messaging.

Bulk upload flow

The upload flow validates the document through the messaging service and reports document errors in the page as well as a toast. A successful upload clears the selected file and refreshes batch history. The page also points users to phone send schedules because a batch can be queued for later phone delivery. web/…/index.vue• L23-107 web/…/index.vue• L129-204

References: web/…/index.vue• L23-107 web/…/index.vue• L129-204

Bulk history

Each history row summarizes one upload with its request name, creation time, total size, and counts for pending, scheduled, sent, delivered, failed, and expired messages. The request ID is the link between the batch record and the individual messages shown by search. web/…/index.vue• L207-257 web/…/api.ts• L53-72

References: web/…/index.vue• L207-257 web/…/api.ts• L53-72

Dashboard support services

The message pages use small shared services so that authentication, API access, formatting, and user feedback behave consistently. These services do not own the message product rules; they provide the common path through which pages and stores reach the API and explain results to the user.

API access

The API composable creates the dashboard’s authenticated HTTP client. It adds the current Firebase bearer token and, when selected, the user API key to requests; message stores and pages then use the same client for message, thread, phone, and bulk operations. web/…/useApi.ts• L3-45 web/…/auth.ts• L28-53

References: web/…/useApi.ts• L3-45 web/…/auth.ts• L28-53

Display helpers

The filter composable keeps shared display rules in one place. Message screens use it to format phone numbers, timestamps, and status text so the same underlying values read consistently in lists, conversations, and tables. web/…/useFilters.ts• L15-28 web/…/filters.ts• L4-29

References: web/…/useFilters.ts• L15-28 web/…/filters.ts• L4-29

User feedback

The notification store provides one shared transient result for actions such as send, delete, archive, upload, and search recovery. AppToast renders that result across the dashboard, while page-level alerts remain available for field-specific or search-specific errors that need more context. web/…/notifications.ts• L19-44 web/…/AppToast.vue• L1-42

References: web/…/notifications.ts• L19-44 web/…/AppToast.vue• L1-42

The dashboard is the user-facing layer over the wider messaging system. Read Web dashboard for the wider dashboard structure, Messaging platform for the service capabilities behind message activity, Message threads and search for the service-side rules that build thread summaries and serve search results, and Bulk and scheduled messaging for batch and deferred delivery.

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the owner value used by thread loading, message sending, and search phone filters aligned when the active-phone contract changes.
  • Preserve the bulk request ID link between bulk history rows and the search query. A change in either format can make batch drill-down show unrelated results or no results.
  • Keep message status and type labels consistent between the thread list, conversation detail, and search table when API values change.
  • Keep contact field names and import validation aligned between the contact directory, ContactDialog, and the contacts API when contact data changes.
  • Preserve the contacts store's current paging and sort window when a contact mutation refreshes the directory.
  • If live event names or payload scope change, update both the conversation listener and the thread refresh path so incoming activity does not leave stale read or delivery state.
  • If API authentication or search challenge requirements change, update the shared API client and the search request path together.
  • If search result selection or responsive action controls change, keep export, delete, and resend eligibility tied to the same selected message set.
  • If thread update responses stop returning contact details, preserve the store’s fallback so a read change does not remove the contact name from the list.
  • If thread deletion changes its response or list semantics, keep the detail page’s return-to-inbox behavior consistent with the store state.
  • If the standalone new-message request changes its recipient or sender rules, update short-code handling and the selected-phone context together.
  • If URL notification formatting changes, keep the phone token check, supported WhatsApp-style syntax, and safe conversation rendering aligned. The thread preview must also keep links from becoming nested navigation links.

Important failure modes

TriggerConsequenceGuard
No connected phone is availableThe inbox cannot load a sender context and new-message actions are unavailableThe shared list shows the Android app setup prompt and disables phone-dependent controls
The selected phone changes without reloading threadsThe user can see conversations for the prior sender while composing for the new senderThe header updates the user’s active phone and reloads the thread list
A thread ID is stale, invalid, or outside the loaded thread setThe conversation view could use the wrong phone or archive context, or fail to find the threadDetail loading fetches an absent thread, aligns the owner and archive context when needed, and returns to /threads for a missing or invalid thread
Search cannot obtain a valid Turnstile tokenThe server search does not run and the page shows a search errorEach search creates a fresh challenge token and reports the failure in the page alert
A bulk row loses its request ID query linkThe user cannot move from batch totals to the batch’s individual messagesBulk history routes with the order request ID and search treats it as the query
Live message events arrive while a history load is activeA second refresh can race the first and produce confusing loading behaviorThe conversation refreshes only when it is not already loading and ignores stale responses
A user selects records that do not all meet resend rulesThe resend action could mix invalid message types or statesThe page enables resend only when every selected record is an expired or failed outbound message
A contact load finishes after a newer load or a deleteOld data can replace the current contact page or restore a deleted rowThe contacts store uses a load generation and applies results only from the latest request
A contact has no name or phone numberThe record cannot provide the minimum data needed for a recognizable, message-ready contactThe shared form blocks save until a name and at least one phone number are present
A new-message recipient is not a valid phone number or supported short codeThe send request fails and the user stays on the entry pageThe page validates normal numbers and converts a country-prefixed short code before sending
A phone message uses a URL notification token but its text contains unsupported or unsafe formattingThe message can display incorrectly or expose markup behaviorThe formatter escapes source text, protects links and code while applying supported WhatsApp-style syntax, and the detail view checks the phone token before using it

Key files

FileWhy to read it
web/…/default.vueShows how the dashboard chooses the desktop drawer or mobile message layout and starts shared refresh behavior.
web/…/MessageThreadHeader.vueDefines the common phone context and navigation into contacts, new, bulk, and search messaging.
web/…/MessageThread.vueShows how thread summaries become the inbox list and how empty, archived, and no-phone states are presented.
web/…/ContactDialog.vueDefines the shared add and edit form used by the contact directory and thread detail.
web/…/index.vueDefines the thread landing page and its initial data loading.
web/…/index.vueExplains the conversation view, replies, contact actions, message actions, live updates, and URL-backed message formatting.
web/…/whatsapp-format.tsDefines the supported WhatsApp-style text formatting, URL handling, and safe HTML output used by conversation messages and thread previews.
web/…/index.vueShows the standalone single-message entry flow, selected-phone loading, and recipient handling.
web/…/index.vueDefines filtered message search, paging, responsive controls, selection, export, deletion, and resend actions.
web/…/index.vueShows file upload for bulk sends and the link from batch history to individual search results.
web/…/index.vueShows contact search, server paging, import, and contact actions.
web/…/threads.tsOwns shared thread selection, inbox/archive state, read changes, contact display preservation, and thread operations.
web/…/messages.tsOwns shared message send, search, and delete actions.
web/…/contacts.tsOwns contact records, directory paging, search, and contact mutations.
web/…/phones.tsSupplies the active phone context used by the message workspace.
web/…/useApi.tsDefines the shared authenticated API access path.