mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
contributing.md: - Prerequisites now show Windows/Linux/ARM64 support matrix - Client commands split into Build, Tests, Typecheck/Lint/Format sections - Add 7 missing commands: lint:ox, format, format:check, knip, test:mutate, test:mutate:dry, test:browser quick-start.md: - Prerequisites table covers Windows + Linux x64 + ARM64 - Step 1 split into 3 options: pre-built binaries, Docker, build from source - Release table lists all platform artifacts (exe, AppImage, deb) - Docker quick-start references deployment.md Docker section
3.5 KiB
3.5 KiB
Contributing
How to set up the development environment and contribute to OwnCord.
Development Setup
Prerequisites
| Platform | Server | Client |
|---|---|---|
| Windows 10+ x64 | ✅ | ✅ |
| Linux x64 | ✅ | ✅ |
| Linux ARM64 | ✅ | ✅ (CI only) |
- Go 1.25+ (server)
- Node.js 20+ (client)
- Rust / Cargo (Tauri client — not needed for server-only work)
- Docker + Compose v2 (optional — alternative to building the server locally)
Available Commands
Server (Go)
| Command | Description |
|---|---|
go build -o chatserver.exe -ldflags "-s -w" . |
Build server binary (Windows) |
CGO_ENABLED=0 go build -o chatserver -ldflags "-s -w" . |
Build server binary (Linux) |
go test ./... |
Run all server tests |
go test ./... -cover |
Run server tests with coverage |
go test -race ./... |
Run server tests with race detection |
Client (Tauri v2)
Build & dev
| Command | Description |
|---|---|
npm run dev |
Start Vite dev server with hot reload |
npm run build |
TypeScript check + Vite production build |
npm run tauri dev |
Launch Tauri app in dev mode |
npm run tauri build |
Build release installer (NSIS on Windows, AppImage+deb on Linux) |
Tests
| Command | Description |
|---|---|
npm test |
Run all tests (vitest) |
npm run test:unit |
Unit tests only |
npm run test:integration |
Integration tests only |
npm run test:e2e |
Playwright E2E (mocked Tauri) |
npm run test:e2e:native |
Playwright E2E (real Tauri exe + CDP) |
npm run test:e2e:prod |
Playwright E2E (prod build) |
npm run test:e2e:ui |
Playwright UI mode |
npm run test:watch |
Vitest watch mode |
npm run test:coverage |
Coverage report |
npm run test:mutate |
Stryker mutation testing |
npm run test:mutate:dry |
Stryker dry-run (no mutations applied) |
npm run test:browser |
Vitest browser-mode tests |
Type checking, linting & formatting
| Command | Description |
|---|---|
npm run typecheck |
Full typecheck (all sources) |
npm run typecheck:build |
Typecheck build config only |
npm run lint |
oxlint + ESLint check (src/) |
npm run lint:fix |
ESLint auto-fix |
npm run lint:ox |
oxlint only (fast correctness checks) |
npm run format |
Prettier format (src/ + tests/) |
npm run format:check |
Prettier check only (no writes) |
npm run knip |
Dead code and unused export detection |
Active Branches
main-- stable releasesdev-- active development
Branch Naming
feature/<name>-- new featuresfix/<name>-- bug fixesdocs/<name>-- documentation changes
Commit Format
Use conventional commits:
feat: add thread support to channels
fix: prevent duplicate WebSocket connections
refactor: extract permission checks into middleware
docs: update quick-start guide
test: add integration tests for invite flow
chore: bump Go dependencies
perf: cache role permissions in memory
ci: add lint step to GitHub Actions
Pull Request Process
- Branch from
dev(the active development branch) - PRs target
dev;mainis for stable releases only - CI must pass (build + test + lint)
- Request code review
- Squash merge preferred
Testing
Target 80%+ coverage. Follow test-driven development workflow.
Code Style
- TypeScript: See Client Architecture
- Go:
gofmt+golangci-lint, standard library preferred - Rust:
cargo fmt+cargo clippy, minimal code (native APIs only)