Presence Structure
Understand the required folder layout for a Nowly presence.
Folder Layout
A presence lives under src, grouped by the first letter of its name:
TXTsrc/Y/YouTube/
|-- metadata.json
|-- presence.ts
|-- settings.ts
`-- assets/
|-- logo.png
|-- icon.png
`-- thumbnail.jpgmetadata.json
metadata.json describes the platform, supported URLs, author, category, localized descriptions, marketplace assets, and optional flags such as discordNative.
presence.ts
presence.ts contains runtime logic. It detects page state and calls the Presence API.
settings.ts
CLI 1.7.0+ prefers a default-exported settings object here. It replaces legacy inline definitions without merging them. See Settings for typing, defaults and compatibility.
utils/
For complex presences, split your logic into dedicated files under a utils/ folder. The YouTube presence, for example, organizes DOM helpers, channel parsing, and Shorts resolution into separate modules:
TXTsrc/Y/YouTube/
|-- metadata.json
|-- presence.ts
|-- settings.ts
|-- assets/
| |-- logo.png
| |-- icon.png
| `-- thumbnail.jpg
`-- utils/
|-- categories.ts
|-- dom.ts
|-- channel.ts
|-- text.ts
|-- bridge.ts
|-- shorts-dom.ts
|-- shorts-resolve.ts
`-- youtube-data.tsThe bundler resolves local imports from presence.ts, so you can import utility files normally:
import { findVideo } from "./utils/dom"
import { getChannelInfo } from "./utils/channel"assets
Assets are used by the marketplace, installed presence package, Discord activity payloads, and Open Graph images.
Required files:
| Field | Type | Description | Default |
|---|---|---|---|
logo.png* | PNG, 300×300 | Wide brand mark for marketplace headers, presence pages, and generated OG images. | - |
icon.png* | PNG, 128×128 | Square icon for compact UI surfaces and Discord activity image keys. | - |
thumbnail.jpg* | JPG, 1920×1080 | Preview image used when the presence needs a larger visual. | - |
These dimensions are exact requirements, checked by CI on every presence PR - see Assets for details.