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

> Secure Cloud Storage for Files, Photos & Documents

- Site: https://pcloud.com
- Category: Cloud Storage & Backup
- Verdict: **Serious undertaking** (45/100 vibecodeable)
- Estimated effort: 3-6 months of focused development

## Verdict

Build a web-based file browser clone with previews, but keep paying for pCloud if you need native OS drive mounting and zero-knowledge desktop sync.

Replicating a full cloud storage ecosystem is a massive engineering undertaking. While an AI coding agent can rapidly scaffold a Next.js web application with a file tree UI and object storage uploads, implementing a reliable native virtual drive (mounting remote storage as a local disk via FUSE/Dokan), handling bi-directional file synchronization conflict resolution, and managing secure client-side zero-knowledge encryption keys requires deep systems programming that AI assistance cannot magically abstract away.

### What you can't replicate

- Native OS kernel-level filesystem drivers and shell integrations
- Global infrastructure handling petabytes of user data with ultra-low egress fees
- A decade of battle-tested edge cases in file locking and offline sync

## What it does

A secure, cloud-based storage and digital asset management platform that lets users store, sync, back up, and share files, photos, and documents across multiple devices.

### Core features

- Cloud file storage and folder hierarchy management
- Virtual drive mounting and file synchronization engine
- Secure file sharing with passwords and expiration dates
- Automatic photo backup, timeline views, and map gallery
- Built-in audio and video streaming players with range requests
- Client-side zero-knowledge encryption (pCloud Crypto)

## The business

### Pricing

- Free Plan: Free — Up to 10 GB of storage via registration bonuses.
- Premium (500 GB): $48/year — Annual individual cloud storage plan.
- Premium Plus (2 TB): $96/year — Annual individual 2 TB plan.
- Lifetime Plans: $179 - $350 one-time — One-time purchase lifetime storage tiers.

### Funding

$3M raised.
- Series A ($3M, August 2015)

Founded 2013.
Team size: 60+.

## The hard parts

- Low-level OS filesystem mounting drivers (FUSE / Dokan) for virtual drives
- Complex state synchronization, file watchers, and conflict resolution across clients
- Zero-knowledge client-side encryption key derivation and chunking architecture
- High-performance chunked byte-streaming for media players over remote storage

## How to vibe code pCloud

### Prerequisites

- Node.js (free): Required runtime for building the full-stack TypeScript web application.
- GitHub (free): Source code repository and deployment integration.
- Cursor (Free tier / $20/mo Pro): AI-native code editor to build and iterate on frontend and backend components.

### Recommended AI tools

- Cursor: Provides precise multi-file edits and iterative UI coding for the web dashboard.
- Claude Code: Handles complex backend logic scaffolding, database schema design, and API route generation from the terminal.

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui
- Backend: Next.js API Routes / Server Actions
- Database: Turso (libSQL/SQLite at the edge)
- Auth: better-auth
- Payments: None (Personal use clone)
- Other: Cloudflare R2 for S3-compatible object storage, Web Crypto API for client-side zero-knowledge encryption demos, PostHog for product analytics

### Hosting

- Cloudflare (Hosting the Next.js web application frontend and API edge workers): $0-5/mo
- Backblaze B2 (S3-compatible bulk file storage for user documents and media): ~$6/TB/mo

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize the Next.js project with Tailwind CSS, configure Turso database connection, and set up user authentication with better-auth.

```
Create a new Next.js 16 project configured with TypeScript, Tailwind CSS, and shadcn/ui components. Set up better-auth for secure email/password and OAuth authentication backed by Turso (SQLite via libSQL). Create database migrations for users, folders, and files tables. The files table must store file metadata including name, path, size, MIME type, storage key, version history, and encryption flags. Establish a clean folder structure separating app routes, server actions, and database client utilities.
```

2. **File Manager Dashboard & Folder Hierarchy** — Build the core web file manager interface featuring drag-and-drop navigation, folder creation, breadcrumbs, and list/grid views.

```
Build a responsive file manager dashboard interface in Next.js using Tailwind CSS and shadcn/ui. Implement a hierarchical folder tree view, breadcrumb navigation, and a main file grid/list display supporting multi-selection, context menus, and drag-and-drop file organization. Create server actions to handle folder creation, renaming, soft deletion into a Trash bin with 30-day retention rules, and moving items across directory paths.
```

3. **Object Storage Upload & Chunked Transfers** — Integrate S3-compatible storage (Backblaze B2 / Cloudflare R2) to handle direct file uploads with progress tracking.

```
Implement robust file upload functionality connecting Next.js API routes to S3-compatible object storage (Backblaze B2). Build a client-side upload queue component with progress bars, pause/resume capability, and support for large files. Ensure files are streamed directly or via presigned URLs to avoid server memory bottlenecks. Update the database file records upon successful upload confirmation.
```

4. **File Sharing & Secure Links** — Add sharing capabilities supporting password protection, custom expiration dates, and secure public access links.

```
Create a secure file and folder sharing module. Implement database tables and UI dialogs allowing users to generate public share links with optional password protection (hashed with bcrypt), custom expiration timestamps, and view/download permission toggles. Build a public landing page route that validates share passwords and expiration rules before streaming or rendering downloadable file payloads.
```

5. **Media Streaming & Photo Gallery** — Build an integrated media player for audio/video streaming and a photo gallery with timeline grouping.

```
Develop media viewing and streaming features within the web application. Implement an HTML5 audio player supporting podcast and music playback modes with progress persistence, and a video player handling range requests for seamless streaming. Add a dedicated Photos gallery page that groups uploaded images by timeline date extracted from EXIF metadata or upload timestamps.
```

6. **Client-Side Zero-Knowledge Encryption** — Implement client-side encryption primitives (AES-GCM / RSA) so encrypted files are processed entirely in the browser before upload.

```
Implement a zero-knowledge encryption client module using the Web Crypto API. Allow users to set a master encryption passphrase that derives a local cryptographic key using PBKDF2. Build functions to encrypt file buffers on the client side before uploading them to object storage, and decrypt them on the fly when downloading. Ensure plaintext keys and passphrases are never transmitted to or stored on the server.
```

### Cost vs paying

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

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

**Ongoing costs (monthly):**

- Cloudflare Workers & Turso: $0/mo (Free tiers)
- Backblaze B2 Object Storage (per TB): ~$6/mo
- Total: ~$6/mo

- Paying for the SaaS instead: $4/mo - $8/mo
- Build time: 80-120 hours
- AI tool credits: $20 - $40
- Break-even: N/A (Built for personal use and learning)

## Sources

- [pCloud Official Website](https://pcloud.com)
- [pCloud Pricing Plans](https://www.pcloud.com/cloud-storage-pricing-plans.html)
- [pCloud Security & Encryption](https://www.pcloud.com/encryption)