Architecture
How the loader, the client, addons and unbound.rip fit together.
Unbound runs in four layers inside the stock Discord app. GitHub Actions build it and unbound.rip serves it.
Full Diagram
Every part of the loader, client and server, plus what happens at launch. Click either diagram to open it on Excalidraw, where you can zoom and pan.
Layers
| Layer | Lives in | What it does |
|---|---|---|
| Addons | Users' devices | Plugins, themes, icon packs and fonts, built against @unbound-app/api. See Concepts. |
| Unbound client | packages/client | Finds Discord's modules through Metro, patches them, and starts and stops addons. See Metro. |
| Discord | The stock app | Its module registry, React Native UI, Flux stores and native views. It stays unmodified on disk. |
| Native loader | packages/loader | Runs Unbound's bundle before Discord's, updates it, guards against crashes, and backs the native bridge. See The Loader. |
At Launch
- LoaderReads settings.json, scans addon folders, runs the signed bundle before Discord's
- ClientTraps Metro so every Discord module is searchable
- Built-insUnbound's own features start
- AddonsEach manager starts its addons
- DiscordRenders with every patch applied
If an addon crashes or freezes Discord, Unbound blames the addon whose code was running and disables it, so Discord keeps working.