Welcome, and thank you for taking the time to contribute! This guide explains the philosophy, workflow, and technical standards we follow. It is largely inspired by the fantastic Ultralytics CONTRIBUTING.md and adapted to the specifics of a SvelteKit + Three.js (Threlte) project.
- Code of Conduct
- Support Channels
- Prerequisites
- Workflow Overview
- Development Environment
- Branching & Commit-Message Conventions
- Coding Guidelines
- Documentation Guidelines
- Assets & Media
- Testing
- Performance & Quality Targets
- Security Policy
- Release Process
- License & CLA
- Acknowledgements
We pledge to foster an open, welcoming, diverse, inclusive, and harassment-free community. All interactions are governed by the Contributor Covenant v2.1. Violations may be reported privately to maintainers@svelte-vrm-live.dev.
• GitHub Issues — Bug reports & feature requests. • GitHub Discussions — Questions, ideas, showcase. • Discord (#dev) — Realtime help (invite link in the repo header).
Please search existing topics before opening new ones.
| Tool | Version | Notes |
|---|---|---|
| Node.js | ≥ 18.x | LTS recommended |
| pnpm | ≥ 8.x | Required — project uses pnpm workspaces |
| Git | ≥ 2.40 | Enable commit signing if possible |
| VS Code (optional) | latest | Recommended editor w/ Svelte extension |
Tip: A ready-to-use Dev Container/GitHub Codespace is provided (
.devcontainer).
- Pick / propose an issue → comment to avoid duplicate work.
- Fork the repo & create a feature branch (
feat/<short-name>). - Develop + write/adjust tests & docs.
- Ensure
pnpm lint test buildpasses locally. - Commit changes using Conventional Commits (see examples below).
- Push and open a Pull Request (PR) against
main. - Sign the CLA when prompted by the CLA bot.
- Engage in review → get approvals → merge 🎉
# 1️⃣ Clone **your fork**
$ git clone https://github.com/<you>/svelte-vrm-live.git && cd svelte-vrm-live
# 2️⃣ Install deps (syncs lockfile)
$ pnpm install
# 3️⃣ Run the dev server
$ pnpm dev # open http://localhost:5173
# 4️⃣ Run linters & tests continuously (optional)
$ pnpm lint:watch & pnpm test --watch- Svelte for VS Code – syntax + diagnostics
- ESLint / Prettier – auto-format on save
- tailwindcss – class name IntelliSense
feat/<scope> # new feature
fix/<scope> # bug fix
chore/<scope> # tooling, CI, docs-only, cleanup
refactor/<scope> # non-breaking restructures
Format: type(scope)!?: subject
Examples:
feat(chat): add emoji reactionsfix(tts): correct phoneme timing off-by-1refactor(scene)!: migrate to Threlte @v6(breaking change)
Commits are auto-squashed into the PR title during merge.
- TypeScript everywhere with
strictmode. - Prefer functional, composable helpers.
- Avoid hard-coding secrets; use
.envvars and never commit real keys.
- Prettier for formatting (see
.prettierrc). - ESLint +
@sveltejs/eslint-plugin-sveltefor lint rules. - Auto-fix:
pnpm lint.
- Use Svelte Runes (
$state,@effect) overonMountwhere possible. - Dispose Three.js resources in
onDestroyto prevent GPU memory leaks. - Keep component props serializable (no class/object instances).
src/
lib/ # reusable libraries (animation, audio, llm, etc.)
routes/ # +page.svelte, API endpoints
static/ # public assets: models/, animations/, textures/
- Public APIs must have TSDoc/JSDoc comments.
- Complex algorithms require inline explanatory comments.
- For user-facing changes update
README.mdor create a doc underdocs/. - Diagrams? Use Mermaid inside markdown.
- Place
.vrmor.glbunderstatic/models/. - Ensure license permits redistribution; add a
LICENSE.txtalongside. - Optimize: ❬50k tris, ≤ 20 MiB, Draco compression preferred.
- Raw
.fbx→static/animations/. - Name files in kebab-case.
- Run
pnpm mixamo:remap <file.fbx>to generate retargeted.anim.jsoncompatible with VRM.
- Use
.webpwhere possible. - Large textures (≥2 k) must be mip-mapped or down-scaled.
| Layer | Tool | Command |
|---|---|---|
| Lint | ESLint | pnpm lint |
| Unit & Component | Vitest | pnpm test |
| API Endpoints | Supertest | pnpm test |
| E2E (planned) | Playwright | pnpm e2e |
All new logic must be covered by unit or integration tests with ≥ 80 % line coverage.
- FPS: ≥ 60 @ 1080p (desktop), ≥ 30 @ 720p (mobile).
- Initial Load: ≤ 3 s on cable connection.
- Bundle Size: ≤ 2 MiB compressed (
vite build --report). - Memory: ≤ 500 MiB browser memory after 5 min idle.
Use browser-perf & Chrome DevTools to profile heavy changes.
Found a vulnerability? Please DO NOT open a public issue. Email security@svelte-vrm-live.dev with details. We follow responsible disclosure: you’ll receive an acknowledgment within 72 h and a fix ETA.
- All merged PRs trigger
release-pleaseto draft a new version. - Maintainers review the changelog.
- Tag & GitHub Release are published.
- Cloudflare Pages build is deployed automatically.
- Code is licensed under GNU AGPL v3.0. By contributing you agree that your contribution is distributed under the same license.
- A signed Contributor License Agreement (CLA) is mandatory. Our CLA Assistant will comment on your PR with instructions (type
I have read the CLA Document and I hereby sign the CLA).
This guide borrows structure and inspiration from the Ultralytics YOLO CONTRIBUTING.md and the GoogleCloudPlatform community templates. ❤️
Happy hacking! ✨