Contributing
Monorepo setup
The project is a pnpm monorepo managed with Turborepo:
next-workflow-builder/
├── packages/
│ └── next-workflow-builder/ # The published npm package
├── examples/
│ └── demo/ # Full demo app with 14+ plugins
├── docs/ # Documentation (Nextra)
├── pnpm-workspace.yaml
└── turbo.jsonGetting started
# Clone the repository
git clone <repo-url>
cd next-workflow-builder
# Install dependencies
pnpm install
# Build the package
pnpm build:nwb
# Run the example app
pnpm dev:exampleDevelopment workflow
Building the package
pnpm build:nwbThis runs TypeScript compilation, fixes ESM imports, and copies static assets.
Running the demo app
pnpm dev:exampleThe demo app (examples/demo/) uses workspace:* to link the local package, so changes to the package are reflected after rebuilding.
Running docs
pnpm dev:docsRunning tests
pnpm testPackage development guidelines
- Only modify code in
packages/next-workflow-builder/ - The
examples/demo/app serves as a full integration test - Run
nwb discover-pluginsin the demo directory after changing plugin-related code
Plugin development
When creating community plugins:
- Follow the plugin structure documented in Creating Plugins
- Prefer
fetchover SDK dependencies to reduce supply chain attack surface - Always import
"server-only"in step files - Use
withStepLoggingfor execution tracking - Include a connection test function
- Test with the example app before publishing
Docs development
The docs use Nextra (v4) with the docs theme. Pages are markdown files under
docs/src/app/docs/.
To add a new page:
- Create
docs/src/app/docs/{page-name}/page.md - Add an entry in
docs/src/app/_meta.global.tsxunder thedocs.itemsobject - Write your content in markdown
Submitting changes
- Create a branch from
main - Make your changes
- Ensure the package builds:
pnpm build:nwb - Test with the example app
- Open a pull request against
main
Last updated on