Skip to content
SamWang8891Public

About

A web-based application that allows users to share text and files in real-time through secure, encrypted sessions.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Logo

Clippy

A web-based application that allows users to share text and files in real-time through secure, encrypted sessions.

台灣繁體中文 請按這


Table of Contents 📖


Features ✨

Tired of sharing text / files across different computers? Try this clippy!

  • Session-based sharing: Type an ID and press Connect — the server decides: a live ID joins that session, a free one creates it under that name, and an empty field creates one with a generated ID. Each address, or each IPv6 /64, may create 3 sessions per 15 seconds (CREATE_RATE_LIMIT, CREATE_RATE_WINDOW_SECONDS); joining is never limited. Behind a proxy other than the bundled nginx, list it in TRUSTED_PROXIES so callers are told apart. Server-minted IDs leave out i, o, e, 0 and 1, so an ID survives being read aloud or copied by eye; name your own and any of a-z0-9 is fair game. The ID field is a password input so the OS drops out of a Chinese IME on focus — the value stays visible — and a share link pasted into it leaves just its ID
  • Public Clippys: The padlock beside the QR code lists a session on the home page or keeps it private, where joining takes the ID; every session starts private. The pencil beside it decides who can change the content: only the host, which is where every session starts, or everyone in it. While only the host can edit, curl uploads are refused and the host seat is never handed on while its holder is offline. The five newest published sessions appear on the home page with name, ID, creation time and last update, and they appear and disappear live over a WebSocket
  • Encrypted payloads: Each session uses a 256-bit AES-GCM key derived client-side from the connection ID (SHA-256 KDF). All block content is encrypted before it leaves the browser, so the backend only ever sees ciphertext. The server issues the ID and could derive the key too — this is encrypted-at-rest and on-the-wire, not strict end-to-end against a malicious server
  • Real-time collaboration: See blocks appear instantly when other users create them
  • File uploads: Support for small file uploads. Drop one or several files anywhere on the session page and they upload straight away — no need to open the composer first
  • Image previews: Uploaded images are decrypted in the browser and shown as thumbnails
  • Curl upload: Upload text or files from the terminal — host can enable/disable per session. It works only while everyone can edit, so turning it on with the pencil off offers to open editing first, and turning the pencil off turns curl off too, after a warning
    curl -d 'hello' https://your-host/u/SESSION_ID
    curl -F f=@file.txt https://your-host/u/SESSION_ID
  • Raw links: Generate public short links to share decrypted text or files with anyone (e.g. https://your-host/r/SESSION_ID/CODE)
  • User management:
    • Custom or random user names, remembered in local storage between visits; click your name in the header to rename yourself mid-session
    • Host can transfer host rights to other users
    • Host can control whether new users can join
  • Session persistence: Sessions remain active until destroyed by host or after 1 hour of inactivity. When one expires or is destroyed, the tab returns to the dashboard on its own instead of stopping at a warning
  • Block system: Add, edit and delete text or file blocks, similar to Jupyter notebooks, and drag them into order by the grip on their right edge (or move them with the arrow keys on it). A delete, move or edit can be taken back with Cmd/Ctrl+Z, or the Undo bar on a touch screen, for ten seconds; each step back holds that window open for five more, so several changes can be walked back in a row

Screenshots 📸

Screenshot 1

Screenshot 2

Screenshot 3


Usage 🚀

Installation ⚙️

Requires Docker and Docker Compose.

mkdir clippy && cd clippy
curl -fsSL https://raw.githubusercontent.com/SamWang8891/clippy/main/docker-compose.prod.yaml -o docker-compose.prod.yaml
curl -fsSL https://raw.githubusercontent.com/SamWang8891/clippy/main/setup.sh -o setup.sh
bash setup.sh

The script will prompt you for the base URL, port, upload size limit, and connection ID length, then start the service.

To build from source instead, see Local Development.


Local Development 🛠

Prerequisites ✅

  • Node >= 22.20.0
  • Python >= 3.12

File Structure 🗄

  • Frontend: Vite + React, in frontend/.
  • Backend: Python FastAPI, in backend/.

Running Locally 🚧

Run the frontend and backend in separate terminals with hot-reload:

# Terminal 1: backend
cd backend
cp .env.example .env
pip install -r requirements.txt  # or: uv sync
python app.py

# Terminal 2: frontend
cd frontend
npm install
npm run dev

Vite's dev server proxies /api, /ws, and /r/ to the backend at localhost:8123.

The FastAPI docs are available at http://localhost:8123/api/v2/docs.

Note: you may want to set ALLOWED_ORIGINS=* in backend/.env during development.

Building with Docker 🐳

To build and run the full Docker image locally:

docker build -t clippy .
docker run -p 8080:80 --env-file backend/.env clippy

Notes 📝

Known Bugs 🐛

  • None right now.

Issues / Bugs? 🙋‍♀️

Encounter issues or bugs? Feel free to report them in Issues and submit Pull Requests. For PR, please target dev branch.

About

A web-based application that allows users to share text and files in real-time through secure, encrypted sessions.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages