Partner Modules (Open Modules)
PSI's modular architecture allows partners to contribute their own modules -- structures, features, and server modules -- that extend the core platform. These are called open modules.
Core vs. Open Modules
graph TD
subgraph "Core Modules"
direction TB
CS[Core Structures<br/>Question, Profile, Article, Topic]
CF[Core Features<br/>comment-slider, reactions, moderation]
CM[Core Server Modules<br/>admin, auth, profile, questions]
end
subgraph "Open Modules (Partner)"
direction TB
ZDF_M[ZDF Modules<br/>videovoting, article, moderation]
CBC_M[CBC/RC Features<br/>titled-writer, badges]
SRG_M[SRG Modules<br/>dialogue-labels, dialogue teaser]
end
CS -.->|"Partner extends"| ZDF_M
CF -.->|"Partner extends"| CBC_M
CM -.->|"Partner extends"| SRG_M Key Differences
| Aspect | Core Module | Open Module |
|---|---|---|
| Maintained by | PSI core team | Contributing partner |
| Code location | client/structure/, client/feature/, server/modules/ | client/open-modules/{partner}/, server/open-modules/{partner}/ |
| Design review | Required | Encouraged, not required |
| Product review | Required | Not required |
| Engineering review | Detailed (core team standards) | Minimal (no destabilization check) |
| Enabled by default | Can be default for all silos | Only for contributing partner's silos |
| Core dependencies | Can depend on other core modules | Cannot be depended on by core |
| Tests required | Yes (core team maintains) | Yes (partner must provide sufficient tests) |
Directory Layout
Client Open Modules
client/open-modules/
├── zdf/
│ ├── feature/
│ │ ├── videovoting/ # Video voting feature
│ │ ├── conversationhelper/ # AI-assisted conversation helper
│ │ ├── premoderation/ # Blocklist UI
│ │ ├── article/ # Article teaser positioning
│ │ ├── account/ # Notification permissions
│ │ └── login/ # ZDF login screen
│ ├── structure/
│ │ └── videovoting.tsx # Video voting structure
│ ├── component/ # ZDF-specific UI components
│ └── util/ # ZDF utilities
├── cbcrc/
│ └── feature/ # CBC/RC features (titled-writer, profile)
└── srg/
└── feature/ # SRG features (dialogue teaser, photo-edit)
Server Open Modules
server/open-modules/
├── zdf/
│ ├── article.ts # Article management (ZDF)
│ ├── article-teaser-position.ts # Teaser positioning
│ ├── conversation-helper.ts # Conversation utilities
│ ├── moderation.ts # ZDF moderation logic
│ └── videovoting.ts # Video voting backend
└── srg/
└── dialogue-labels.ts # SRG dialogue labels
Current Partner Modules
ZDF (Germany)
| Module | Type | Description |
|---|---|---|
| Video Voting | Structure + Feature | Interactive video voting (videovoting) |
| Article | Server module | Article management and teaser positioning |
| Conversation Helper | Feature + Server module | AI-assisted conversation guidance |
| Moderation | Feature + Server module | ZDF moderation logic and blocklist UI |
| Account/Login | Feature | Notification permissions, ZDF login screen |
Note:
blocklistandchannelsare now core server modules (promoted out of ZDF open modules). There is nopush-notificationsserver module in the current source.
CBC / Radio-Canada
| Module | Type | Description |
|---|---|---|
| Titled Writer / Badges | Client feature | CBC/RC profile and general features |
CBC/RC contributes client-side features and OIDC providers (
cbcRc). There is notopicmigrationserver module in the current source.
SRG SSR (Switzerland)
| Module | Type | Description |
|---|---|---|
| Dialogue Labels | Server + client feature | SRG dialogue configuration and teaser |
Creating an Open Module
1. Set Up the Directory
# Client
mkdir -p client/open-modules/your-partner/{feature,structure,component,util}
# Server
mkdir -p server/open-modules/your-partner/{modules,prompts,util}
2. Follow Naming Conventions
- File names:
kebab-case - Feature keys:
kebab-case - Module names: match the file name
- Follow the same layout conventions as core modules
3. Register Your Modules
- Client features/structures: import and register in the partner's index file
- Server modules: the API router automatically discovers modules in
open-modules/
4. Provide Tests
Partners must provide sufficient tests so the core team can detect regressions:
- Client: Jest tests in
*.test.tsxfiles alongside source - Server: Jest tests in
__tests__/directories - Storybook stories for visual components
5. Submit for Review
Open modules go through a minimal engineering review ensuring:
- No destabilization of the core platform
- No harm to instances the module isn't enabled on
- Proper use of data access APIs (Datastore, ServerStore)
- No direct database manipulation outside adapters
Further Reading
- Open Modules policy (psi-product) -- detailed policy
- File Layout (psi-product) -- naming conventions
- Design concepts (psi-product) -- structures, features, config slots