Skip to content

Latest commit

 

History

History
91 lines (66 loc) · 3.17 KB

File metadata and controls

91 lines (66 loc) · 3.17 KB

Contributing to vcam

Thank you for your interest in contributing to vcam! This document provides guidelines and instructions for setting up your development environment and contributing code.


Development Toolchain

Component Tool / Version Usage
Workspace Manager Node.js 22.15+ & pnpm 10.x Monorepo dependency management
Build Orchestrator Turborepo (turbo) Task graph execution and caching
JS/TS Linter & Formatter Oxlint & Oxfmt Ultra-fast JS/TS linting and code formatting
Codebase Intelligence Fallow (fallow) Dead code, duplication, and architectural analysis
Android Linter & Formatter Android Lint & Spotless (Ktlint) Kotlin code quality and formatting
Desktop Toolchain @native-sdk/cli & Zig 0.16 Native Linux UI & host compilation
Android Toolchain JDK 17+ & Android SDK (API 34) Android app build via Gradle

Setting Up the Development Environment

1. Workspace Setup

# Enable Corepack (optional, pins pnpm version)
corepack enable

# Install workspace dependencies
pnpm install

# Install Native SDK CLI globally (required for desktop app)
npm install -g @native-sdk/cli

2. Desktop Application (@vcam/desktop)

# Run desktop application in development mode
pnpm desktop

# Or run Turborepo task directly
pnpm exec turbo run dev --filter=@vcam/desktop

3. Android Application (@vcam/android)

# Build Android debug APK
pnpm android

# Build Android production release APK
pnpm --filter @vcam/android build:release

# Install directly to a connected USB device via Gradle
cd apps/android
./gradlew :app:installDebug

Monorepo Architecture

apps/
  desktop/      @vcam/desktop      Native Linux client (Zig core & C host)
  android/      @vcam/android      Android Kotlin app (CameraX + MediaCodec)
packages/
  protocol/     @vcam/protocol     Shared binary protocol definitions
  mock-stream/  @vcam/mock-stream  Developer TCP mock media server
docs/                              Public documentation & references
scripts/                           Release, changelog, and signing test scripts
.github/
  workflows/                       CI/CD release workflows (Desktop, Android, Changelog)

Code Quality, Standards & Workflows

1. Quality & Linting Commands

  • Linting: Run pnpm lint (Oxlint for JS/TS, Android Lint for Android).
  • Formatting: Run pnpm format or pnpm format:check (Oxfmt for JS/TS, Spotless for Kotlin).
  • Codebase Intelligence: Run pnpm fallow to detect unused exports, dead code, and duplication.

2. Release & Dry-Run Testing

  • Local Release Dry-Run: Run pnpm release:dry-run to simulate the full publication sequence locally without pushing artifacts.
  • Local APK Signing Test: Run pnpm sign:test <path-to-keystore.jks> [alias] to verify Android keystore credentials locally.
  • Changelog Generation: Run pnpm changelog to update CHANGELOG.md from git commits (--dry-run for preview).
  • Commit Messages: Follow standard Conventional Commits conventions (e.g. feat: ..., fix: ..., docs: ..., chore: ...).