GitHunt
MO

A self-hosted file storage and management application with a modern, Mac-like interface. Access your files from any device on your local network.

๐Ÿ“ฆ LocalBox

A self-hosted file storage and management application with a modern, Mac-like interface. Access your files from any device on your local network.

LocalBox Node.js React

๐Ÿ“ธ Screenshots

LocalBox on Old Laptop

LocalBox running on a repurposed old laptop as a home server

Dashboard

Dashboard - File list with sidebar navigation

Grid View Upload Dialog
Grid View Upload
Image Preview Video Preview
Image Preview Video Preview

โœจ Features

File Management

  • ๐Ÿ“ค Resumable Uploads - TUS protocol for large file uploads with pause/resume
  • ๐Ÿ“ Folder Support - Create subfolders, navigate with breadcrumbs
  • ๐Ÿ” Search - Real-time file search
  • ๐Ÿ“‹ Bulk Actions - Select multiple files for download, move, or delete
  • โœ๏ธ Rename & Move - Organize files across categories and folders

Preview & View

  • ๐Ÿ–ผ๏ธ Image Preview - View images with keyboard navigation
  • ๐ŸŽฌ Video Player - Stream videos directly in browser
  • ๐ŸŽต Audio Player - Play audio files
  • ๐Ÿ“„ PDF Viewer - View documents inline
  • ๐Ÿ“Š Grid/List View - Toggle between thumbnail grid and detailed list

UI/UX

  • ๐ŸŒ™ Dark/Light Theme - Switch themes with persistence
  • ๐Ÿ“ฑ Responsive - Works on desktop, tablet, and mobile
  • ๐Ÿ–ฑ๏ธ Drag & Drop - Drop files anywhere to upload
  • โšก Fast - Optimized with lazy loading and caching

System

  • ๐Ÿ’พ Storage Stats - Real-time disk usage display
  • ๐Ÿง  RAM Monitor - Live memory usage indicator
  • ๐Ÿท๏ธ Auto-categorize - Files sorted by type (images, videos, documents, etc.)

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/Mohammed-Asfar/localbox.git
cd localbox

# Install backend dependencies
cd localbox-backend
npm install

# Install frontend dependencies
cd ../localbox-frontend
npm install

Development

# Terminal 1: Start backend (port 4000)
cd localbox-backend
npm start

# Terminal 2: Start frontend (port 5173)
cd localbox-frontend
npm run dev

Open http://localhost:5173 in your browser.

Production

# Build frontend
cd localbox-frontend
npm run build

# Start backend (serves frontend from dist/)
cd ../localbox-backend
npm start

Access at http://your-ip:4000

๐Ÿ“ Project Structure

localbox/
โ”œโ”€โ”€ localbox-backend/
โ”‚   โ”œโ”€โ”€ index.js          # Express server with TUS upload
โ”‚   โ”œโ”€โ”€ categorizer.js    # File type detection
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ localbox-frontend/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ App.jsx       # Main application
โ”‚   โ”‚   โ””โ”€โ”€ components/   # React components
โ”‚   โ””โ”€โ”€ package.json
โ””โ”€โ”€ README.md

โš™๏ธ Configuration

Environment Variables

Variable Default Description
PORT 4000 Server port
STORAGE_DIR ~/Downloads/localboxstorage File storage path

Categories

Files are auto-categorized by extension:

Category Extensions
Images jpg, png, gif, webp, svg...
Videos mp4, webm, mov, mkv, avi...
Audio mp3, wav, flac, m4a, ogg...
Documents pdf, doc, docx, txt, md...
Archives zip, rar, 7z, tar, gz...
Others Everything else

๐Ÿ”Œ API Endpoints

Method Endpoint Description
GET /api/files List files
GET /api/stats Storage & RAM stats
GET /api/folders/:cat List folders
POST /api/folders Create folder
DELETE /api/files/:cat/:path Delete file
PUT /api/files/:cat/:path Rename file
PATCH /api/files/:cat/:path/move Move file
POST /files TUS upload endpoint

๐Ÿ› ๏ธ Tech Stack

  • Frontend: React 18, Vite, Tailwind CSS, Lucide Icons
  • Backend: Node.js, Express
  • Upload: TUS Protocol (@tus/server)
  • UI Library: @uppy/react for upload dashboard

๐Ÿ“œ License

MIT License - feel free to use for personal or commercial projects.

๐Ÿค Contributing

Contributions welcome! Please open an issue or PR.


Made with โค๏ธ for local-first file management

Mohammed-Asfar/localbox | GitHunt