Skip to content
hbenaliPublic

About

Fast, modern Matrix client for Synapse (Svelte 5)

Topics

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Tessera

CI License: MIT

A fast, private, workspace-style Matrix client for Synapse and any other homeserver. It runs entirely in the browser and installs as a PWA. Built with Svelte 5, Vite and TypeScript on matrix-js-sdk, with the Rust crypto module for end-to-end encryption.

Live: https://tessera.hbenali.ovh (sign in with your own homeserver; nothing is stored on the server that hosts the app).

Screenshots

A room in the dark theme: sidebar with unread badges, a reply, code, a poll, reactions and a mention

Light, Cards layout Ocean, Aligned bubbles
Light theme with the Cards layout Ocean theme with the Aligned bubbles layout
Themes and layouts in Settings On a phone: rooms On a phone: a room
Settings, Appearance tab: language, eight themes and four room layouts Room list on a phone A room on a phone

The screenshots show a throwaway Synapse with made-up users.

Why

  • Fast and light. The sign-in page is about 32 KiB; the Matrix SDK and crypto WASM load only after you sign in. Long rooms use CSS content-visibility.
  • Workspace feel. One menu switches between views (All, Unread, Mentions, Favourites, People, Rooms) and spaces; threads in a side panel, pinned messages, per-room notification levels, a Ctrl K switcher.
  • Quick to appear. A splash is in the first HTML, then an app-shaped skeleton and a thin sync bar instead of a blank "Loading…", and the app shell downloads alongside the Matrix SDK rather than after it.
  • Simple. One list of conversations with previews, unread filters and no settings maze.
  • Eight themes, including a high-contrast one, chosen from Settings.

