Skip to content

Repository files navigation

BunnyDrive

A simple Google Drive style web app for managing files on IPFS, with optional password encryption.

Built with:

  • Next.js (static export)
  • TypeScript
  • pnpm
  • Tailwind CSS
  • shadcn/ui

Features (MVP)

  1. Upload files to IPFS (optional encryption)
  2. Library of uploaded CIDs (local index, backup/restore)
  3. Preview images from the gateway
  4. Encrypt before upload with a password/secret (AES-256-GCM)

Encryption is optional. Secrets never leave the browser; only ciphertext (or plain bytes) is pinned to IPFS.

Project layout

bunnydrive/
  src/
    app/               Pages and layout
    components/        UI (shadcn + BunnyDrive shell)
    lib/               crypto, ipfs, storage helpers
  out/                 Static build output (after pnpm build)
  public/              Static assets

Prerequisites

  • Node.js 20+
  • pnpm

IPFS node (for uploads)

Run a local Kubo node (or any compatible API):

ipfs daemon

Default API: https://ipfs-gateway.bunnyboard.xyz
Default gateway: https://ipfs-gateway.bunnyboard.xyz/ipfs

Browser CORS

Browsers block calls to the local IPFS API unless CORS is enabled:

ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://localhost:3000", "http://127.0.0.1:3000"]'
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST", "GET"]'
# restart the daemon after changing config

Or point IPFS API URL in app settings at a remote pinning API that allows CORS.

Setup

pnpm install

Develop

pnpm dev

Open http://localhost:3000

Build and deploy

pnpm build

Output: out/

Preview locally:

pnpm preview

Deploy out/ to any static host (Cloudflare Pages, Netlify, GitHub Pages, S3, etc.).

Docker

docker build -t bunnydrive .
docker run --rm -p 8080:80 bunnydrive

Open http://localhost:8080

Settings

In the app gear menu:

Setting Description
IPFS API URL Kubo HTTP API for uploads
Gateway URL HTTP gateway for downloads
CID version CIDv1 (default, baf...) or CIDv0 (Qm...)

How the four core ops work

Feature Behavior
Upload Read file -> optional encrypt -> POST /api/v0/add on Kubo -> store CID + metadata locally
Library Local metadata index; open CID on gateway; image preview
Encrypt PBKDF2 (250k iters, SHA-256) -> AES-256-GCM. Magic header BDVE

Local file list is stored in localStorage (metadata only). Content lives on IPFS.

Scripts

Script Description
pnpm dev Next.js dev server
pnpm build Static export to out/
pnpm preview Build + serve out/ on port 3000
pnpm lint ESLint
pnpm start Next start (not used for static export hosting)

License

MIT

About

web-based files manager on IPFS, optional password encryption

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages