Thank you for your interest in contributing. This document explains the process for reporting issues, proposing features, and submitting pull requests.
- Code of Conduct
- Getting Started
- Development Workflow
- Commit Convention
- Pull Request Process
- Style Guide
- Testing
- Security
Be respectful and constructive. Contributions of any skill level are welcome. Harassment, personal attacks, or dismissive communication will not be tolerated.
- Fork the repository and clone your fork:
git clone https://github.com/<your-username>/founder-os.git
cd founder-os- Install dependencies:
npm install- Copy the environment file and fill in your own credentials:
cp .env.example .env.localYou will need your own InsForge project, OpenRouter API key, and Stripe test account to run the app locally. See the README Getting Started section for detailed instructions.
- Run the development server:
npm run dev- Create a branch from
mainfor your work. Use a descriptive name:
feat/team-collaboration
fix/kpi-deduplication-edge-case
docs/update-stripe-setup
refactor/memory-context-builder
- Keep your branch up to date with
mainusing rebase, not merge:
git fetch origin
git rebase origin/main- Run the linter before committing:
npm run lint- Build the project to catch TypeScript and Next.js errors:
npm run buildWe use Conventional Commits. Every commit message should follow this format:
<type>(<scope>): <short summary>
[optional body]
[optional footer]
Types:
| Type | When to use |
|---|---|
feat |
A new feature |
fix |
A bug fix |
refactor |
Code change that neither fixes a bug nor adds a feature |
docs |
Documentation only changes |
style |
Formatting, missing semicolons, etc — no logic change |
test |
Adding or updating tests |
chore |
Build process, dependency updates, tooling |
perf |
A performance improvement |
Examples:
feat(ai): add retry logic to OpenRouter client
fix(stripe): handle past_due subscription status in webhook handler
refactor(memory): extract context window builder into dedicated module
docs(readme): add Stripe CLI setup instructions
- Open a PR against
mainusing the pull request template. - Fill in all sections of the template — motivation, change description, test plan.
- Ensure
npm run lintandnpm run buildpass with zero errors. - Link any relevant issues using GitHub's
Fixes #<issue>keyword. - Request a review. PRs require at least one approving review before merge.
- Do not merge your own PR.
PR size guidelines:
- Prefer smaller, focused PRs over large omnibus changes.
- If your change spans multiple unrelated concerns, split it into separate PRs.
- UI changes should include screenshots or a screen recording in the PR description.
- All new code must be TypeScript. No
anyunless absolutely necessary — useunknownand narrow. - Prefer explicit return types on exported functions and API route handlers.
- Co-locate types with their consumers when they are not shared. Shared types live in
src/types/database.ts.
- Use function components exclusively.
- Keep components focused. If a file exceeds ~200 lines, consider splitting it.
- Client components are marked
"use client"at the top. Server components are the default — do not add"use client"unless the component uses browser APIs, hooks, or event handlers. - Follow the existing pattern for data fetching: server components fetch via
createInsForgeServerClient(), client components use theinsforgesingleton fromsrc/lib/insforge/client.ts.
- Every API route must return typed JSON responses.
- Authenticate and authorise before processing. Do not trust
projectIdfrom the request body without verifying that the authenticated user owns the project. - AI routes must call
checkUsageLimitbefore calling OpenRouter andincrementAiUsageafter a successful response.
- All new tables must have Row Level Security enabled with per-operation policies.
- Add new tables and policies in a new timestamped migration file under
migrations/. - Never write raw SQL in application code. Use the InsForge SDK's query builder.
- Files:
kebab-case.ts/kebab-case.tsx - Components:
PascalCase - Functions and variables:
camelCase - Database columns:
snake_case - Environment variables:
SCREAMING_SNAKE_CASE
Currently the project does not have an automated test suite. Contributions that add tests (unit, integration, or E2E via Playwright) are especially welcome.
For now, manually verify your changes by:
- Running the app locally (
npm run dev). - Exercising the specific feature you changed end-to-end.
- Checking that the TypeScript compiler and linter report no errors (
npm run build && npm run lint).
If you discover a security vulnerability, do not open a public GitHub issue. Email the maintainer directly at the address listed on their GitHub profile. Include a description of the vulnerability, steps to reproduce, and any proof-of-concept code. You will receive a response within 48 hours.
Responsible disclosure is appreciated and will be acknowledged in the release notes.