Skip to content

Yogesh1290/Local-Share

Repository files navigation


LocalShare
LocalShare

Simple, zero-configuration WiFi file sharing across all your devices.

Key FeaturesHow To UseArchitectureLicense

Production Ready

LocalShare is a modern, lightweight, browser-based native file sharing tool. It allows you to drag-and-drop any file to any device currently connected to your local WiFi router. It uses a Node.js network backend paired with a minimalist, responsive Vite/Tailwind v4 frontend.

LocalShare acts as a central hub (server-mediated transfer). The device running the application hosts the files, and other devices on the network interact via standard HTTP uploads and downloads.

No cloud servers. No compression. No account creation.

Warning

No Authentication: Anyone on your local WiFi network who has the URL or scans the QR code can access and download the files you share. This is perfectly safe for a home or private office network, but use caution on public WiFi (e.g. coffee shops).


⚡ Key Features

  • Zero Setup: Simply double-click start.bat (Windows) or start.sh (Mac/Linux). It automatically downloads its own requirements, builds the UI, and spins up.
  • Smart Device Detection: Automatically grabs your computer's real physical IP address (bypassing virtual adapters, Docker masks, or VPNs) so you can directly scan its QR code to connect your phone instantly.
  • Offline Hosted Files: Any file sent to the server stays pinned to the Server Files directory until explicitly downloaded or permanently deleted by the user.
  • Seamless Downloading: Standard HTTP-based transfers bypassed with native download tags. WebSockets are strictly used for lightweight "file-ready" notifications and real-time device listing, not heavy lifting.
  • Beautiful Minimal Setup: Single-page architecture crafted purely with HTML, Vanilla JavaScript, and Tailwind CSS.
  • Mobile First: Built tightly so that opening it on your phone feels like a premium native mobile application.

🚀 How To Use

  1. Make sure Node.js (v18+) is installed on your computer.
  2. Clone this repository:
git clone https://github.com/Yogesh1290/Local-Share.git
cd Local-Share

# Install dependencies and start the native networking server
npm install
npm run dev:server
  1. Boot the environment automatically (Alternative GUI method):
  • Windows: Double-click start.bat
  • Mac/Linux: Run ./start.sh
  1. A browser window will automatically open to http://localhost:8080.
  2. Point your phone's camera at the massive QR code on the screen, and both devices will immediately see each other.
  3. Drag files onto the screen.

🗺️ Roadmap & Future Features

This project is deeply committed to remaining lightweight and bloat-free. However, the following high-impact features are actively planned (or open for PRs!):

  • PIN/Password Protection: A simple generated 4-digit PIN on the server terminal to prevent unauthorized LAN snooping.
  • Unified Config File (.env): Allowing power users to easily customize the 8080 port, default uploads/ path, and storage limits.
  • Auto-Cleanup Routines: Implement chronological garbage collection for abandoned files, with a "Pin/Keep Forever" toggle on the UI.
  • Upload Progress Bars: Visual bytes-transferred chunking for massive files (e.g. 4GB+ Movies) so the UI doesn't feel frozen during transfer.

(Check out our GitHub Issues if you'd like to contribute any of these!)


🧠 Architecture Overview

To accommodate easy code-contribution, the project is structured as a tightly-coupled monorepo:

LocalShare/
├── .github/          # OSS Contribution/Issue templates
├── client/           # The entire Frontend
│   ├── index.html    # Static application shell
│   ├── vite.config.js
│   └── src/          
│       ├── main.js   # Logic bindings and event flow
│       ├── ui.js     # Component generators and toasts
│       ├── utils.js  # Formatters, parsers and metadata
│       └── style.css # Tailwind configuration
├── server/           # The entire Backend
│   ├── index.js      # Express API, WebSockets, Local IP sniffers
│   └── uploads/      # Physical hard-disk storage of Shared Files
├── start.bat         # Windows lifecycle script (Install, Build, Run)
└── start.sh          # UNIX lifecycle script

Build Lifecycle

Because client/ and server/ operate in tandem, we do not require users to run complex build tasks. The .bat / .sh scripts automatically call npx vite build against the client directory. This effortlessly transcompiles the HTML and Javascript, drops them cleanly into server/public, and instructs Express to dynamically host them natively.

Dedicated Development

If you are developing or simply prefer executing node manually from a remote shell without invoking the startup scripts, deploy using the official node routine:

# Start the production server purely via Node
npm run dev:server

📄 License

MIT

Built for friction-less productivity. No Apple ecosystem limitations, no Android ecosystem limitations. Just local TCP/IP networking doing what it was always designed to do.

About

File sharing over local WiFi with no cloud, no accounts, and direct device-to-device transfer.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors