A zero-friction, real-time temporary text, code, and file sharing platform built for instant cross-device transfers.
Binly solves a everyday developer & student pain point: transferring text, code snippets, or files from one device to another instantly without:
- β Signing up or logging into messaging apps (WhatsApp, Telegram, Discord)
- β Sending emails to yourself
- β Connecting physical cables or configuring SSH/FTP clients
- β Installing third-party software
- Open Binly on your phone.
- Click Create Bin and paste your code snippet or drop a file.
- Get a unique, easy-to-read 6-character Bin Code (e.g.
A7K92P). - Type
A7K92Pinto Binly on your computer or scan the generated QR code. - Access, view, edit, or copy your content instantly!
- β‘ Zero-Friction Bins: Instant clipboard creation with 6-character access codes.
- π Passwordless Ownership: Client-side
ownerTokenstored in browserlocalStoragegrants administrative controls without requiring user accounts. - π Real-Time Bidirectional Sync: Powered by WebSockets (
Socket.IO). Edits made by the owner stream instantly to all connected viewers. - β³ Ephemeral & Auto-Expiring: Bins automatically self-destruct after 15 minutes of host inactivity or disconnect to ensure privacy and server efficiency.
- π Binly FTP Service: Supports file uploads up to 100 MB via browser drag-and-drop or terminal
curlCLI commands. - π± PWA & Offline Support: Fully installable Progressive Web App with Service Worker asset caching for native-like performance.
- π¨ Glassmorphic UI & Developer Tools: Dark-mode interface featuring dynamic line gutters, copy shortcuts, connection status indicators, and modal confirmations.
- Language & Logic: Vanilla JavaScript (ES6+ Modular Component Pattern)
- Styling: Modern CSS3 (Custom Design System, Glassmorphism, CSS Grid & Flexbox)
- Real-Time Layer:
Socket.IO Client - PWA Capabilities: Web App Manifest (
manifest.json) & Service Worker (sw.js)
- Runtime & Server: Node.js & Express.js
- Real-Time Communication:
Socket.IOengine handling room-based broadcasting (bin:<CODE>) and connection lifecycle management
- Development:
better-sqlite3(Zero-config embedded SQLite) - Production Support:
pg(PostgreSQL driver for scaled multi-node deployments)
- Containerization: Docker (
Dockerfile&.dockerignore) - Development Monitor:
nodemon
Below is the annotated directory layout of the repository:
Binly/
βββ Dockerfile # Container build instructions for production
βββ Readme.md # Project documentation & developer guide
βββ binly.db # Embedded SQLite database (generated at runtime)
βββ db.js # Universal Database Abstraction Layer (SQLite & Postgres)
βββ package.json # Project manifest, dependencies, and NPM scripts
βββ package-lock.json # Locked dependency tree
βββ server.js # Node.js server, REST API endpoints, and Socket.IO events
β
βββ public/ # Public web assets (Served statically by Express)
β βββ index.html # Main single-page app HTML template
β βββ style.css # Comprehensive Glassmorphic CSS design system
β βββ manifest.json # Progressive Web App (PWA) manifest
β βββ sw.js # Service Worker script for PWA offline caching
β βββ robots.txt # Search engine indexing directives
β β
β βββ icons/ # PWA application icons & brand assets
β β βββ icon-192.svg
β β βββ icon-512.svg
β β
β βββ js/ # Frontend JavaScript application architecture
β βββ app.js # Application entry point, router, and state manager
β β
β βββ components/ # Modular UI Component Layer
β β βββ ConfirmationDialog.js # Modal dialog for destruction confirmation
β β βββ Editor.js # Main code/text input editor component
β β βββ LandingView.js # Welcome view, creation & join code inputs
β β βββ MetaBlock.js # Header metadata, status badge, & owner actions
β β
β βββ utils/ # Client Utilities & Helpers
β βββ api.js # REST API HTTP fetch wrapper
β βββ socket.js # Socket.IO connection & event handlers
β βββ toast.js # Non-blocking alert & notification toasts
β
βββ .github/ # GitHub repository templates & workflows
Follow these steps to get a local development instance of Binly up and running on your machine.
Make sure you have the following installed on your machine:
git clone https://github.com/Maanas-Krishana/Binly.git
cd Binly/BinlyInstall required backend packages:
npm installnpm run devnpm startOpen your browser and navigate to:
http://localhost:3000
π‘ Tip: Open
http://localhost:3000in two separate browser windows (or one incognito window) to test real-time Socket.IO content updates and owner disconnect notifications!
You can also run Binly in an isolated container using Docker:
# Build the Docker image
docker build -t binly .
# Run the container mapping port 3000
docker run -p 3000:3000 --name binly-app binlyNow visit http://localhost:3000 in your web browser.
| Method | Endpoint | Description | Auth Header Required |
|---|---|---|---|
| POST | /api/bins |
Create a new Bin | None |
| GET | /api/bins/:code |
Retrieve Bin content and status | owner-token (optional) |
| PUT | /api/bins/:code |
Update Bin content | owner-token (Required for owner) |
| DELETE | /api/bins/:code |
Delete Bin immediately | owner-token (Required for owner) |
| POST | /api/admin/login |
Verify Admin Secret Key | None |
| GET | /api/admin/analytics |
Fetch real-time telemetry, lines shared, & active bins | x-admin-key |
| DELETE | /api/admin/bins/:code |
Admin force termination of an active bin | x-admin-key |
// Request Body
{
"content": "function helloWorld() {\n console.log('Hello from Binly!');\n}"
}
// Response (201 Created)
{
"code": "A7K92P",
"content": "function helloWorld() {\n console.log('Hello from Binly!');\n}",
"ownerToken": "550e8400-e29b-41d4-a716-446655440000",
"expiresIn": "15m idle / disconnect"
}| Event Name | Direction | Payload / Description |
|---|---|---|
join-bin |
Client β Server | { code: "A7K92P", isOwner: true, ownerToken: "..." } |
bin-updated |
Server β Client | { content: "Updated text..." } |
owner-status-updated |
Server β Client | { ownerConnected: true / false } |
bin-deleted |
Server β Client | Emitted when owner explicitly destroys the bin |
+-----------------------------------------------------------------------+
| CREATOR BROWSER |
| |
| 1. POST /api/bins --------------------------------> Server |
| 2. Receives { code: "A7K92P", ownerToken: "UUID" } |
| 3. Stores ownerToken in localStorage: bin_owner_A7K92P = "UUID" |
+-----------------------------------------------------------------------+
|
v
+-----------------------------------------------------------------------+
| VIEWER BROWSER |
| |
| 1. Joins code "A7K92P" without ownerToken |
| 2. Server verifies ownerToken header on PUT/DELETE operations |
| 3. Read-only viewer mode enabled unless valid ownerToken presented |
+-----------------------------------------------------------------------+
Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'feat: Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Maintain clean, readable JavaScript and standard formatting.
- Ensure all existing REST endpoints and Socket events work without breaking changes.
- Provide descriptive commit messages adhering to standard conventions (e.g.
feat:,fix:,docs:,style:).
Distributed under the MIT License. See LICENSE for more information.
Created & maintained with β€οΈ by Maanas & Ranayudh.
Binly β Fast, frictionless, real-time sharing for developers everywhere.