Skip to content

IshitRaj/FileBeam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileBeam 📡

Dead-simple local network file sharing. Drop files in a browser, download them on any device connected to the same WiFi. No accounts, no cloud, no dependencies.

Features

  • Drag & drop upload with a real-time progress bar
  • Instant access from any phone, tablet, or computer on your network
  • Live updates — file list refreshes automatically across all open tabs via SSE
  • Zero dependencies — pure Node.js, nothing to install
  • Clean UI — soft, readable interface that works on mobile

Quick Start

# Clone
git clone https://github.com/IshitRaj/FileBeam.git
cd filebeam

# Run (Node 18+ required, no npm install needed)
node index.js

Then open the Network URL on any device on your WiFi:

  Local   → http://localhost:3721
  Network → http://192.168.x.x:3721   ← open this on your phone

Configuration

You can change the port via an environment variable:

PORT=8080 node index.js

Or edit src/config.js directly:

module.exports = {
  PORT: 3721,          // port to listen on
  UPLOAD_DIR: ...,     // where files are saved (default: ./uploads)
  MAX_FILE_SIZE_MB: 500,
};

Project Structure

filebeam/
├── index.js          # Entry point — starts the server and prints the URL
├── package.json
├── .gitignore
│
└── src/
    ├── config.js     # All configurable constants
    ├── server.js     # Creates the http.Server instance
    ├── routes.js     # Request router + all API handlers
    ├── store.js      # File system operations (list, save, delete)
    ├── events.js     # Server-Sent Events bus for live updates
    ├── utils.js      # Helpers: IP detection, byte formatting, buffer parsing
    └── ui.js         # The entire frontend (inline HTML/CSS/JS)

API

Method Path Description
GET / Serves the web UI
GET /api/info Returns { ip, port }
GET /api/files Returns array of file metadata
POST /api/upload Upload a file (multipart/form-data)
GET /api/download/:filename Download a file
DELETE /api/delete/:filename Delete a file
GET /api/events SSE stream for live file updates

Requirements

  • Node.js 18 or higher
  • No npm packages required

License

MIT

About

Dead-simple local network file sharing. Drop files in a browser, download them on any device connected to the same WiFi. No accounts, no cloud, no dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors