A web-based tool that extracts WiFi credentials from images and generates QR codes for easy network sharing. Last updated: April 3, 2025.
- 📷 OCR-powered WiFi credential extraction from images
- 🤖 AI-powered text analysis using Grok API
- 🔐 Secure credential handling
- 📱 Mobile-friendly interface
- 🎨 Clean, modern UI
- 📊 QR code generation for easy sharing
- ✏️ Manual entry option for direct WiFi credential input
- 🖼️ Enhanced QR code display with credential information
- Clone the repository:
git clone <repository-url>
cd wifi-qr-generator- Install dependencies:
npm install- Create a
.envfile in the root directory:
# Copy from .env.example and add your API key
GROK_API_KEY=your_api_key_here- Start the development server with live reload:
npm run dev- Open
http://localhost:8080in your browser
Create an optimized production build:
npm run buildPreview the production build locally:
npm run preview:distDeploy directly from your local machine with a single command:
npm run deploy-
Push your code to GitHub
-
Create a new project in Vercel and connect it to your GitHub repository
-
Configure environment variables in Vercel:
- Go to Project Settings → Environment Variables
- Add
GROK_API_KEYwith your API key value - Save and redeploy
-
Important deployment notes:
- The app requires camera access for mobile devices
- Ensure your deployment is using HTTPS
- The Grok API key must be properly set in Vercel environment variables
- Click "Upload Image" to select an image containing WiFi credentials
- The app will automatically:
- Extract text using OCR
- Process the text using AI to identify network name and password
- Generate a QR code
- Scan the QR code with your phone to connect to the network
See CHANGELOG.md for detailed version history.
├── index.html # Main HTML file
├── js/
│ ├── main.js # Application entry point
│ ├── init.js # Initialization logic
│ ├── dom.js # DOM element references
│ ├── navigation.js # Screen navigation
│ ├── fileHandling.js # File input handling
│ ├── ocr.js # OCR and AI processing
│ ├── credentials.js # Credential management
│ ├── qrcode.js # QR code generation
│ ├── config.js # Environment variable handling (gitignored)
│ └── load-env.js # Environment variable loader
├── icons/ # Application icons and assets
├── dist/ # Production build output (generated)
├── .env # Environment variables (gitignored)
├── .env.example # Example environment file
├── package.json # Project dependencies and scripts
└── manifest.json # PWA manifest
| Command | Description |
|---|---|
npm start |
Start the development server |
npm run dev |
Start development server with watch mode and live reload |
npm run build |
Create optimized production build in dist folder |
npm run preview:dist |
Preview the production build locally |
npm run lint |
Run ESLint to check for code quality issues |
npm run lint:fix |
Automatically fix ESLint issues when possible |
npm run generate-icons |
Generate all required app icons |
npm run deploy |
Build and deploy to Vercel in one command |
npm run analyze |
Analyze the bundle size with source-map-explorer |
- Tesseract.js - OCR processing
- Grok API - AI-powered text analysis
- QRCode.js - QR code generation
- dotenv - Environment variable management
- esbuild - Fast JavaScript bundler
- PostCSS with cssnano - CSS optimization
- live-server - Development server with live reload
- npm-watch - File watcher for development
- html-minifier - HTML optimization
- ESLint - Code quality and standards
- Vercel CLI - Deployment tool
- API keys are stored in
.env(local) and Vercel environment variables (production) .envandconfig.jsare in .gitignore to prevent accidental commits- Credentials are processed locally in the browser
- No server-side storage of sensitive information
- HTTPS required for all deployments
- Chrome (recommended)
- Firefox
- Safari
- Edge
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a pull request
MIT License - feel free to use and modify for your own projects!