ScanBy is a modern, full-stack web application designed for secure, QR-based document sharing and access. Built with a FastAPI backend and a Next.js Progressive Web App (PWA) frontend, it provides a seamless and secure experience across both desktop and mobile devices.
- QR-Based Access: Generate secure QR codes for documents to share them effortlessly.
- Progressive Web App (PWA): Installable on mobile devices with offline capabilities and a native app feel.
- High-Performance Backend: Powered by FastAPI for asynchronous request handling and high throughput.
- Modern Frontend: Built with Next.js, React 19, and Framer Motion for smooth, interactive UI animations.
- Security & Rate Limiting: Implements
slowapifor rate limiting to prevent abuse, along with strict CORS policies. - Developer Experience: Includes a custom
run.pylauncher that automatically configures local network access (WiFi IP detection) so you can instantly test on your mobile device.
- Framework: Next.js (React)
- State Management: Zustand
- Animations: Framer Motion
- PWA Support:
next-pwa - QR Code Generation:
qrcode.react - HTTP Client: Axios
- Framework: FastAPI (Python)
- Server: Uvicorn
- Rate Limiting: SlowAPI
- Database Integration: Modular structure with database connection pooling (
database.py,models,routers).
- Python 3.8+
- Node.js 18+
-
Clone the repository (if you haven't already):
git clone https://github.com/yourusername/scanby.git cd scanby -
Run the automated dev launcher: The project includes a unified launcher that sets up and runs both the backend and frontend simultaneously.
python run.py
Launcher Features:
python run.py: Starts both servers. Automatically detects your WiFi IP so you can test on your phone by scanning a local network URL.python run.py --local: Starts the servers onlocalhostonly (with Next.js Hot Module Replacement enabled).
The launcher will guide you to create the Python virtual environment if it doesn't exist.
Backend:
cd backend
python -m venv venv
# Windows: venv\Scripts\activate | Mac/Linux: source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000Frontend:
cd frontend
npm install
npm run devScanby/
├── backend/ # FastAPI backend application
│ ├── app/ # Application code (routers, models, middleware)
│ ├── requirements.txt # Python dependencies
│ └── .env.example # Backend environment variables
├── frontend/ # Next.js frontend application
│ ├── app/ # Next.js App Router
│ ├── public/ # Static assets
│ ├── package.json # Node.js dependencies
│ └── .env.example # Frontend environment variables
├── .gitignore # Global git ignores
├── run.py # Unified development server launcher
└── README.md # Project documentation
- End-to-End System Design: Demonstrates the ability to architecture and integrate a decoupled backend (FastAPI) and frontend (Next.js).
- Mobile-First & PWA: Shows knowledge of modern web capabilities (Progressive Web Apps) making it responsive and app-like.
- Security & Network Awareness: Custom launcher configures local IPs automatically for mobile testing, and the backend implements rate-limiting.