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
`-- assets/
|-- logo.png
|-- icon.png
`-- thumbnail.jpgmetadata.json
metadata.json describes the platform, supported URLs, author, category, localized descriptions, and marketplace assets.
presence.ts
presence.ts contains runtime logic. It detects page state and calls the Presence API.
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
|-- 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 | Wide brand mark for marketplace headers, presence pages, and generated OG images. | - |
icon.png* | PNG | Square icon for compact UI surfaces and Discord activity image keys. | - |
thumbnail.jpg* | JPG | Preview image used when the presence needs a larger visual. | - |