Discord Activities
Discord Activities are interactive web applications that run directly inside Discord. They load within an embedded panel (iframe) in voice channels, text channels, and DMs, giving users a shared experience without leaving the app. Under the hood, activities are standard web apps built with HTML, CSS, and JavaScript — connected to Discord through the Embedded App SDK.
Robo.js brings a streamlined developer experience to activity development. Instead of wiring up separate frontend and backend projects, you get a unified project structure where your React (or vanilla) UI and API routes live side by side.
Built-in Cloudflare Tunnels (a secure connection that lets Discord reach your local computer) give you an HTTPS URL for testing instantly, and the @robojs/patch plugin handles Discord's proxy requirements automatically — no manual network patching needed.
The mental model is straightforward: your activity has a frontend (Vite — a fast build tool for web projects — powered UI in src/app/), a backend (file-based API routes in src/api/), and the Discord SDK connecting them to the platform. Robo.js ties these pieces together, adds a plugin ecosystem for features like real-time multiplayer and authentication, and handles the build tooling so you can focus on your app.
A Discord voice channel with an embedded activity running inside the panel, showing a custom web application rendered alongside the voice call participants
Quick Start
Create a new activity project:
npx create-robo@next my-activitySelect the activity kit when prompted. The CLI generates a project with frontend, backend, and Vite preconfigured.
Terminal output showing a new Robo.js activity project being created with the create-robo CLI, displaying scaffolding prompts and file generation
What Robo.js Provides
| Feature | Description |
|---|---|
| Unified project | Frontend and backend in a single project |
| Vite integration | Preconfigured Vite for fast development and builds |
| Built-in tunnels | Free Cloudflare tunnels for local testing |
| Proxy patching | @robojs/patch handles Discord's proxy requirements |
| Authentication helpers | OAuth2 token exchange with minimal setup |
| API routes | File-based HTTP endpoints via @robojs/server |
| Real-time sync | Multiplayer state synchronization with @robojs/sync |
| TypeScript support | TypeScript works out of the box |
| Plugin ecosystem | Extend functionality with installable plugins |
Recommended Learning Path
- Quick Start — Create and run your first activity
- Credentials — Set up environment variables
- Developer Portal — Configure your Discord application
- Tunnels — Understand how tunnels connect Discord to your machine
- Frontend — Build the UI
- Backend — Add server-side logic and API routes
- SDK — Interact with Discord APIs from your activity
- Multiplayer — Add real-time features
