Easy LAN File Sharing Made Simple
Share files seamlessly across your local network with drag-and-drop simplicity, QR code access, and real-time updates.
Features β’ Quick Start β’ Documentation β’ Contributing
- π Drag & Drop Uploads - Intuitive file upload with progress tracking
- β¬οΈ Instant Downloads - Quick file retrieval from any connected device
- π± QR Code Access - Scan to connect from mobile devices instantly
- π Real-Time Sync - WebSocket-powered live updates across all clients
- π Host/Client Approval - Host authorizes all client connections
- π PIN Protection - Global and per-file PIN authentication
- π Secure Filenames - Automatic sanitization prevents path traversal
- π‘οΈ Rate Limiting - Built-in protection against abuse
- π Zeroconf Discovery - Auto-discover WifiX servers on local network (mDNS/Bonjour)
- π Dark Mode - Toggle between light and dark themes
- ποΈ Safe Deletion - Confirmation modals prevent accidental removals
- π Upload Progress - Real-time feedback during file transfers
- πΎ File Persistence - Files remain until explicitly deleted
- Python 3.8 or higher
- Node.js 16 or higher
- npm or yarn
# Clone repository
git clone https://github.com/yourusername/WifiX.git
cd WifiX
# Backend setup
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r backend/requirements.txt
# Frontend setup
cd frontend\react
npm installTerminal 1 - Backend:
python backend/app.py
# Server runs on http://localhost:5000Terminal 2 - Frontend:
cd frontend\react
npm run dev
# Development server on http://localhost:5173- Host Dashboard:
http://localhost:5173 - Client Access: Scan QR code or use displayed IP address
- Mobile: Scan QR code from any mobile device on same network
π₯οΈ Desktop App (Recommended for Personal Use):
WifiX can be packaged as a standalone desktop application using Tauri:
# Quick start (after Rust installation)
.\START_TAURI.ps1
# Or manually:
cd frontend\react
npm run tauri:dev # Development mode
npm run tauri:build # Build .exe installerπ± Benefits:
- β Single .exe file (~5 MB)
- β No hosting costs
- β Python backend auto-starts
- β No internet required
- β Users just download and run
π Desktop app guide: TAURI_DESKTOP_APP.md
βοΈ Cloud Deployment (For Public Access):
For production deployment with Docker, systemd, HTTPS, and more, see DEPLOYMENT.md.
Quick production options:
# Docker deployment
docker-compose up -d
# Linux systemd service
sudo systemctl start wifux
# Production server (Gunicorn)
gunicorn -k eventlet -w 1 --bind 0.0.0.0:5000 backend.app:appπ Full deployment guide: DEPLOYMENT.md - Covers Docker, nginx, HTTPS, Zeroconf, monitoring, and more.
| Layer | Technology | Purpose |
|---|---|---|
| Backend | Flask 2.3.2 | Web framework |
| Flask-SocketIO | WebSocket support | |
| Flask-Limiter | Rate limiting | |
| Zeroconf | Network service discovery | |
| Werkzeug | Security utilities | |
| Frontend | React 19 | UI framework |
| Vite | Build tool & dev server | |
| Tailwind CSS + DaisyUI | Styling | |
| Socket.IO Client | Real-time communication | |
| Communication | WebSocket | Live updates |
| REST API | File operations |
WifiX/
βββ backend/
β βββ app.py # Flask backend server
β βββ requirements.txt # Python dependencies for backend
βββ backend/uploads/ # File storage directory
βββ frontend/
β βββ react/
β βββ src/
β β βββ components/ # React components
β β β βββ Header.jsx
β β β βββ ServerControl.jsx
β β β βββ FileUploadZone.jsx
β β β βββ FileList.jsx
β β β βββ DeleteModal.jsx
β β β βββ ConnectionApprovalModal.jsx
β β β βββ ConnectionStatus.jsx
β β β βββ UploadErrorModal.jsx
β β β βββ DarkModeToggle.jsx
β β β βββ Footer.jsx
β β βββ hooks/ # Custom React hooks
β β β βββ useSocket.js
β β β βββ useFileUpload.js
β β β βββ useAuth.js
β β βββ utils/ # Utility functions
β β β βββ api.js
β β β βββ constants.js
β β βββ App.jsx # Main React component
β β βββ main.jsx # React entry point
β βββ .env # Environment variables
β βββ package.json # Node dependencies
β βββ vite.config.js # Vite configuration
βββ README.md
-
Create and activate Python virtual environment:
cd D:\Projects\WifiX python -m venv .venv .\.venv\Scripts\Activate.ps1 -
Install Python dependencies:
pip install -r backend/requirements.txt
-
Configure environment variables (optional):
# Create a .env file or set environment variables $env:ACCESS_PIN = "1234" # Enable PIN authentication $env:CORS_ORIGINS = "http://localhost:5173,http://localhost:5174" $env:FILE_TTL_SECONDS = "0" # 0 = files persist until deleted $env:SECRET_KEY = "your-secret-key" # Session encryption key
-
Run the Flask backend:
python backend/app.pyBackend will start on
http://localhost:5000
Note: uploaded files are now stored in backend/uploads/. During the migration the original top-level uploads/ directory was copied and the original was renamed to uploads_backup_20251111154617/ in the repo root as a safety backup β delete it only after you verify everything is present.
-
Navigate to frontend directory:
cd frontend\react
-
Install Node dependencies:
npm install
-
Configure environment variables: Create or edit
.envfile:VITE_API_URL=http://localhost:5000 -
Run the Vite dev server:
npm run dev
Frontend will start on
http://localhost:5173(or 5174 if 5173 is in use).
Comprehensive documentation is available in the docs/ folder:
- Features Guide - Detailed feature documentation
- Usage Guide - How to use WifiX
- API Documentation - REST & WebSocket API reference
- Architecture - System design and architecture
- Troubleshooting - Common issues and solutions
- Contributing Guide - How to contribute
- Changelog - Version history
- Security Policy - Security guidelines
WifiX/
βββ backend/
β βββ app.py # Flask application
β βββ requirements.txt # Python dependencies
β βββ uploads/ # File storage (gitignored)
βββ frontend/
β βββ react/
β βββ src/
β β βββ components/ # React components
β β βββ hooks/ # Custom hooks
β β βββ utils/ # Utility functions
β β βββ App.jsx # Main app component
β β βββ main.jsx # Entry point
β βββ package.json # Node dependencies
β βββ vite.config.js # Vite configuration
βββ docs/ # Documentation
β βββ INDEX.md # Documentation index
β βββ ARCHITECTURE.md # System architecture
β βββ TROUBLESHOOTING.md # Problem solving
β βββ USAGE.md # Usage guide
βββ CONTRIBUTING.md # Contribution guidelines
βββ CHANGELOG.md # Version history
βββ SECURITY.md # Security policies
βββ API.md # API documentation
βββ LICENSE # MIT License
βββ README.md # This file
Backend (backend/.env or system):
ACCESS_PIN=1234 # Optional: Enable PIN authentication
SECRET_KEY=your-secret-key-here # Session encryption (auto-generated if not set)
CORS_ORIGINS=http://localhost:5173 # Allowed origins (comma-separated)
FILE_TTL_SECONDS=0 # File auto-cleanup (0=disabled)
CLEANUP_INTERVAL_SECONDS=60 # Cleanup check intervalFrontend (frontend/react/.env):
VITE_API_URL=http://localhost:5000 # Backend API URLModify in backend/app.py:
app.config['MAX_CONTENT_LENGTH'] = 1024 * 1024 * 1024 # 1GB defaultWifiX includes multiple security layers:
- Host Approval - All client connections require host authorization
- PIN Authentication - Optional global and per-file PIN protection
- Rate Limiting - Prevents abuse (10 uploads/min, 20 deletes/min)
- Secure Filenames - Automatic sanitization prevents path traversal
- Session Management - Secure, HTTP-only cookies
- CORS Protection - Configurable origin restrictions
For security issues, see SECURITY.md.
| Method | Endpoint | Description | Rate Limit |
|---|---|---|---|
GET |
/api/files |
List all files | - |
POST |
/api/upload |
Upload file | 10/min |
DELETE |
/api/delete/<filename> |
Delete file | 20/min |
GET |
/api/download/<filename> |
Download file | - |
GET |
/api/info |
Server info | - |
Client β Server:
become_host- Register as hoststop_host- Stop hostingrequest_connect- Request connectionapprove_request- Approve client (host only)deny_request- Deny client (host only)
Server β Client:
file_uploaded- New file availablefile_deleted- File removedincoming_request- Connection request (host)request_approved- Connection approvedrequest_denied- Connection denied
See API.md for complete documentation.
- Python 3.8+
- Node.js 16+
- Git
# Clone repository
git clone https://github.com/yourusername/WifiX.git
cd WifiX
# Backend
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r backend/requirements.txt
# Frontend
cd frontend\react
npm installTerminal 1 - Backend (with auto-reload):
$env:FLASK_ENV="development"
python backend/app.pyTerminal 2 - Frontend (with HMR):
cd frontend\react
npm run devcd frontend\react
npm run build
# Build output in dist/ folderSee CONTRIBUTING.md for contribution guidelines. npm run build npm run preview # Preview production build
### Lint Frontend Code
```powershell
cd frontend\react
npm run lint
- β Environment-based CORS configuration
- β Comprehensive logging system
- β Enhanced error handling with user feedback
- β Rate limiting on critical endpoints
- β File size validation (100MB limit)
- β Modular component architecture
- β Custom React hooks for reusability
- β Constants file for configuration
- β Improved error messages
- β Delete confirmation modal
- β Upload progress tracking
- β File persistence (no auto-cleanup by default)
- TypeScript migration for better type safety
- Unit tests (pytest for backend, vitest for frontend)
- Docker support for easy deployment
- HTTPS support for production
- Toast notifications (react-hot-toast)
- Virtual scrolling for large file lists
- File search and filtering
- Multi-file upload
- Folder support
- Download all as ZIP
For detailed troubleshooting, see docs/TROUBLESHOOTING.md.
Port Already in Use:
- Vite auto-selects next available port (5174, 5175...)
- Update
CORS_ORIGINSin backend if needed
Socket.IO Connection Errors:
- Ensure
CORS_ORIGINSincludes frontend dev server URL - Check firewall/antivirus settings
- Verify backend is running
Upload Failures:
- Check file size limit (1GB default)
- Verify rate limits (10 uploads/min)
- Check backend logs for errors
Files Not Showing:
- Verify PIN authentication (if enabled)
- Check host approval (if client)
- Refresh browser or reconnect
We welcome contributions! Please see CONTRIBUTING.md for:
- Code of Conduct
- Development setup
- Coding standards
- Pull request process
- Issue guidelines
Quick contribution steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- β Core file sharing functionality
- β Host/Client approval system
- β PIN authentication
- β QR code generation
- β Real-time updates via WebSocket
- β Dark mode support
- β Rate limiting
- Docker support (see DEPLOYMENT.md)
- Zeroconf/mDNS auto-discovery
- Database integration (SQLite/PostgreSQL)
- File search and filtering
- Batch file operations
- Enhanced mobile UI
- TypeScript migration
- Unit and integration tests
- Folder upload/download
- ZIP archive creation
- HTTPS/SSL by default
- Multi-language support
- Room codes for easy connections
See CHANGELOG.md for version history and GitHub Issues for tracking.
Built with amazing open-source tools:
- Flask - Web framework
- React - UI library
- Vite - Build tool
- Tailwind CSS - Styling framework
- DaisyUI - Component library
- Socket.IO - Real-time communication
- Lucide - Icon library
- π Documentation: Browse GitHub Pages
- π Issues: Report bugs on GitHub Issues
- π¬ Discussions: Join GitHub Discussions
- π Security: Report vulnerabilities via SECURITY.md
Made with β€οΈ for easy local file sharing
If you find WifiX useful, please β star this repository!
Contributions are welcome! Please open an issue or submit a pull request.
Note: This application is designed for trusted local networks. For production use on untrusted networks, implement additional security measures (HTTPS, stronger authentication, network isolation, etc.).