# How to Vibe Code Your Own Tresorit (and Stop Paying for It)

> End-to-End Encrypted Cloud Storage for Businesses

- Site: https://tresorit.com
- Category: Cloud Storage & Security
- Platforms: Web app, macOS app, Windows app, Linux app, iOS app, Android app
- Verdict: **Don't bother** (15/100 vibecodeable)
- Estimated effort: 6+ months of full-time work

## Verdict

Build a personal encrypted vault subset, but keep paying for Tresorit if you need the native drive mounting and multi-platform sync.

Tresorit is built on over a decade of complex systems engineering, specifically client-side zero-knowledge cryptography and low-level filesystem drivers. While an AI coding agent can spin up a web app with server-side encryption in an afternoon, true zero-knowledge key distribution, end-to-end encrypted sharing links, and native filesystem mounting ('Tresorit Drive') require immense manual architecture and rigorous cryptographic auditing. A solo developer can build a simple web-based encrypted vault, but replicating the core security guarantee without side-channel leaks or key corruption is an immense undertaking.

### What you can't replicate

- Certified regulatory compliance (HIPAA, FINRA, TISAX)
- High-performance native filesystem integration drivers across Windows, macOS, and Linux
- Swiss Post backing and enterprise-grade trust moat

## What it does

Secure cloud storage, file sharing, and content collaboration platform built with zero-knowledge, end-to-end encryption for regulated industries.

### Core features

- Client-side zero-knowledge AES-256 and RSA file encryption
- Encrypted file workspace and folder sharing ('tresors') with granular roles
- Secure file sharing via expiring, password-protected links with download limits
- Virtual Data Rooms (Tresorit Engage) with dynamic watermarking and activity tracking
- Digital signature workflows (Tresorit eSign)
- Cross-device synchronization and local file manager mounting
- Admin compliance controls, remote device wipes, and audit logging

## The business

### Pricing

- Basic: Free
- Professional: $24/mo
- Business: $18/user/mo

### Funding

$18M raised.
- Seed (2012)
- Series A - $3M (2014)
- Series B - €11.5M (~$13.5M) (2018)
Investors: 3TS Capital Partners, PortfoLion, Euroventures, LogMeIn founders

Founded 2011.
Team size: Mid-size (Acquired by Swiss Post in 2021).

## The hard parts

- Zero-knowledge key management where decryption keys never touch the server
- Writing a reliable local filesystem sync engine with block-level conflict resolution
- Real-time dynamic watermarking rendering securely over confidential documents
- Building robust cross-platform desktop drivers and mobile apps

## How to vibe code Tresorit

### Prerequisites

- Node.js (free): Required for running the Next.js frontend and TypeScript build tooling.
- GitHub (free): Source control and CI/CD repository hosting.

### Recommended AI tools

- Claude Code: Unmatched capability for handling complex multi-file TypeScript architectures and cryptographic utility functions.
- Cursor: Essential for reviewing and refining UI components and client-side cryptographic web wrappers.

### Stack

- Frontend: Next.js
- Backend: Next.js API Routes
- Database: Turso
- Auth: better-auth
- Payments: none
- Other: Web Crypto API (SubtleCrypto for client-side AES-GCM / RSA), Tailwind CSS, Cloudflare R2

### Hosting

- Vercel (Hosting the Next.js web application frontend and API routes): $0/mo
- Cloudflare (S3-compatible R2 object storage for encrypted file blobs with zero egress fees): $0-5/mo
- Turso (Serverless edge SQLite database for user accounts and encrypted metadata): $0/mo

### Build guide

1. **Project Scaffolding and Database Schema** — Initialize the Next.js application with Tailwind CSS, configure Turso database connectivity, and implement better-auth for user credential management.

```
Scaffold a new Next.js project using App Router, TypeScript, and Tailwind CSS. Configure better-auth with email/password authentication backed by a Turso SQLite database using the `@libsql/client` driver. Create database migrations for users, encrypted workspaces ('tresors'), file metadata pointers, and shared link tokens. Ensure all metadata tables store only encrypted strings or secure hashes, never plaintext filenames or paths.
```

2. **Client-Side Zero-Knowledge Encryption Engine** — Implement browser-based cryptographic primitives using the native Web Crypto API (SubtleCrypto) for zero-knowledge key generation, derivation, and envelope encryption.

```
Build a robust client-side cryptographic utility module using the browser's Web Crypto API (`window.crypto.subtle`). Implement PBKDF2 password-based key derivation (salt + master passphrase) to generate user master keys. Implement AES-GCM 256-bit envelope encryption for file contents and RSA/AES hybrid key sharing for folder collaboration. Ensure private keys and master passphrases never leave the client browser in plaintext or touch server memory.
```

3. **Encrypted File Vault & Cloud Storage Integration** — Build the secure file upload and download pipeline that encrypts files in the browser chunk-by-chunk before pushing ciphertexts to Cloudflare R2 object storage.

```
Create a React file management interface supporting folder hierarchies ('tresors') and drag-and-drop uploads. Implement client-side chunked file encryption using the zero-knowledge utility module from Step 2. When a user uploads a file, stream the encrypted chunks directly to a Cloudflare R2 bucket via pre-signed URLs generated by Next.js API routes, ensuring the server only receives opaque binary ciphertexts.
```

4. **Secure Expiring Link Sharing & Access Control** — Develop external file sharing links with customizable expiration timestamps, download ceilings, password protection, and access tracking logs.

```
Implement a secure link-sharing subsystem. Allow users to generate unique URLs for specific encrypted files or folders with parameters for expiration dates, max download counters, and password protection. Create a public download portal page that prompts for the link password (used client-side to derive the file decryption key), verifies limits against the Turso database, and logs access telemetry (IP, timestamp, platform) securely.
```

5. **Workspace Collaboration and Audit Logging** — Build role-based permission matrices (Owner, Manager, Editor, Viewer) and tamper-evident audit trails for shared workspaces.

```
Add team workspace management with granular access control lists (ACLs). Implement user role assignments (Owner, Manager, Editor, Viewer) for each folder. Create an immutable audit log system that records workspace events (file additions, sharing link creations, permission modifications) into a dedicated database table with cryptographic verification signatures to ensure tamper resistance.
```

6. **Polishing, Error Handling, and Security Hardening** — Add comprehensive error handling, loading states, session timeouts, and security headers to complete the personal zero-knowledge vault clone.

```
Perform a comprehensive security hardening pass on the Next.js application. Add strict Content Security Policy (CSP) headers, secure HTTP-only cookies for session management, and robust client-side error handling for failed cryptographic decryptions or network drops. Build a responsive dashboard UI mirroring enterprise secure file vaults with clean dark/light mode support.
```

### Cost vs paying

**Starting costs (one-time):**

- Domain name registration: $12 one-time
- Total: ~$12 one-time

**Ongoing costs (monthly):**

- Cloudflare R2 storage & Vercel hobby hosting: $0-5/mo
- Total: ~$2/mo

- Paying for the SaaS instead: $24/mo (Professional)
- Build time: 40-60 hours
- AI tool credits: $20 (Claude Pro / Cursor Pro)
- Break-even: 1 month of paid SaaS subscription

## Sources

- [Tresorit Official Website](https://tresorit.com)
- [Tresorit Business Pricing](https://tresorit.com/pricing)