Have you ever struggled to transfer files between your PC and mobile without cables, cloud uploads, or complicated setups?
Tired of emailing yourself files or dealing with slow Bluetooth transfers?
FileShare Hub is designed to solve exactly that!
With just a browser and a shared Wi-Fi network (local - wifi doesn't have to work just local network), you can instantly upload, download, and manage files between any deviceβno cables, no accounts, no hassle.
A modern, feature-rich file sharing application for seamless file transfer between devices on the same network.
- Glass morphism design with gradient backgrounds
- Dark/Light mode with persistent theme preference
- Responsive design optimized for mobile and desktop
- Smooth animations and hover effects
- Professional typography and consistent styling
- Drag & drop interface for intuitive file uploads
- Multiple file selection (up to 10 files simultaneously)
- Real-time progress indicators during upload
- File type detection with appropriate icons
- Automatic file organization with timestamps
- QR code generation for instant mobile access
- Network IP auto-detection across platforms
- Touch-friendly interface with optimized button sizes
- Native mobile sharing integration
- Responsive file management cards
- File statistics dashboard (total files, size, types)
- Sortable file list by date, name, or size
- Quick action buttons (View, Download, Delete)
- Bulk operations with select all/clear functionality
- File preview support for common formats
- Quick options header with common actions
- One-click refresh and navigation
- Instant URL copying to clipboard
- Smart notifications for user feedback
- 5-digit access code generated on server startup
- Session-based authentication with HTTP cookies
- Persistent login until server restart
- Protected file access with authentication middleware
- Graceful session cleanup on server shutdown
- Secure file serving with authentication checks
- Backend: Node.js + Express.js
- File Handling: Multer middleware
- QR Generation: qrcode + qrcode-terminal
- Frontend: Vanilla JavaScript + Modern CSS
- Styling: CSS Grid, Flexbox, CSS Variables
- Icons: Unicode Emojis for universal compatibility
- Node.js (v14.0.0 or higher)
- npm (v6.0.0 or higher)
- Modern web browser (Chrome, Firefox, Safari, Edge)
# Clone the repository
git clone https://github.com/JiruGUtema/Sharing-File-Without-Cable-PC-Mobile.git
# Navigate to project directory
cd Sharing-File-Without-Cable-PC-Mobile
# Install dependencies
npm install# Start the application
node index.js
# Or use nodemon for development
npm run dev- Local Access:
http://localhost:1234 - Network Access:
http://YOUR_IP:1234
The server will display a beautiful ASCII art banner with:
- π 5-digit access code for secure login
- π± QR code for mobile access
- π Network URLs for easy sharing
- π‘ Helpful tips and instructions
- Visit the application β Redirected to login page
- Enter 5-digit code β Displayed in server terminal
- Access granted β Session persists until server restart
- Enjoy secure file sharing β All features unlocked
The application automatically detects your network IP and generates:
- QR codes in terminal for quick scanning
- Web-based QR codes that update dynamically
- Copy-to-clipboard functionality for easy sharing
-
Find Your IP Address:
# Windows ipconfig # macOS/Linux ifconfig # Or check the server startup message
-
Connect Devices:
- Ensure all devices are on the same Wi-Fi network
- Scan the QR code or visit the network URL
- Start sharing files instantly!
FileShare-Hub/
βββ index.js # Main server file
βββ uploads/ # File storage directory
βββ utils/ # Utility modules
β βββ styles.js # CSS styles
β βββ script.js # Client-side JavaScript
β βββ homePage.js # Homepage template
β βββ getFiles.js # File listing logic
β βββ uploadFiles.js # Upload success page
βββ package.json # Dependencies and scripts
βββ README.md # Project documentation
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/login |
Login page with 5-digit code input | β |
POST |
/auth |
Authentication endpoint | β |
GET |
/ |
Homepage with upload interface | β |
POST |
/upload |
Handle file uploads (max 10 files) | β |
GET |
/files |
File manager with statistics | β |
GET |
/qr |
Generate QR code for network access | β |
GET |
/uploads/:filename |
Serve uploaded files | β |
POST |
/delete |
Delete specific files | β |
# Optional: Create .env file
PORT=1234 # Server port (default: 1234)
UPLOAD_LIMIT=10 # Max files per upload
MAX_FILE_SIZE=50MB # Maximum file size- Port Configuration: Change
PORTconstant inindex.js - Upload Limits: Modify multer configuration
- Styling: Update CSS variables in
utils/styles.js - File Storage: Customize upload directory path
- 5-digit access code generated randomly on startup
- Session-based authentication with secure HTTP cookies
- Persistent login across browser sessions
- Automatic session cleanup on server shutdown
- Protected routes requiring authentication
- Authenticated file access - all files require login
- File type validation and sanitization
- Upload size limits to prevent abuse
- Timestamp-based naming to avoid conflicts
- Local network restriction (no external access)
- Input validation and error handling
- Cookie-based sessions with 24-hour expiration
- Graceful shutdown destroys all active sessions
- Memory-based storage - no persistent session data
- Cross-page authentication - login once, access everywhere
- Lightweight: ~2MB total package size
- Fast uploads: Optimized multer configuration
- Efficient rendering: Minimal DOM manipulation
- Memory friendly: Streaming file operations
- Mobile optimized: Touch-friendly interactions
- Secure sessions: Cookie-based authentication
- Quick startup: Instant 5-digit code generation
Port Already in Use:
# Kill process using port 1234
lsof -ti:1234 | xargs kill -9
# Or change port in index.js
const PORT = 3000; // Use different portNetwork Access Issues:
- Check firewall settings
- Ensure devices are on same network
- Verify IP address is correct
- Try disabling VPN if active
Upload Failures:
- Check available disk space
- Verify file size limits
- Ensure uploads directory exists
- Check file permissions
Authentication Issues:
- Check the 5-digit code in server terminal
- Clear browser cookies if login fails
- Restart server to generate new access code
- Ensure JavaScript is enabled for session handling
File Access Denied:
- Login required for all file operations
- Check if session has expired
- Re-authenticate if redirected to login page
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Express.js team for the robust web framework
- Multer developers for file upload handling
- QRCode library for seamless QR generation
- Open source community for inspiration and support
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π§ Contact: jirudagutema@gmail.com
Made with β€οΈ for seamless file sharing
β Star this repo β’ π Report Bug β’ β¨ Request Feature