⚡ Lightning Fast • Zero Setup • LAN Powered
🎯 Features • 🚀 Quick Start • 📖 Documentation • 🛠️ API Reference • 🤝 Contributing
🪟 Windows Users
# Download and extract the project
# Double-click run.bat
# Browser opens automatically - You're ready! 🎉Requirements: Python 3.8+ (auto-installed if missing)
🐧 Linux/macOS Users
# Clone repository
git clone https://github.com/yadavnikhil03/lan-dropspot.git
cd lan-dropspot
# One-line setup
chmod +x run.sh && ./run.shRequirements: Python 3.8+, pip
🐳 Docker Deployment
# Pull and run
docker run -p 8000:8000 -v $(pwd)/uploads:/app/uploads yadavnikhil03/lan-dropspot
# Or with docker-compose
docker-compose up -dgraph TB
A[Client Browser] -->|WebSocket| B[FastAPI Server]
B --> C[File Storage]
B --> D[QR Generator]
E[Mobile Device] -->|Scan QR| A
F[Other Devices] -->|HTTP API| B
📤 File Upload
POST /api/upload
Content-Type: multipart/form-data
# Request
files: <file1>, <file2>, ...
# Response
{
"files": [
{
"id": "uuid-string",
"name": "document.pdf",
"size": 1024576,
"expires_at": "2025-01-14T15:30:00Z"
}
]
}📋 List Files
GET /api/files
# Response
{
"files": [...],
"total": 5,
"server_ip": "192.168.1.100"
}⬇️ Download File
GET /api/download/{file_id}
# Response: File stream with appropriate headers
Content-Disposition: attachment; filename="document.pdf"
Content-Type: application/pdf// Connection events
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
switch(data.type) {
case 'file_uploaded': // New file available
case 'file_downloaded': // File access logged
case 'file_expired': // File auto-removed
case 'server_status': // Server health update
}
}# Server Configuration
export LAN_DROPSPOT_PORT=8000
export LAN_DROPSPOT_HOST=0.0.0.0
export LAN_DROPSPOT_DEBUG=false
# File Management
export FILE_EXPIRY_MINUTES=30
export MAX_FILE_SIZE_MB=100
export CLEANUP_INTERVAL_MINUTES=30
# Security
export ENABLE_CORS=true
export ALLOWED_ORIGINS="*"# config.yaml
server:
host: "0.0.0.0"
port: 8000
debug: false
files:
expiry_minutes: 30
max_size_mb: 100
cleanup_interval: 30
storage_path: "./uploads"
security:
cors_enabled: true
allowed_origins: ["*"]
rate_limiting: true# Clone repository
git clone https://github.com/yadavnikhil03/lan-dropspot.git
cd lan-dropspot
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/macOS
# venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements-dev.txt
# Run in development mode
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000# Run test suite
pytest tests/ -v
# Coverage report
pytest --cov=backend tests/
# Load testing
locust -f tests/load_test.py --host=http://localhost:8000# Memory usage
python -m memory_profiler backend/main.py
# Profile API endpoints
python -m cProfile -o profile.stats backend/main.py🐳 Docker Production
# Build production image
docker build -t lan-dropspot:production .
# Deploy with docker-compose
docker-compose -f docker-compose.prod.yml up -d
# Scale horizontally
docker-compose up --scale app=3☁️ Cloud Deployment
# AWS ECS
aws ecs create-cluster --cluster-name lan-dropspot
aws ecs register-task-definition --cli-input-json file://task-definition.json
# Kubernetes
kubectl apply -f k8s/
kubectl get services lan-dropspot# Health check endpoint
curl http://localhost:8000/health
# Metrics (Prometheus format)
curl http://localhost:8000/metrics
# Logs
docker logs lan-dropspot --follow- 🍴 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
- Follow PEP 8 for Python code
- Write comprehensive tests for new features
- Update documentation for any API changes
- Use conventional commits for clear history
🔧 Common Issues
# Check Python version
python --version # Should be 3.8+
# Verify port availability
netstat -tulpn | grep 8000
# Install dependencies
pip install -r requirements.txt# Check firewall
sudo ufw allow 8000 # Linux
netsh advfirewall firewall add rule name="LAN DropSpot" dir=in action=allow protocol=TCP localport=8000 # Windows
# Verify network interface
ip addr show # Linux
ipconfig # WindowsThis project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Nikhil Yadav
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
🚀 Made with ❤️ by Nikhil Yadav