linkedin, pinterest), a key or login typed into the connect form (bluesky, devto), or the browser extension (skool).
The imports below use @gitroom/*. That is the workspace alias in tsconfig.base.json, and it is correct.
Backend
1
Define the post settings
If posts to the network take settings, such as a title or a board, create a DTO with A network without settings still needs both: a
class-validator rules in libraries/nestjs-libraries/src/dtos/posts/providers-settings/<name>.dto.ts.Then register it in all.providers.settings.ts in the same folder, twice: a ProviderExtension<'your-identifier', YourDto> member of the AllProvidersSettings type, and a line in the list allProviders() returns:ProviderExtension<'your-identifier', None> member of the type, and a list line with setEmpty as the value, the way threads and bluesky have them. The create-post DTO checks each post’s __type against this list and refuses any identifier that is missing.2
Write the provider
Create
libraries/nestjs-libraries/src/integrations/social/<name>.provider.ts. A provider extends SocialAbstract, which supplies shared helpers such as an SSRF-guarded fetch and default checkValidity, checkPostStatus and finalizePost, and implements SocialProvider:- Override
checkValidityto refuse, before a post is scheduled, what the network’s API would reject: media count, formats, lengths. - A network that takes a key or a login instead of OAuth implements
customFields(), and the connect form asks for those fields. - Keep network-specific logic in the provider. Generic code calls the provider through the interface and never tests which network it is.
3
Register it
Add an instance to
socialIntegrationList in libraries/nestjs-libraries/src/integrations/integration.manager.ts. That list is what Add Channel offers, and where the workers get their per-network queues.Extra functions
A provider can expose more functions, for example one that lists the pages or boards the account can post to. Add a public async method to the class. It receives the channel’s token, the data the frontend sent, the channel’s internal id and the channel:@Tool({ description, dataSchema }) from @gitroom/nestjs-libraries/integrations/tool.decorator if AI agents should be able to call it too.
Frontend
1
Write the settings component
Create Pass
apps/frontend/src/components/new-launch/providers/<name>/<name>.provider.tsx:SettingsComponent: null for a network without settings.2
Call an extra function, if you added one
/integrations/function route for the channel being edited.3
Register the component
In
apps/frontend/src/components/new-launch/providers/show.all.providers.tsx, import it and add it to Providers:4
Add the icon
Save the network’s icon as
apps/frontend/public/icons/platforms/<identifier>.png.Before you open a pull request
- Connect a test account, publish a post with and without media, and check that
checkValidityrefuses what the network refuses. - Add the network’s variables, if any, to
.env.example. - Run
pnpm run lintfrom the repository root andpnpm test.