.overlayed directory - and gives you a checkpoint at each
step so you know it worked before moving on.
What an Overlayed App Is
Four facts frame everything below:- It’s your Electron app with Overlayed inside. There is no scaffolding command and no framework to adopt - you
start from a plain Electron project, install
@overlayed/app, and calloverlayed()once at startup. That call returns theoverlayobject the rest of your code uses. - Your UI is a website, not local files. The Electron side creates windows and loads your frontend from a URL - a
local dev server while developing,
https://your-site.overlayedapps.comin production. Neverfile://. - It runs on a custom Electron build.
@overlayed/electronprovides theogg-electroncommand - use it anywhere you would normally runelectron. Your imports (app,BrowserWindow, etc.) still come fromelectronas usual. - Local development is tied to a registered application.
overlayed()requires anapplicationIdfrom the Overlayed Dashboard, and the CLI caches your app’s metadata locally in a.overlayeddirectory before the app can start.
From Empty Folder to Overlay Window
Create a bare Electron project
package.json that runs the app through
ogg-electron, and a tsconfig.json that compiles src/ to dist/.Install the Overlayed packages
@overlayed/app- the runtime: theoverlayed()function and everything on theoverlayobject.@overlayed/electron- the custom Electron build and theogg-electroncommand yourstartscript uses.@overlayed/cli- theoverlayedcommand used for authentication, initialization, and later bundling.
Authenticate with the platform
overlayed whoami prints the email you’re logged in as.Add the two config files
src/overlayed.ts is your app’s runtime setup - it
calls overlayed() and exports the overlay object everything else imports. overlayed.config.ts at the
project root is read by the CLI for overlayed init and, later, bundling.applicationIdcomes from the Overlayed Dashboard and must be the same in both files.modulessubscribes you to specific game events (in this example, Rainbow Six Siege). Alternatively passuniversal: trueto react to every supported game. See OverlayedOptions for every option.keybindsis required; this one is a placeholder you can wire to a window later - see Show/Hide Window Keybinds.
Initialize the dev environment
applicationId from overlayed.config.ts, fetches your application’s metadata from the API, and
caches it in .overlayed/meta.json. Your app reads that cache at startup during development.Add .overlayed to your .gitignore - it’s fetched data, not source. Details in
Local Development.Create the entry point and a window
overlay.windows, but they return the BrowserWindow that you’re
used to.- Desktop window (no game needed)
- In-game window (game required)
createWindow returns a regular Electron BrowserWindow,
so it appears on your desktop immediately - no game required.Run it
overlayed init, the very first run behaves differently: Overlayed detects the missing
.overlayed cache, fetches and caches the metadata itself, then exits on purpose with a message explaining
why. Just run the start script again - this only ever happens once, and never in a packaged app.Checkpoint: the app stays running and your window appears (on the desktop, or in-game once your subscribed
game is ready). That’s your first Overlayed app.Loading Your UI the Right Way
The URL you pass toloadURL should differ between development and production. In development, load your local
frontend dev server; in production, load the site URL Overlayed deployed for you:
FAQ
Is there a command that scaffolds a project for me?
Is there a command that scaffolds a project for me?
login, logout, whoami, init, and bundle - none generate a project. Start
from any Electron project (the Electron quick start
works) or clone a completed example app.Do I need a game installed to develop?
Do I need a game installed to develop?
createWindow), keybind config, logging, and your frontend all work
without a game. You need a subscribed, running game only for the in-game pieces: gameReady,
createInGameWindow, and game events. See the
supported games list.Why did my app exit immediately the first time I ran it?
Why did my app exit immediately the first time I ran it?
.overlayed/meta.json, the app fetches your application
metadata, caches it, and exits so the next run can load the cache - run it again and it starts normally. If it
exits with “Failed to fetch application metadata” instead, run overlayed login first, then overlayed init.Why do I need both overlayed.ts and overlayed.config.ts?
Why do I need both overlayed.ts and overlayed.config.ts?
overlayed() in src/overlayed.ts configures your app at runtime (modules,
keybinds, flags). overlayed.config.ts is read by the CLI - overlayed init takes the applicationId from it,
and overlayed bundle uses its include globs when you deploy. Keep the
applicationId identical in both.Can I call overlayed() in more than one file?
Can I call overlayed() in more than one file?
src/overlayed.ts that exports overlay, and every other file imports from there.Can I use JavaScript instead of TypeScript?
Can I use JavaScript instead of TypeScript?
My window doesn't show up in-game - what do I check?
My window doesn't show up in-game - what do I check?
- Subscription:
gameReadyonly fires for games passed viamodules(or withuniversal: true). - Timing: for freshly launched games there’s a deliberate delay before injection -
gameReadydoes not fire the instant the game starts. inGameRenderingSupported: when it’sfalsefor the session, in-game rendering isn’t available and you should fall back to a desktop window.
I get 'Could not find overlayed instance' in the renderer
I get 'Could not find overlayed instance' in the renderer
@overlayed/app/preload. See the troubleshooting section in
Local Development.What's left before other people can use my app?
What's left before other people can use my app?
include globs in overlayed.config.ts, run overlayed bundle to upload an app bundle and a site
bundle, and create a release for each in the dashboard. Understanding Bundles
covers the whole pipeline.
