Files
sencho/CONTRIBUTING.md
Anso 865d792874 feat(pricing): collapse to two tiers (#1309)
* feat(pricing): collapse to two tiers (Community + Admiral)

Collapse Sencho's pricing from three tiers (Community / Skipper / Admiral)
to two: a generous free Community tier and a single paid Admiral tier. The
Skipper tier is removed.

Now free in Community: auto-heal, auto-update, scheduled operations,
webhooks, notification routing, Fleet Actions and bulk operations, SSO
preset providers (Google / GitHub / Okta), unlimited users with admin and
viewer roles, and deploy safety (atomic deploys, auto-rollback, and
one-click rollback).

Admiral (paid) is focused on running and governing a fleet: blueprints,
Fleet Secrets, deploy enforcement, vulnerability report export, audit log,
host console, private registries, mesh networking, node cordon, managed
cloud backup, LDAP / Active Directory SSO, and the advanced RBAC roles
(deployer, node-admin, auditor) with per-resource scoped assignments.

Internally the license variant distinction is removed so tier is binary
(community / paid). License validation still verifies the Lemon Squeezy
store and product before granting paid status.

Docs and the contributor guide are updated to the two-tier model.

* docs(pricing): correct licensing page to two-tier pricing and tidy stale tier wording

The licensing docs page kept the old Admiral pricing plus a Founder
Lifetime column and an Enterprise paragraph after the two-tier collapse.
Update it to $12/month or $99/year, drop the lifetime and Enterprise
content, and link to the pricing page for current pricing.

Also fix stale "Skipper" wording in CLA.md, SUPPORT.md, one test title,
and three test comments. Historical CHANGELOG entries and the
retired-Skipper license-guard test are intentionally left as-is.

* docs: align licensing and SSO pages with the two-tier model

Correct the SSO overview so the Google, GitHub, and Okta presets read as
available on every tier, matching the provider table; only LDAP and Active
Directory require Sencho Admiral. Remove the lifetime-plan references from the
licensing, settings, and troubleshooting pages so they reflect subscription-only
Admiral pricing.

* fix(rbac): omit scoped permissions from /me on the Community tier

Scoped role assignments only take effect on the paid tier, but GET /api/permissions/me returned them unconditionally, so a downgraded instance with leftover assignments rendered per-resource affordances the API then rejected with 403. The endpoint now mirrors the permission middleware and includes scoped permissions only on the paid tier. Adds a regression test covering the downgrade case.

* docs: use custom-pricing wording on the contact page

The two-tier model has no Enterprise tier; reword the contact page's enterprise pricing/deals to custom pricing/deals so it does not imply a tier that no longer exists.
2026-06-04 17:45:53 -04:00

4.0 KiB

Contributing to Sencho

Thank you for your interest in contributing to Sencho!

Getting Started

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/sencho.git
  3. Create a branch: git checkout -b feature/your-feature
  4. Install dependencies:
    cd backend && npm install
    cd ../frontend && npm install
    
  5. Start the dev servers:
    cd backend && npm run dev    # Express + nodemon on :1852
    cd frontend && npm run dev   # Vite on :5173
    

Project Layout

backend/
  src/
    routes/       # One router per feature group (stacks, nodes, fleet, ...)
    services/     # Business logic singletons (ComposeService, DockerController, ...)
    middleware/   # Auth, tier gates, audit log, node context
    websocket/    # Upgrade handlers for log streaming, host console, proxy tunnels
frontend/
  src/
    components/   # Page-level and shared UI components
    context/      # Auth, node selection, and other React contexts
    hooks/        # Shared React hooks
    lib/          # apiFetch wrapper and other utilities

See the rest of this file for the most important contributor-facing standards (TypeScript, tier gates, PR process, code style). Architecture and module layout deep-dives live in the project documentation at docs.sencho.io.

Development

  • Backend: Node.js + Express + TypeScript in backend/
  • Frontend: React 19 + Vite + TypeScript in frontend/
  • Tests: cd backend && npm test (Vitest) and npm run test:e2e (Playwright)
  • Lint: npm run lint in both backend/ and frontend/
  • Type check: Run cd backend && npx tsc --noEmit (and the frontend equivalent) before every commit. The CI build will reject type errors.

TypeScript Standards

The project uses strict: true. Write code that compiles without any casts or @ts-ignore. If a library lacks types, import @types/... or use unknown with narrowing.

Tier-Gated Features

Sencho has two tiers: Community and Admiral. We welcome contributions to both! Often, enterprise users will contribute features they need for their own infrastructure.

If your change adds a feature that belongs behind a tier gate, use the guards from backend/src/middleware/tierGates.ts:

if (!requirePaid(req, res)) return;    // Admiral (paid) only

Call the guard at the top of the route handler with an early return. Both guards handle proxy-forwarded tier headers automatically.

Note on Tiers and Monetization:

  • Community Tier: If you contribute a feature to the free/Community tier, it stays in the Community tier. We will never take your community contribution and move it behind a paywall.
  • Commercial Tier: By contributing to an Admiral feature, you acknowledge that your code will be part of Sencho's commercial offering.

Before writing code for a new gated feature, please open an issue to discuss it with the maintainers. You will also be required to sign our Contributor License Agreement (CLA) when you open your first Pull Request.

Pull Request Process

  • All PRs target main
  • Ensure CI passes before requesting review
  • Use Conventional Commits for commit messages
  • Update documentation if your change affects user-facing behavior
  • Add tests for new functionality
  • Keep PRs focused: one feature or fix per PR
  • Do not edit CHANGELOG.md directly. It is generated from conventional-commit subjects by release-please. If a user-facing change needs more context, enrich the auto-opened Release PR description before merging.

Reporting Bugs

Use the bug report template. Include: deployment method, Sencho version, browser (for UI issues), steps to reproduce, and expected vs actual behavior.

Code Style

  • TypeScript with strict: true: no any casts or @ts-ignore
  • ESLint 9 flat config for both backend and frontend
  • Tailwind CSS + shadcn/ui for frontend styling
  • Follow existing patterns in the codebase