Loom-style video recorder
nextjstaurirustmysqlminiodocker

Key Facts

  • Role: Lead Engineer (Fork & Deployment)
  • Stack: Next.js 15, Tauri, Rust, MySQL 8, MinIO, Docker Compose, Caddy
  • Target: Internal team recording & client workflow demos
  • Status: Active Internal Tool (thread.arkwright.solutions)

Executive Summary

Arkwright needed a private internal tool for sharing workflow recordings—demonstrating AI agent setups to clients, onboarding new team members, and documenting repeatable processes. Rather than paying per-seat for Loom or trusting sensitive screen recordings to a third-party SaaS, I forked Cap, an open-source video messaging platform, and stood up a self-hosted instance branded as Thread.

The work involved a surgical rebrand of the authenticated app shell and the engineering of a production-ready Docker Compose stack capable of running on low-cost ARM64 infrastructure.

The Challenge

The primary challenge was to strip away the Vercel-centric and AWS-centric assumptions of the upstream project to enable a truly self-hosted, sovereign deployment.

  • Infrastructure Decoupling: Removing hard-coded dependencies on Vercel Edge functions and AWS S3.
  • Branding Consistency: Reskinning the full-stack application (Next.js frontend + Tauri desktop app) to match the Arkwright visual identity.
  • Resource Constraints: Optimizing the stack to run reliably on a budget-friendly ARM64 instance without sacrificing video processing performance.

The Stack

I engineered a containerized stack that prioritizes data sovereignty and minimal operational cost:

  • Frontend & API: Next.js 15 (App Router).
  • Desktop App: Tauri (Rust-powered media engine with Skia rendering and FFmpeg transcoding).
  • Object Storage: MinIO (S3-compatible storage for recordings and thumbnails).
  • Database: MySQL 8.0.
  • Reverse Proxy: Caddy (handling TLS termination and automated routing).
  • Orchestration: Docker Compose.

Key Architectural Decisions

1. Sovereign S3 with MinIO

To avoid AWS lock-in and egress costs, I integrated MinIO as the primary object store.

  • S3 Path Style: Configured the cap-web service to use path-style addressing (S3_PATH_STYLE=true), allowing the app to communicate with MinIO over the internal Docker network while serving assets via a public-facing subdomain.
  • Automated Setup: Engineered a minio-setup container that automatically initializes the required buckets and sets anonymous download policies upon stack launch, ensuring a "zero-touch" deployment.

2. ARM64-Optimized Deployment

The entire stack is deployed on a Hetzner CAX11 ARM64 VM.

  • Custom Media Server: I built a standalone Dockerfile for the media-server component, ensuring the Rust-based video processing engine is compiled specifically for the ARM64 architecture for maximum performance.
  • Disk Hygiene: Implemented a daily automated cleanup job (builder prune, image prune) to manage the small disk footprint of the host machine during repeated deployments.

3. "Pro-Tier" Self-Hosting

By deliberately unsetting the NEXT_PUBLIC_IS_CAP flag in the production environment, I unlocked the full suite of Pro features for the internal team.

  • Unlimited Recordings: No artificial feature gating or per-seat pricing.
  • AI Transcription: Integrated Deepgram for sub-second speech-to-text and OpenAI/Groq for automated summary and chapter generation, ensuring all recordings are searchable and actionable.

4. Reskin & Rebase Audit

To ensure the fork remains maintainable, I implemented a strict branding audit process.

  • reskin.md: A repository-native audit file that tracks every modified asset, logo, and component. This allows for clean rebases against the upstream "Cap" project, ensuring new features and security patches can be merged with minimal conflict.

Outcome

Thread gives Arkwright a private, branded video-sharing tool at negligible infrastructure cost. It ensures that sensitive client-facing workflow demos stay on company-controlled hardware, while providing a consumer-grade user experience that matches the industry standard. The project serves as a model for how Arkwright approaches "Sovereign SaaS"—leveraging open-source foundations to build high-value internal tooling without vendor lock-in.