BlueGit

ict rusty-teams

Files

rusty-teams / README.md

README.md

README.md 6.5 KiB Download Raw

Rusty Teams logo

Rusty Teams

A fast, native Microsoft Teams chat client. Written in Rust, rendered on the GPU. No admin approval needed.

Rust GPUI Platform License: MIT

Features · Quick start · How it works · Roadmap

Rusty Teams with demo data

> [!NOTE] > Unofficial. Not affiliated with or endorsed by Microsoft. It uses the same web APIs as the Teams web app, which can change at any time.

Why

Rusty Teams
🏢 Works in company tenantsNo app registration, no admin consent: it runs on the Teams web app your account may already use
⚡ Starts instantlyRenders from a local SQLite cache before the network answers
🔒 No tokens storedSigns in through a real Teams web page; tokens never leave it
📡 Live, no pollingRealtime socket pushes every change
🔎 Offline searchFull-text index over your chats, Ctrl+K switcher

Features

Chats and channels

  • Teams pin order, chat folders, hidden teams
  • Chat menu: pin, move to folder, mark as unread, mute, hide, leave
  • Read receipts, typing indicator with faces, presence, unread jump
  • Activity bell: new messages, @mentions and reactions, kept for 14 days

Messages

  • Send, edit, delete, react, quote-reply, @mentions
  • Inline images, file cards, link previews
  • Adaptive Cards: layout, links, images, buttons, inputs, task dialogs
  • GIFs and stickers in messages
  • Select and copy message text

Composer

  • Rich text: format bar on selection, Ctrl+B / Ctrl+I / Ctrl+U, lists, quotes, code
  • Markdown converts as you type or paste
  • Picker with Emoji, GIF and Sticker tabs
  • :thumbsup: and :) convert as you type, German aliases included
  • Schedule send: right-click send or Ctrl+Shift+Enter
  • Drafts and unsent messages survive a restart

App

  • Dark theme, opens instantly from the cache
  • Self-update from an update folder
  • Single instance: a second start brings the window to the front

Status

PlatformState
🪟 WindowsMain target. Login through an embedded WebView2
🐧 LinuxConnects to a Chrome started with --remote-debugging-port=9222. Built-in login is planned

Calls, meetings and channel tabs are planned, see ROADMAP.md.

Quick start

Try it with demo data, no account needed:

cargo run -p app -- --demo
TaskCommand
Against Chrome on a debug portcargo run -p app -- --endpoint http://127.0.0.1:9222
Windows exe from WSL/Linuxscripts/build-windows.sh crates/app teams
Testscargo test
Headless screenshot (Xvfb, xdotool, xclip, mesa-vulkan-drivers)cargo build -p app && scripts/headless-shot.sh shot.png -- "mousemove 450 740" "click 1" "type hello"

How it works

Rusty Teams never sees your password and never stores a token. It signs you in through a real Teams web page and lets that page make the API calls.

+--------------------------- Rusty Teams (Rust) ---------------------------+
|  app      GPUI window: sidebar, chat view, composer, Ctrl+K              |
|  core     sync engine, actions, mapping to view models                   |
|  store    SQLite cache + FTS5 search index                               |
|  graph    Microsoft Graph: chats, channels, messages, people, sending    |
|  chatsvc  Teams chat service: realtime, pins, folders, read receipts     |
|  session  runs requests inside the Teams page, one Transport trait       |
+------------------------------------|-------------------------------------+
                                     | DevTools protocol (CDP)
+------------------------------------v-------------------------------------+
|  Hidden browser page on teams.cloud.microsoft, own profile               |
|  webview: WebView2 (Windows)   or   browser: Chrome with a debug port    |
+------------------------------------|-------------------------------------+
                                     | HTTPS with the page's own MSAL tokens
               Graph  |  chat service (ic3)  |  presence  |  Trouter socket

<details> <summary><b>Sign-in and tokens</b></summary>

1. A hidden browser page loads Teams web with its own profile. On Windows this is WebView2, so single sign-on with the Windows account usually just works. 2. If Teams asks for a login, the login window shows itself. After that the page stays parked in the background. 3. Every API call is sent to that page over CDP. A small script (crates/session/assets/fetch.js) picks the matching token from the page's MSAL cache, refreshes it when needed, and runs the fetch. 4. Only the response goes back to Rust. Tokens never leave the page.

