Simple encrypted text and file sharing service built with SvelteKit and Appwrite.
- End-to-end encryption using Web Crypto API (AES-256-GCM)
- Share encrypted text or files
- Auto-expiry (24 hours default, 7 days max)
- Server-side rendering with SvelteKit
- Minimal retro UI with Tailwind CSS
- Appwrite backend for storage
- Frontend: SvelteKit 2.x + Svelte 5
- Styling: Tailwind CSS 4.x
- Backend: Appwrite (BaaS)
- Encryption: Web Crypto API (AES-256-GCM, PBKDF2)
- Deployment: Vercel
cd app
pnpm install
cp .env.example .env
# Edit .env with your Appwrite credentials
pnpm devVisit http://localhost:5173
tsbin/
├── app/ # SvelteKit application (current)
│ ├── src/lib/
│ │ ├── crypto.ts # Encryption utilities
│ │ ├── utils.ts # Helpers
│ │ └── services/ # Business logic layer
│ │ ├── appwrite.ts # Appwrite client
│ │ ├── trashService.ts # DB operations
│ │ ├── uploadService.ts # Upload logic
│ │ └── decryptService.ts # Decrypt logic
│ └── src/routes/
│ ├── +page.svelte # Upload page
│ └── t/[slug]/ # Decrypt page
├── _app/ # Legacy Astro app
└── functions/ # Appwrite functions
The application follows a clean architecture with three layers:
- Services Layer (
src/lib/services/): Pure business logic, no UI dependencies - Utilities Layer (
src/lib/): Reusable crypto and helper functions - UI Layer (
src/routes/): Svelte components that use services
Upload:
- User input gets validated
- Content encrypted with Web Crypto API
- Stored in Appwrite
- URL generated
Decrypt:
- Server loads encrypted data
- Client renders UI
- User enters passcode
- Content verified and decrypted
- Content displayed
See SETUP.md for step-by-step Appwrite configuration guide.
cd app
pnpm install
cp .env.example .env
# Edit .env with your Appwrite credentials
# Follow SETUP.md to configure Appwrite
pnpm devPUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
PUBLIC_APPWRITE_PROJECT_ID=your-project-id
PUBLIC_DATABASE_ID=tsbin
PUBLIC_COLLECTION_ID=trash
PUBLIC_STORAGE_BUCKET_ID=trash-filestsbin/
├── app/ # Astro application
│ ├── src/
│ │ ├── lib/ # Utilities
│ │ │ ├── appwrite.ts # Appwrite client
│ │ │ ├── crypto.ts # Web Crypto utilities
│ │ │ └── utils.ts # Helpers
│ │ ├── pages/
│ │ │ ├── index.astro # Upload page
│ │ │ └── t/
│ │ │ └── [slug].astro # View/decrypt page
│ │ └── layouts/
│ │ └── Layout.astro # Base layout
│ └── package.json
├── functions/ # Appwrite functions
└── package.json
Deploy to Vercel and set environment variables in th
- All encryption happens client-side
- Passcodes never sent to server
- Keys derived with PBKDF2 (100,000 iterations)
- AES-256-GCM authenticated encryption
- Auto-expiry prevents long-term data exposure