What works

  • Sign in: password, or single sign-on when the homeserver offers it. Bare domains resolve through .well-known; the form starts on matrix.org.
  • Room list: ordered by the latest real message (not state changes), favourites on top and low-priority rooms last, with a choice of latest activity, attention first (mentions, then unread) or A to Z; each row previews the last message (sender named in rooms, not in direct chats, reply quotes hidden, photos, videos, voice messages, files, polls and actions described) and shows an unsent draft in red.
  • Moderation and room settings: click any member for a profile card with their role (Member, Moderator, Admin; you can only grant what you hold), Remove and Ban with a reason, and Ignore; banned people are listed with Unban; who can join (invite only, ask to join, public), who can read the history, turning on encryption (with a warning, it is permanent), and Report room to your server's administrators. Every control follows the room's power levels and is disabled or hidden when you may not use it.
  • Rich text and sharing: paste formatted text from a document, web page or email and it keeps its paragraphs, bulleted and numbered lists (nested too), bold, italic, strikethrough, links and tables (merged cells become empty ones, line breaks inside a cell are kept); pictures in the pasted content are attached after the message, in order, and one that cannot be fetched or is over the server's size limit is left out with a warning. Text from a code editor or a terminal is pasted exactly as it is. Quotes, inline code, code blocks (a long line scrolls sideways), lists and tables are shown in the conversation; the room list, notifications and search show a message as plain text on one line. The Code button makes inline code from a one-line selection, a code block from several lines, or an empty block. Messages with formatting also carry a standard formatted_body, and a formatted message from another app is shown from it after a strict allow-list (no colours, fonts, images, frames, scripts or titles). Copy text puts both the formatted and the plain text on the clipboard. Share opens a drawer with the 5 most recent conversations or a search over all of them, an optional comment, and sends the comment then the message with "Shared from " above it (formatting and attachments kept, the original conversation never named). Tables, code blocks and lists are reachable and scrollable with the keyboard. Merged table cells and complex cell content are flattened because Markdown tables cannot express them.
  • More message actions: a ⋯ button on every message: Copy text (with its formatting), Share to a conversation (see below), View source (the event JSON, with the clear content of an encrypted one), Report to your homeserver's administrators, and, for moderators, Remove for everyone with a reason.
  • Named sessions: a new sign-in, sign-up or single sign-on session is called Tessera (Chrome on Linux) (your browser and system), so you can tell it apart in the session list of any Matrix client.
  • Sessions and account: a Sessions tab lists every signed-in device (this one first, with last seen, verified and inactive marks), renames them and signs out one, several or all inactive ones (asking for your password when the server requires it); export and import room keys as an Element-compatible passphrase-protected file; change password, remove an email or phone, and deactivate the account.
  • Link previews: a small card (title, description, picture) for the first link in a message, built by your homeserver. Never in encrypted rooms, never for private addresses, and switchable in Privacy.
  • Shared media: a picture button in the room header opens Photos, Files and Links of the room, newest first and grouped by month, loading further back as you scroll. A photo opens in the viewer, which has a strip of every photo in the room along the bottom to jump between them (or use the arrow keys).
  • Export a conversation: Room menu, Export as image saves the whole room, or from one message to another (⋯ on a message: Export from here, Export up to here), as PNG, PDF or CSV. The picture looks like the chat: header, avatars, the room's layout, formatted text, replies, reactions and pictures, in the app's colours or fixed light or dark; a flag prints the Markdown source instead. It only reads history, so no read receipt or notification is sent.
  • Jump to: a clock button in the room header goes to the first unread message or to the start of a chosen day (it pages back through history to get there).
  • Discovery and spaces: an Explore tab searches the public room directory (add @ other.server to search another server's), joins open rooms and asks to join rooms that need approval, with a reason; create a space and add or remove a room from a space in its details.
  • Sign-up: Create an account on homeservers that allow it with nothing or a registration token; if the server needs an email address, captcha or terms it says so and you create the account on its own site.
  • Polls, location, stickers: create a poll (several answers or one, results hidden until it ends if you like) that others vote in and the author ends; share your location as a standard location message with a map link (no map tiles are loaded until you click); stickers from other clients are shown.
  • Mark as read and unread: per room from its menu (Mark as read, or Mark as unread, which flags it with a dot and lists it under Unread, shared with other clients; opening the room clears it), and Mark all as read for everything in the current view from the view menu.
  • Notification keywords, low priority, density: words that notify you in any room (standard content push rules, so other clients agree); Low priority in the room menu sinks a room to the bottom of the list (standard m.lowpriority tag); comfortable or compact messages and three text sizes in Appearance.
  • Languages: English, French, Spanish and German, chosen from Settings or the browser's language. Every screen, menu, setting and message the app writes itself is translated (about 900 strings per language; a missing translation falls back to English, and a test keeps the three catalogs in step). Text that comes from your homeserver or the Matrix SDK, and the text drawn into exported images, stays as it was written. The translations are machine-written and have not been reviewed by native speakers.
  • Calls: voice and video calls in direct chats, over the standard m.call.* events (so they work with Element and other clients that still support them): ring, answer with or without video, decline, mute, camera off, a call timer, and a plain-language reason when a call fails. Tested between two real Chrome sessions with a fake camera and microphone on one machine; not tested over a network that needs a TURN server, with real devices, or with another client.
  • Share into Tessera: once installed, Tessera appears in the system share sheet for text, links and files (up to 10, 100 MB each): pick a conversation and the text waits in its message box and the files in its attachment tray. Files wait in IndexedDB, put there by the service worker, until you pick a room or cancel.
  • matrix.to and matrix: links: https://matrix.to/#/#room:server, …/#/!id:server/$event?via=server and …/#/@person:server, matrix:r/alias:server, matrix:roomid/…[/e/event] and matrix:u/user:server (and web+matrix:) open in Tessera: put Tessera's address in place of matrix.to (https://tessera.example/#/#extensions:gnome.org), click a matrix.to link in a message (Ctrl or middle click still opens a tab), paste one into Join a room, or open a matrix: link once installed. A room you are in opens (at the message, for a message link); one you are not in shows its address and a Join room button that joins through the link's via servers; a person is filled into the direct message box for you to confirm. With several accounts the link opens in the one that is in the room, and Tessera asks which account to use when none or several others are. A link never creates or joins anything by itself, a link waits through signing in, and a malformed one does nothing.
  • Notification actions: Reply (in readable rooms; the worker cannot encrypt), then your first quick reply (one tap sends a short text you set in Settings, "OK", "Thanks" and "On my way" to start with, as a reply to the message), Mark as read (a private receipt, so it clears your unread count without telling anyone; it works for encrypted rooms too) and Like, then your other quick replies. A browser shows as many as it has room for, often two, so on a phone you get Reply and your first quick reply. Reply needs a browser that supports text actions, otherwise it opens the room. The small status-bar icon on Android is a dedicated white four-tile shape, so it no longer shows as a blank square.
  • Installing on iPhone, iPad and Mac Safari: Settings → Notifications → App explains Share → Add to Home Screen (or Add to Dock), since Safari has no install button.
  • Bridged rooms: details say when a room mirrors another network (Slack, IRC, and so on), from the room's m.bridge state.
  • See which devices get notifications: Settings, Notifications lists every browser or phone that has background notifications on for your account (this browser tagged, each with its push service), flags one set up for another gateway, and lets you remove the others.
  • Export and import your settings: Settings, Appearance, My settings saves the settings of this browser (theme, default layout, density and text size, language, room list display, sort order, sound, advanced search) as a small JSON file and loads them from one, for example on another device. An import shows what it will change before you apply it. Only these settings are ever read from a file: a session, an account or anything unknown is ignored and named, and accounts, keys and messages are never exported.
  • A room list that is yours: a sliders button in the list's header opens List display: drag the edge (or use the arrow keys) to resize it, Compact, Comfortable or Large rows, avatar size, message previews on or off, Favourites, People, Rooms and Low priority headings you can fold (a folded heading still shows its unread count), unread as a number or a dot (a mention keeps its number), status icons on or off, and an icons-only strip of avatars. Saved per browser; a phone always gets the full list. Ctrl+\ hides the list altogether.
  • Several accounts, on one server or many: add as many accounts as you like from the status menu, on any mix of homeservers and with several people on the same one; each keeps its own rooms, keys, drafts and last room. The open account switches in place without reloading the page, and the others stay connected in the background while Tessera is open: the status menu shows each one's unread count (a dot on your name says there is something), the tab title and app badge count them too, and a new message to another account shows a desktop notification that opens it there. Background accounts are read from /notifications rather than a second sync, so they never take the room keys meant for their own session; their counts are the server's notification counts, so muted rooms do not count. A server that ends one of those sessions removes it here. Signing out of one carries on with the next.
  • Long rooms: past 200 messages the timeline draws only the rows near the screen, with spacers for the rest, so a room of thousands of messages stays light; shorter rooms are drawn whole as before. Tested at 600 messages; not yet measured at tens of thousands.
  • Phones: the layout is checked at 390px wide for every dialog, menu and panel (nothing clipped, no sideways scroll); tapping a message shows its toolbar (there is no hover), call buttons sit in the room menu to leave the title room, and a reload paints the rooms you had a moment ago while the app loads (without the text of encrypted rooms).
  • Room themes: four message layouts (Classic, Aligned bubbles, Cards, and one-line IRC-style Lines) and eight room accents. Pick a default in Settings → Appearance and override it per room in the room's details; a room's choice is kept in its account data (ovh.hbenali.tessera.room) so it follows you to other devices. Lines needs width, so a phone shows Classic. A browser test draws every layout at 320, 390, 768, 1024, 1280 and 1920px with awkward content (a 200-character word, code, a long link, polls, files, images) and checks nothing is cut off or scrolls sideways.
  • Installed-app touches: the unread count on the app icon (rooms that notify you, invitations and rooms you flagged unread; muted rooms do not count), long-press shortcuts for Search, New message and Unread, a focus-the-open-window launch handler, install screenshots, and a browser bar that takes the colour of the chosen theme. The badge needs a browser that supports the Badging API (Chrome and Edge, installed).
  • Offline: the installed app starts with no network (the service worker keeps the app's scripts and styles, and the encryption module in the background), shows your rooms and recent messages from the local cache, and says you are offline. A message written offline waits as "Not sent" and is sent by itself, oldest first, when the connection returns; Retry and Delete still work. Before this, an offline reload was a blank page.
  • Conversations: a room menu (right-click, the more button or Shift+F10) with mark as read, mute, mentions only, favourite, copy link, details and leave; room list with avatars, previews, times, unread badges, muted and favourite markers, and animated typing; views and spaces from one menu; invitations; direct messages with user-directory search; join by address; leave; edit a room's name, topic and photo.
  • Privacy: switches for sending typing notifications and read receipts (off sends private receipts, so your own unread count still clears), plus per-room quiet reading below.
  • Do not disturb: from your name in the sidebar for 30 minutes to until you turn it off, or recurring quiet hours on chosen days (overnight windows work). Optional automatic reply to anyone who mentions you, with your own text and the end time filled in; it is sent as a notice, once per room every 6 hours, and only while Tessera is open somewhere. Background pushes during quiet hours arrive silently because browsers require every push to show something.
  • About: version, build, session and server details, a device fingerprint, update check and a copy-for-bug-report button (no secrets).
  • Quiet reading: per room (room menu or details), read without showing anyone that you have. It sends a private read receipt, so your own unread count and other devices still update. Replying in the room still shows you were there.
  • Presence: online and away dots on avatars, your own status (Online, Away, Invisible) from the sidebar, and your own avatar and name, which you can change in Settings.
  • Voice messages: a mic button records (a live meter and timer, Esc to cancel, Enter to send, up to ten minutes) and sends a standard voice message other clients can play; received voice and audio messages, including those from Element, play in an inline player with a waveform, seeking and 1×/1.5×/2× speed.
  • Composer: files wait in a tray with previews and upload progress until you send (several at once, by button, paste or drag and drop, with a drop target), a failed upload keeps its file and your text, formatting buttons and shortcuts (Ctrl+B, Ctrl+I, Ctrl+E, quote), :emoji: shortcodes, and slash commands: /invite (by id, short name or display name, with suggestions), /me, /shrug. A mistyped command is never sent to the room, and // sends a literal slash.
  • File attachments: a received file (or video) is a card with its name, type and size and a Download button that saves the original, decrypting it first in an encrypted room; the info button shows the exact size, MIME type, who sent it and when, and whether it is encrypted. A name from another person is made safe before saving (no paths, control characters or disguised extensions), and a file is only ever saved, never opened. Captions are shown under the file.
  • Encrypted attachments: in an encrypted room every file, image and voice message is encrypted in the browser before upload (the Matrix v2 attachment format: AES-256-CTR plus a SHA-256 check), so the homeserver only holds ciphertext, and received encrypted attachments are checked and decrypted.
  • Images: click one to open a viewer with zoom (buttons, wheel, double-click, pinch, drag to pan), previous and next through the room's images, and a download button that saves the original file. A picture's space is reserved from the size its message gives (Tessera now sends that size too), filled with its blurred preview (blurhash) until it arrives, so the chat does not jump. Tessera attaches one to the pictures and videos it sends too, so other apps show a preview of yours.
  • Videos: play in the chat, from their poster frame, with the usual controls. In an unencrypted room they stream (the service worker adds the access token a bare video element cannot send, and passes the player's byte ranges on), so a long video starts at once; in an encrypted room they are downloaded and decrypted on the device. A video you send goes out as a video with its size, length and a poster frame (encrypted in an encrypted room), so it plays in other apps too. A video that must be downloaded first (encrypted, or no service worker yet) and is over 200 MB, or one in a format the browser cannot play, stays a file to download.
  • Spoilers: a spoiler from Element or another app is a solid block until you press it (with the keyboard too; a link inside is not followed until it is shown), with its reason written on it. /spoiler text sends one; its text is kept out of the plain body, so it does not show in notifications or in apps without spoilers. A spoiler message you sent is edited as you typed it, and stays a spoiler.
  • Saved messages: Save message in a message's ⋯ menu; the bookmark button at the bottom of the room list (or the status menu) lists them from every room, with search, and opens one where it was said. The list follows you between devices through your account data, which holds only room and message ids, never text, since account data is not end-to-end encrypted.
  • Reminders: Remind me… in a message's ⋯ menu: in an hour, this evening, tomorrow morning, next week, or a time you pick. The message shows a clock mark with the time, and the Saved messages panel lists the reminders waiting. When one is due, whichever Tessera you have open shows a card (and a notification if allowed) that opens the message; one that came due while none was open shows at the next start. Reminders sync like saved messages, ids and a time only.
  • New messages: opening a room with unread messages draws a line before the first one, and a bar ("14 new messages since 18:40 · Jump to first") takes you up to it while it is out of sight.
  • Code blocks: coloured by language (the language written after the opening fence is sent too, as other apps do), with a Copy button; the colouring is done in the browser from the text alone, so a message cannot inject markup through it.
  • Messages: sending, sent and seen marks on your messages, with each reader's avatar at the message they have read up to (click for everyone and when; "Seen 10:32" in direct chats), and your own avatar, set apart, where you have read up to on this or another device (Settings → Appearance turns it off); a message that arrives in the room you are looking at is marked read at once; labelled hover actions; hover a reaction to see who reacted (click your own to take it back); Copy link on any message; Markdown subset (escaped first, so safe by construction), replies, edits, deletes, reactions with an emoji picker, image and file upload (also by paste or drag and drop), typing indicators, day dividers, history on scroll, "Seen" receipts, per-room drafts (kept across a reload only in unencrypted rooms, never written to disk for encrypted ones).
  • Joins, leaves and name changes: never move a room up the list (a person changing their name, or a look-alike one, does not make a room look active). They are hidden in the timeline by default; Settings → Appearance → "Show joins, leaves and name changes in the timeline" shows them as small system lines, including avatar changes.
  • Sound: a quiet sound when a message arrives (Chime, Blip or Pop, with a longer rise for a mention), off with one switch. It follows your notification settings: muted rooms are silent, mentions-only rooms sound only for a mention, and do not disturb and quiet hours silence it. One sound covers a burst (at most one every 8 seconds, 3 for a mention) and a busy room sounds at most once a minute.
  • Mentions from other clients: people mentioned by link (Element and others write the name, with the Matrix id only in formatted_body or m.mentions) are drawn as pills too.
  • Mentions: @ autocomplete with presence, a mentioned person shown as a pill in the message box (the name is shown, the Matrix id is what is sent), mention pills with a colour dot (a stronger pill when it is you), a profile card from any pill or sender name (message, mention, copy ID), highlighted messages, and structured m.mentions so people are notified reliably.
  • Search in a room: a header button (or Ctrl+Shift+F) opens a simple search of the room; Advanced adds who sent it, a date range, link, image or file, and mentions of you.
  • Threads, pins and search: reply in a thread with live updates; pin and unpin messages with a pin bar; Ctrl K searches rooms, the homeserver's index for older messages, and what is loaded on the device (the only way to search inside encrypted rooms).
  • Links: Tessera reopens the room you had open last time; the open room is in the address bar (#/room/<id>), so reload, Back and Forward work and a message link opens at that message.
  • End-to-end encryption: encrypted rooms and DMs, cross-signing, secret storage and key backup, restore from a recovery key, verification by QR code (show, scan with the camera or from a screenshot) or by emoji.
  • Notifications: desktop notifications that follow your push rules, an unread count and the open room's name in the tab title, and a per-room level (all, mentions, mute) stored as standard push rules so other clients agree.
  • Installable: web app manifest with a maskable icon, an offline-shell service worker, an Install button in Settings and a "new version ready" prompt.
  • Background notifications: optional web push through a Sygnal gateway you run, so you are notified with the app closed, with a picture that combines the room and the sender (the room's picture with the sender as a small round badge, or the sender alone in a direct chat) and a 👍 Like button. See docs/push.md.

Not yet

Group calls (Element Call / MatrixRTC), GIF search and custom emoji packs (both need a third-party service or an unstable spec), and search inside encrypted rooms beyond what the device has loaded.

Known gaps in what has been verified: voice recording was tested with Chrome's fake microphone, not a real one, and the nginx changes for the microphone and audio playback (security-headers.conf) were not tested with a Docker build; single sign-on was only exercised against a stand-in identity provider, not a real one; QR scanning was tested with a screenshot of the code between two sessions, not a live camera; desktop notification pop-ups were not exercised (the unread count was); and accessibility has been checked with automated tools only (see below).

Accessibility

axe-core (WCAG 2.1 A and AA) reports no violations in each theme (System follows dark or light) across the room, details, thread, pin and settings views, and this runs in CI. Lighthouse scores 100 for Performance, Accessibility and Best Practices on the sign-in page. Automated tools cannot show RGAA or WCAG conformity on their own: a manual keyboard and screen-reader review is still needed.

Develop

cd app
npm install
npm run dev      # http://localhost:5173
npm run check    # svelte-check + tsc
npm test         # vitest
npm run build
npm run e2e      # real Chrome against a local Synapse (see below)

For local testing, run a Synapse (matrixdotorg/synapse) with the rc_* rate limits relaxed.

Browser tests

npm run e2e drives the installed Google Chrome (via playwright-core; nothing is downloaded) against the production build, served with vite preview. Each run creates two throwaway users and a seeded room (mentions, an image, a reaction, 45 older messages), then checks the things that broke before: the composer staying on screen, scrolling from the top of a long room, the hover toolbar and emoji picker not being clipped, avatars and authenticated images loading, mention pills, pins, receipts, drafts, paste, per-room notification push rules, a phone-sized screen, no SDK in the sign-in bundle, and axe in every theme. CI runs it against a throwaway Synapse on every push.

npm run build
SYNAPSE_URL=http://localhost:8008 \
SYNAPSE_REGISTRATION_SECRET=...   \  # registration_shared_secret from homeserver.yaml; omit if registration is open
npm run e2e

Set TESSERA_URL to test an already running instance instead of vite preview.

Deploy

Docker (recommended). Unprivileged nginx serving the static build with a strict Content Security Policy and security headers:

docker build -t tessera .
docker run -p 8080:8080 tessera

GitHub Pages. .github/workflows/pages.yml builds and deploys on every push to main; app/public/CNAME holds the custom domain. Pages cannot send response headers, so that build embeds the Content-Security-Policy as a <meta> tag instead (the browser suite passes under it). One difference: frame-ancestors cannot be set from a meta tag, so a Pages deployment can be framed by other sites. Prefer the Docker image if that matters to you.

Either way the app holds no secrets or state: the browser talks to your homeserver directly, so the homeserver must allow the origin where Tessera is hosted (Synapse does by default).

Releases

Releases are signed tags (git tag -v 0.1). A tag builds the app from that exact commit, runs the checks and attaches the static build (tessera-X.Y.tar.gz, with its .sha256) to a draft release, which is then published with notes by hand. The tarball is the same files the Docker image and GitHub Pages serve: unpack it behind any web server that sends the headers in security-headers.conf.

Security

See SECURITY.md to report a vulnerability. Messages are rendered with an escaping Markdown renderer covered by XSS regression tests; the session, including the access token (and those of any other saved account), is kept in the browser's localStorage and is only sent to your homeserver (so an XSS bug would be serious, which is why the CSP is strict).

License

MIT.

About

Fast, modern Matrix client for Synapse (Svelte 5)

Topics

Resources

Code of conduct

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages