Mirror of https://github.com/roostorg/coop github.com/roostorg/coop
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 32 lines 1.2 kB view raw view rendered
1# Plugin Architecture 2 3This directory contains the contracts and utilities that power Coop's pluggable 4infrastructure story. Adapters implement small TypeScript interfaces and are 5loaded dynamically at runtime, which keeps the core service independent from 6any particular warehouse or analytics vendor. 7 8The goals of this layout are: 9 10- Allow first-party adapters (Clickhouse, Postgres, etc.) to live 11 alongside community-provided ones without touching core code 12- Make it trivial for deployers to publish and consume custom adapters via NPM 13- Keep the contracts minimal so the abstractions do not leak complex 14 vendor-specific behaviour 15 16## Directory Layout 17 18``` 19server/plugins/ 20├── analytics/ # Analytics logging/querying contracts 21│ ├── IAnalyticsAdapter.ts 22│ ├── types.ts 23│ └── examples/ 24├── warehouse/ # OLTP warehouse interfaces 25│ ├── IWarehouseAdapter.ts 26│ ├── types.ts 27│ └── examples/ 28└── utils/ # Shared helper utilities for adapter authors 29``` 30 31The `examples` folders intentionally ship tiny reference implementations (for 32instance a no-op adapter) so that authors can copy/paste a starting point.