A modern, AI-powered barcode and QR code reader application built with Next.js, TypeScript, and Tailwind CSS. Features real-time camera scanning, intelligent code interpretation, and a responsive mobile-first design.
- Universal Scanning: Supports QR codes, barcodes, and 2D codes
- Real-time Detection: Instant scanning with camera feed
- AI Insights: Intelligent interpretation of scanned content
- Cross-platform: Works on desktop and mobile browsers
- PWA Ready: Installable as a Progressive Web App
- Mobile-first Design: Optimized for smartphones and tablets
- Dark/Light Themes: Automatic theme switching
- Responsive Layout: Adapts to any screen size
- Accessibility: WCAG 2.1 AA compliant
- Offline Support: Core functionality works without internet
- TypeScript: Full type safety and IntelliSense
- Modern UI: Clean, intuitive interface with Lucide icons
- Performance: Optimized with Next.js 14 and React 18
- Security: CSP headers and input validation
- Export: Download scan history as JSON/CSV
Try scanning any QR code or barcode with your device camera
Click to view screenshots
| Category | Technologies |
|---|---|
| Frontend | Next.js 14, React 18, TypeScript |
| Styling | Tailwind CSS, Lucide React Icons |
| Scanning | jsQR, react-webcam |
| State | React Hooks, Context API |
| Build | Webpack, SWC, ESLint |
| Deployment | Vercel, Docker |
Before running this project, ensure you have:
- Node.js 18.17.0 or higher
- npm 9.0.0 or higher
- Modern browser with camera support
- HTTPS (required for camera access)
git clone https://github.com/yourusername/smart-barcode-reader.git
cd smart-barcode-readernpm installnpm run devNavigate to http://localhost:3000 and grant camera permissions when prompted.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run type-check |
Run TypeScript checker |
smart-barcode-reader/
├── app/ # Next.js 14 App Router
│ ├── layout.tsx # Root layout
│ ├── page.tsx # Main scanner page
│ └── globals.css # Global styles
├── components/ # React components
│ ├── scanner/ # Camera and scanning logic
│ ├── results/ # Results display and actions
│ ├── history/ # Scan history management
│ └── layout/ # App layout components
├── types/ # TypeScript type definitions
├── public/ # Static assets
│ ├── manifest.json # PWA manifest
│ └── icons/ # App icons
├── backend/ # Python FastAPI backend
└── docs/ # Documentation
- Fork this repository
- Connect to Vercel
- Deploy automatically
# Build for production
npm run build
# Start production server
npm run startCreate a .env.local file:
# API Configuration
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
ANTHROPIC_API_KEY=your_anthropic_key
OPENAI_API_KEY=your_openai_key
# Optional: Analytics
NEXT_PUBLIC_GA_ID=your_google_analytics_idThe app requires camera access to function. Ensure you're running on:
- HTTPS in production
- localhost for development
- Trusted domain for deployment
The frontend is designed to work with a Python FastAPI backend for AI features:
cd backend/
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000docker-compose up -d- Open the app in your mobile browser
- Tap "Add to Home Screen"
- Confirm installation
- Look for the install prompt in the address bar
- Click "Install" to add to your applications
- Camera permission request works
- QR code detection is accurate
- Results display correctly
- Copy to clipboard functions
- History saves and displays
- Export functionality works
- Theme toggle works
- Mobile responsiveness
- PWA installation
| Browser | Desktop | Mobile |
|---|---|---|
| Chrome | ✅ | ✅ |
| Firefox | ✅ | ✅ |
| Safari | ✅ | ✅ |
| Edge | ✅ | ✅ |
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
- Use TypeScript for all new code
- Follow ESLint configuration
- Write responsive CSS with Tailwind
- Add meaningful comments
- Update documentation
Camera not working?
- Ensure HTTPS is enabled
- Check browser permissions
- Try reloading the page
Build errors?
- Clear
node_modulesand reinstall - Check Node.js version compatibility
- Update dependencies
TypeScript errors?
- Run
npm run type-check - Check type definitions in
types/
- 📖 Check the Wiki
- 🐛 Report issues
- 💬 Join discussions
- 📧 Email: support@example.com
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js Team - Amazing React framework
- Vercel - Seamless deployment platform
- jsQR Library - QR code detection
- Tailwind CSS - Utility-first CSS framework
- Lucide - Beautiful icon library
Built with ❤️ by Your Name


