DEPENDENCY UPDATE v0.4.0 - nself-org/nchat GitHub Wiki
Dependency Update for v0.4.0
Summary
Updated package.json to version 0.4.0 and added all required dependencies for the following features:
- End-to-end encryption (Signal Protocol)
- WebRTC video conferencing with SFU
- Advanced video streaming (HLS/DASH)
- Canvas-based visual effects
- Enhanced cryptographic operations
New Dependencies Added
Production Dependencies
-
@noble/curves@^1.7.0
- Purpose: Elliptic curve cryptography (Curve25519)
- Use case: Key exchange and encryption operations
- Installed version: 1.9.7
-
@noble/hashes@^1.6.1
- Purpose: Cryptographic hashing functions
- Use case: SHA-256, SHA-512, BLAKE2b, etc.
- Installed version: 1.8.0
-
@signalapp/libsignal-client@^0.69.0
- Purpose: Signal Protocol implementation
- Use case: End-to-end encryption for messages
- Installed version: 0.69.1
- Note: Native module requiring Node.js environment
-
canvas@^2.11.2
- Purpose: Canvas API for Node.js
- Use case: Background effects, image processing
- Installed version: 2.11.2
- Note: Native module requiring Cairo system dependencies
-
dashjs@^4.7.4
- Purpose: DASH (Dynamic Adaptive Streaming over HTTP)
- Use case: Adaptive video streaming
- Installed version: 4.7.4
-
mediasoup@^3.18.9
- Purpose: Selective Forwarding Unit (SFU) server
- Use case: Video conferencing backend
- Installed version: 3.19.15
- Note: Server-side only (Node.js)
Development Dependencies
- @types/simple-peer@^9.11.8
- Purpose: TypeScript definitions for simple-peer
- Installed version: 9.11.9
Previously Existing Dependencies (Verified)
The following dependencies were already present and verified:
- ✅ @mediapipe/selfie_segmentation@^0.1.1675465747 - Person segmentation
- ✅ mediasoup-client@^3.18.5 - WebRTC client for mediasoup
- ✅ simple-peer@^9.11.1 - WebRTC wrapper
- ✅ webrtc-adapter@^9.0.3 - Browser compatibility layer
- ✅ hls.js@^1.6.15 - HLS (HTTP Live Streaming) player
Installation Results
Installation Command
pnpm install
Status
✅ All dependencies installed successfully
Warnings
- Minor peer dependency warnings (non-critical):
tree-sitterversion mismatch (0.22.4 vs 0.21.1)canvasversion mismatch (2.11.2 vs 3.0.0) - using older version for compatibility
- Some Nhost packages deprecated (security patches continue until March 31)
Build/Compilation Notes
- canvas: Successfully compiled native module with some warnings (expected)
- mediasoup: Downloaded prebuilt binary for darwin-arm64
- @signalapp/libsignal-client: Prebuilt binary available
Import Verification
All dependencies can be imported correctly:
// Cryptography
import { secp256k1 } from '@noble/curves/secp256k1'
import { sha256 } from '@noble/hashes/sha256'
// WebRTC
import * as mediasoupClient from 'mediasoup-client'
import adapter from 'webrtc-adapter'
// Video streaming
import Hls from 'hls.js'
// Simple peer
import * as SimplePeer from 'simple-peer'
Special Handling Required
Server-Side Only
- mediasoup: Can only be imported in Node.js environment (API routes, server components)
- canvas: Requires Cairo system dependencies, Node.js only
Native Modules
- @signalapp/libsignal-client: Requires proper Node.js environment
- canvas: Requires Cairo, Pango, and related libraries
Browser vs Server
- Use dynamic imports with
typeof window !== 'undefined'checks for client-only libraries - Use Next.js API routes for server-only dependencies
Version Update
Updated package version:
- Previous: 0.3.0
- Current: 0.4.0
Files Modified
/Users/admin/Sites/nself-chat/package.json- Added dependencies and updated version/Users/admin/Sites/nself-chat/pnpm-lock.yaml- Updated lock file
Next Steps
- ✅ Dependencies installed
- ✅ Version updated to 0.4.0
- ✅ Imports verified
- ⏳ Implement E2EE features using Signal Protocol
- ⏳ Set up mediasoup server for video conferencing
- ⏳ Implement HLS/DASH streaming
- ⏳ Add canvas-based visual effects
Testing
To verify the installation:
# Type check
pnpm type-check
# Install and verify
pnpm install
pnpm list --depth=0 | grep -E "(noble|signal|mediasoup|canvas|dashjs|hls\.js|simple-peer|webrtc)"
Documentation
Related documentation:
- Signal Protocol: https://signal.org/docs/
- mediasoup: https://mediasoup.org/documentation/v3/
- HLS.js: https://github.com/video-dev/hls.js/
- Noble cryptography: https://github.com/paulmillr/noble-curves
Date: January 30, 2026 Updated by: Development Team Status: ✅ Complete