How to Contribute
ForgePortal is an open-source project and contributions are welcome — from bug fixes and tests to documentation improvements and new features. This guide describes the workflow for contributing code, docs, or plugins.
Before you start
- Read the Architectural Decisions to understand the key design choices.
- Check open issues on GitHub for existing work or filed bugs before opening a new one.
- Open an issue first for non-trivial features or breaking changes, to agree on the approach before investing in an implementation.
Development setup
Follow the Local Dev Setup guide to get the full stack running locally. The short version:
git clone https://github.com/forgeportal/forgeportal.git
cd forgeportal
pnpm install
pnpm --filter @forgeportal/db run migrate # run migrations
pnpm dev # starts API + Worker + UI
Prerequisites: Node 22+, pnpm 9+, Docker (for PostgreSQL via docker-compose).
Git workflow
-
Fork the repo (or clone directly if you have access).
-
Create a branch from
main:git checkout -b feat/my-feature
# or
git checkout -b fix/issue-123 -
Make changes, write tests, and ensure CI passes locally (see below).
-
Push and open a Pull Request to
main. -
Address review comments; once approved, a maintainer merges.
Branch naming
| Type | Pattern | Example |
|---|---|---|
| Feature | feat/<short-name> | feat/plugin-sdk-context-api |
| Bug fix | fix/<issue-or-desc> | fix/webhook-signature-gitlab |
| Documentation | docs/<topic> | docs/oidc-setup-cognito |
| Chore | chore/<desc> | chore/update-fastify-5 |
| Refactor | refactor/<desc> | refactor/catalog-service-split |
Code style
- TypeScript: strict mode, no
anywithout justification. - Formatting: Prettier is configured at the repo root; run
pnpm formatto format all files. - Linting: ESLint; run
pnpm lintin each affected package. Fix all errors before submitting. - Imports: use explicit file extensions (
.js) for local imports (ESM). - Comments: only for non-obvious intent; avoid narrating what the code does.
Tests
Tests are in src/__tests__/ within each package. Run in a specific package:
pnpm --filter @forgeportal/catalog test
Run all tests:
pnpm test
- Unit tests: prefer mocking DB/external calls with
vitestmocks. - Integration tests: use real Postgres via
docker-composeor a test DB. Many tests usebuildApp()with an in-memory DB. - Coverage: no hard threshold, but meaningful coverage for new logic is expected.
All tests must pass before a PR is merged.
Commit messages
Follow Conventional Commits (loosely):
<type>(<scope>): <short summary>
[optional body]
Examples:
feat(catalog): add lifecycle filter to entity list
fix(webhooks): fix GitLab signature check when body is empty
docs(oidc-setup): add Azure AD guide
chore(deps): update fastify to 5.3.3
Types: feat, fix, docs, test, chore, refactor, ci, build.
Pull request process
- Title: follows the same convention as commit messages.
- Description: explain what and why (not just what the diff shows). Link the related issue.
- Tests: include tests for new logic or bug fixes.
- Docs: update relevant documentation pages if behavior or config changes.
- One concern per PR: keep PRs focused; split unrelated changes.
A maintainer will review within a few days. Small, focused PRs are reviewed faster.
Documentation contributions
Documentation lives in apps/docs/docs/. Pages are Markdown (MDX supported).
-
Edit an existing page directly and open a PR.
-
For new pages, add the file in the appropriate folder and ensure it appears in the sidebar (Docusaurus picks up files in alphabetical order unless
sidebar_positionis set in frontmatter). -
Build and preview locally:
pnpm --filter @forgeportal/docs-site start # dev server with hot reload
pnpm --filter @forgeportal/docs-site build # production build (checks broken links)
Plugin contributions
Plugins live outside the core repo (separate npm packages). To contribute a plugin:
- Scaffold with the CLI:
npx create-forge-plugin my-plugin --type ui|backend|fullstack. - Develop and test locally as described in Plugin Development.
- Publish to npm (or a private registry).
- If the plugin is a useful community contribution, open an issue or PR to link it from the docs.
Reporting bugs
Open an issue on GitHub with:
- ForgePortal version (or commit hash).
- Steps to reproduce.
- Actual vs. expected behavior.
- Relevant logs (redact secrets).
Questions and discussion
For questions, use GitHub Discussions (when enabled) or open an issue with the question label.