Project Overview
We live in a world where sharing a file often means logging into a cloud provider, uploading, changing permissions, and emailing a massive link. ShareX simplifies this process down to its essence: Upload a file, get a 6-digit code, share the code.
Inspired by services like SendAnywhere, ShareX is a peer-to-peer (or relay-assisted) file sharing web application designed for instant, ad-hoc transfer. It prioritizes speed and ephemeral security—files are not meant to live forever, they are meant to be moved now.
The Challenge
Simplicity vs. Security: How do we make file sharing effortless while ensuring that unauthorized users can't guess the codes? A 6-digit code space is relatively small (1 million combinations).
Cross-Device Compatibility: Users often want to move a file from their phone to their laptop. The app needed to work seamlessly across different browsers, operating systems, and network conditions without installing native apps.
Technical Solution
The frontend is built with React, employing a minimal aesthetic to reduce cognitive load. The core mechanic relies on a robust backend signaling server (simulated or real depending on deployment) that pairs the "Sender" and "Receiver" via the 6-digit code.
- Code Generation Algorithm: To prevent brute-force attacks on the 6-digit codes, I implemented rate limiting and short time-to-live (TTL) for every generated code. Codes expire automatically after 10 minutes or after a successful download.
- Progressive Web App (PWA) Features: I utilized Service Workers to allow the app to load instantly even on flaky networks. The UI provides real-time feedback (transfer progress bars, success notifications) which is crucial for user trust during file operations.
- State Management: Managing the upload state (Idle -> Handshaking -> Uploading -> Completed) required a finite state machine approach to prevent UI bugs, such as a user trying to upload two files at once or canceling mid-transfer.
Results & Impact
ShareX demonstrates the ability to build functional, utility-driven web applications that solve daily problems. It highlights skills in algorithm design (code generation), network logic (file streams), and user-centric product design. It shows that I can build tools that people actually want to use.