mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-10-25 13:11:05 +00:00
1e52f3f134
release-please derives the changelog and the version bump from conventional-commit subjects read off main. Squash-merging takes the subject from the PR title, so a title the parser cannot read drops the change from the release notes with no warning. The build-identity feature (#1899) merged with an untyped title and never appeared in any release notes. The local commit-msg hook cannot catch this: it runs against the PR branch commit and never against the squash that actually lands. Add a pull_request workflow that validates the title, and read the allowed types from commitlint.config.js so the two cannot drift. The check enforces the conventional shape only, not the length or casing rules the local hook applies to a full commit. Those would only add noise here: Dependabot generates group titles longer than the commit header limit, and blocking on that would fail a PR whose title is otherwise fine. Correct CONTRIBUTING.md while here. It claimed that hand edits to the Release PR survive a regeneration; release-please replaces the PR body and force-pushes the release branch, so they do not. Point the guidance at the override block, and record that a dependency PR clearing an advisory must not merge as chore(deps), which is conventional and therefore passes the new check while staying out of the changelog.
86 lines
4.2 KiB
Markdown
86 lines
4.2 KiB
Markdown
# 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:
|
|
```bash
|
|
cd backend && npm install
|
|
cd ../frontend && npm install
|
|
```
|
|
5. Start the dev servers:
|
|
```bash
|
|
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, 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, PR process, code style). Architecture and module layout deep-dives live in the project documentation at [docs.sencho.io](https://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.
|
|
|
|
## Contributing to Community
|
|
|
|
This public repository is the AGPLv3 **Community** product. Contributions here stay under AGPLv3 for the Community product. We will not take a Community contribution and move it behind a paid gate.
|
|
|
|
You will be required to sign our Contributor License Agreement (CLA) when you open your first Pull Request.
|
|
|
|
## Trademarks
|
|
|
|
Sencho and Studio Saelix names and logos are trademarks. AGPLv3 does not grant trademark rights. See [TRADEMARKS.md](TRADEMARKS.md).
|
|
|
|
## Pull Request Process
|
|
|
|
- All PRs target `main`
|
|
- Fill in the pull request template (summary, type of change, testing performed).
|
|
- The CLA Assistant check must pass. First-time contributors are prompted to sign [CLA.md](CLA.md).
|
|
- Ensure CI passes before requesting review
|
|
- Use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages, and make the PR title one too. Squash-merging uses the title as the commit subject, so a title that is not a conventional commit drops the change from the release notes entirely.
|
|
- For a dependency PR that clears a security advisory, use `security(deps):` or `fix(deps):` rather than the default `chore(deps):`. `chore` and `security` are both valid types, but only the latter two reach the changelog, and `chore(deps)` on an advisory means operators never learn the release carries the fix.
|
|
- 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 include secrets, tokens, credentials, or real hostnames/IPs in the diff, commits, or PR description.
|
|
- Do not edit `CHANGELOG.md` directly. It is generated from conventional-commit subjects by release-please. To correct or add context to an entry after the change is merged, add a `BEGIN_COMMIT_OVERRIDE` block to that PR's body and let the next release-please run regenerate the notes from it.
|
|
|
|
## Reporting Bugs
|
|
|
|
Use the [bug report template](https://github.com/studio-saelix/sencho/issues/new?template=bug_report.yml). 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
|