</details>

<details> <summary><b>Data flow</b></summary>

StepWhat happens
StartThe UI renders from the SQLite cache right away. A chat still syncing shows a progress line in its header. Skeleton bubbles only when the cache has no messages yet
Synccore fetches chats and channels from Graph with delta queries, pins and folders from the chat service
Livechatsvc keeps the Trouter WebSocket open. An event only says "something changed", the content is then fetched fresh
WriteSends, edits and reactions go out through Graph or the chat service, then the cache updates
SearchLocal FTS5 index over cached messages, no server round trip

</details>

<details> <summary><b>Crates</b></summary>

CrateJob
appGPUI desktop app, binary teams
coreSync engine, actions, people ranking, markdown and card rendering
storeSQLite cache, migrations, search, image file cache
graphTyped Microsoft Graph client with batching and paging
chatsvcTeams chat service: Trouter realtime, pins, folders, receipts
sessionTransport trait, CDP session, in-page fetch
webviewHidden WebView2 host (Windows only)
browserChrome lifecycle and watchdog for the CDP transport
cliteams-probe, a read-only end-to-end check

</details>

Docs

  • ROADMAP.md - open and finished features by priority
  • docs/ - local research notes and mockups, not in git

License

MIT

Source
1<div align="center">
2
3<img src="crates/app/assets/icon/teams-fast-256.png" alt="Rusty Teams logo" width="112">
4
5# Rusty Teams
6
7**A fast, native Microsoft Teams chat client. Written in Rust, rendered on the GPU. No admin approval needed.**
8
9[![Rust](https://img.shields.io/badge/Rust-2024-dea584?logo=rust&logoColor=white)](https://www.rust-lang.org/)
10[![GPUI](https://img.shields.io/badge/UI-GPUI-c4642d)](https://www.gpui.rs/)
11[![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux-3b3b3b)](#status)
12[![License: MIT](https://img.shields.io/badge/license-MIT-2ea043)](LICENSE)
13
14[Features](#features) · [Quick start](#quick-start) · [How it works](#how-it-works) · [Roadmap](ROADMAP.md)
15
16<img src=".github/app-demo.png" alt="Rusty Teams with demo data" width="900">
17
18</div>
19
20> [!NOTE]
21> Unofficial. Not affiliated with or endorsed by Microsoft. It uses the same web APIs as the Teams web app, which can change at any time.
22
23## Why
24
25| | Rusty Teams |
26|---|---|
27| 🏢 Works in company tenants | No app registration, no admin consent: it runs on the Teams web app your account may already use |
28| ⚡ Starts instantly | Renders from a local SQLite cache before the network answers |
29| 🔒 No tokens stored | Signs in through a real Teams web page; tokens never leave it |
30| 📡 Live, no polling | Realtime socket pushes every change |
31| 🔎 Offline search | Full-text index over your chats, `Ctrl+K` switcher |
32
33## Features
34
35**Chats and channels**
36- Teams pin order, chat folders, hidden teams
37- Chat menu: pin, move to folder, mark as unread, mute, hide, leave
38- Read receipts, typing indicator with faces, presence, unread jump
39- Activity bell: new messages, @mentions and reactions, kept for 14 days
40
41**Messages**
42- Send, edit, delete, react, quote-reply, @mentions
43- Inline images, file cards, link previews
44- Adaptive Cards: layout, links, images, buttons, inputs, task dialogs
45- GIFs and stickers in messages
46- Select and copy message text
47
48**Composer**
49- Rich text: format bar on selection, `Ctrl+B` / `Ctrl+I` / `Ctrl+U`, lists, quotes, code
50- Markdown converts as you type or paste
51- Picker with Emoji, GIF and Sticker tabs
52- `:thumbsup:` and `:)` convert as you type, German aliases included
53- Schedule send: right-click send or `Ctrl+Shift+Enter`
54- Drafts and unsent messages survive a restart
55
56**App**
57- Dark theme, opens instantly from the cache
58- Self-update from an update folder
59- Single instance: a second start brings the window to the front
60
61## Status
62
63| Platform | State |
64|---|---|
65| 🪟 Windows | Main target. Login through an embedded WebView2 |
66| 🐧 Linux | Connects to a Chrome started with `--remote-debugging-port=9222`. Built-in login is planned |
67
68Calls, meetings and channel tabs are planned, see [ROADMAP.md](ROADMAP.md).
69
70## Quick start
71
72Try it with demo data, no account needed:
73
74```bash
75cargo run -p app -- --demo
76```
77
78| Task | Command |
79|---|---|
80| Against Chrome on a debug port | `cargo run -p app -- --endpoint http://127.0.0.1:9222` |
81| Windows exe from WSL/Linux | `scripts/build-windows.sh crates/app teams` |
82| Tests | `cargo test` |
83| Headless screenshot (Xvfb, xdotool, xclip, mesa-vulkan-drivers) | `cargo build -p app && scripts/headless-shot.sh shot.png -- "mousemove 450 740" "click 1" "type hello"` |
84
85## How it works
86
87Rusty Teams never sees your password and never stores a token.
88It signs you in through a real Teams web page and lets that page make the API calls.
89
90```
91+--------------------------- Rusty Teams (Rust) ---------------------------+
92| app GPUI window: sidebar, chat view, composer, Ctrl+K |
93| core sync engine, actions, mapping to view models |
94| store SQLite cache + FTS5 search index |
95| graph Microsoft Graph: chats, channels, messages, people, sending |
96| chatsvc Teams chat service: realtime, pins, folders, read receipts |
97| session runs requests inside the Teams page, one Transport trait |
98+------------------------------------|-------------------------------------+
99 | DevTools protocol (CDP)
100+------------------------------------v-------------------------------------+
101| Hidden browser page on teams.cloud.microsoft, own profile |
102| webview: WebView2 (Windows) or browser: Chrome with a debug port |
103+------------------------------------|-------------------------------------+
104 | HTTPS with the page's own MSAL tokens
105 Graph | chat service (ic3) | presence | Trouter socket
106```
107
108<details>
109<summary><b>Sign-in and tokens</b></summary>
110
1111. A hidden browser page loads Teams web with its own profile. On Windows this is WebView2, so single sign-on with the Windows account usually just works.
1122. If Teams asks for a login, the login window shows itself. After that the page stays parked in the background.
1133. Every API call is sent to that page over CDP. A small script (`crates/session/assets/fetch.js`) picks the matching token from the page's MSAL cache, refreshes it when needed, and runs the `fetch`.
1144. Only the response goes back to Rust. Tokens never leave the page.
115
116</details>
117
118<details>
119<summary><b>Data flow</b></summary>
120
121| Step | What happens |
122|---|---|
123| Start | The UI renders from the SQLite cache right away. A chat still syncing shows a progress line in its header. Skeleton bubbles only when the cache has no messages yet |
124| Sync | `core` fetches chats and channels from Graph with delta queries, pins and folders from the chat service |
125| Live | `chatsvc` keeps the Trouter WebSocket open. An event only says "something changed", the content is then fetched fresh |
126| Write | Sends, edits and reactions go out through Graph or the chat service, then the cache updates |
127| Search | Local FTS5 index over cached messages, no server round trip |
128
129</details>
130
131<details>
132<summary><b>Crates</b></summary>
133
134| Crate | Job |
135|---|---|
136| `app` | GPUI desktop app, binary `teams` |
137| `core` | Sync engine, actions, people ranking, markdown and card rendering |
138| `store` | SQLite cache, migrations, search, image file cache |
139| `graph` | Typed Microsoft Graph client with batching and paging |
140| `chatsvc` | Teams chat service: Trouter realtime, pins, folders, receipts |
141| `session` | `Transport` trait, CDP session, in-page fetch |
142| `webview` | Hidden WebView2 host (Windows only) |
143| `browser` | Chrome lifecycle and watchdog for the CDP transport |
144| `cli` | `teams-probe`, a read-only end-to-end check |
145
146</details>
147
148## Docs
149
150- [ROADMAP.md](ROADMAP.md) - open and finished features by priority
151- `docs/` - local research notes and mockups, not in git
152
153## License
154
155[MIT](LICENSE)