Thank you for your interest in contributing! This guide will help you get started.
- Node.js >= 20
- npm (ships with Node)
- Git
git clone https://github.com/vana-com/personal-server-ts.git
cd personal-server-ts
npm install
npm run buildThis is an npm workspaces monorepo:
| Package | Purpose |
|---|---|
packages/core |
Protocol logic — auth, grants, scopes, storage |
packages/server |
Hono HTTP server — routes, middleware, composition |
packages/cli |
CLI entry point |
git checkout -b feat/my-feature # or fix/my-fix, docs/my-docs- Write tests alongside your code (
foo.ts->foo.test.ts) - Follow existing patterns in the codebase
- Keep changes focused and minimal
npm run validate # runs lint, format check, and testsOr individually:
npm run lint # TypeScript type checking
npm run lint:eslint # ESLint
npm run format:check # Prettier
npm test # VitestWe use Conventional Commits:
feat: add new scope type for photos
fix: correct grant expiry check
docs: update API endpoint table
chore: bump vitest to v4
refactor: extract auth middleware
test: add coverage for sync retry
ci: add CodeQL workflow
Commits are validated by commitlint via a Git hook.
- Fill out the PR template
- Ensure CI passes (lint, format, tests on Node 20 + 22)
- Keep PRs small — one logical change per PR
npm test # all unit tests
npm run test:watch # watch mode
npm run test:e2e # end-to-end testsTests are co-located with source files. Use the existing test utilities in packages/core/src/test-utils/.
- Formatter: Prettier (2-space indent, double quotes, semicolons, trailing commas)
- Linter: ESLint with typescript-eslint
- Types: TypeScript strict mode — no
anywithout justification
Both are enforced via pre-commit hooks (husky + lint-staged).
If you discover a security vulnerability, do not open a public issue. See SECURITY.md for responsible disclosure instructions.
By contributing, you agree that your contributions will be licensed under the MIT License.