A modern, feature-rich QR code generator with React frontend and Python FastAPI backend
linkr is a modern QR code generator that allows you to convert any URL into a scannable QR code with customizable colors and multiple download formats. Built with a sleek dark theme and neon green accents, linkr provides a seamless user experience for generating high-quality QR codes.
Live Demo: https://linkr-inky-three.vercel.app/
- QR Code Templates: 15 pre-designed color schemes and styles (Professional, Creative, Nature, Tech, Minimal)
- Color Selection: Custom foreground and background colors with color pickers
- Multiple Formats: Download QR codes in PNG, JPG, PDF, or SVG formats
- High Quality: Generate crisp, high-resolution QR codes
- Real-time Preview: See your QR code update instantly
- QR History: Automatic saving and management of generated QR codes with search and filter capabilities
- Dark Theme: Modern dark UI with neon green highlights
- Responsive Design: Works perfectly on desktop, tablet, and mobile
- Fast Generation: Instant QR code creation with Python backend
- Batch Processing: Generate multiple QR codes at once from CSV or manual input
- QR Code History: Automatic history tracking with search, filter, and export capabilities
- No Data Storage: Your URLs are not stored on our servers for privacy
- React 18 with TypeScript for type safety
- Python FastAPI backend for fast QR generation
- Tailwind CSS with custom design system
- Shadcn/ui components for consistent UI
- Vite for lightning-fast development
- Framework: React 18 with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS with custom theme
- UI Components: Shadcn/ui
- Icons: Lucide React
- State Management: React Hooks
- Framework: FastAPI (Python)
- QR Generation: qrcode library with PIL
- PDF Generation: ReportLab
- Server: Uvicorn ASGI
- CORS: Configured for cross-origin requests
Before you begin, ensure you have the following installed:
git clone https://github.com/writetosagnik/linkr.git
cd linkr# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Start backend server
uvicorn main:app --reload --host 0.0.0.0 --port 8000Backend will be running at:
- API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Open a new terminal window:
# From project root
# Install dependencies
npm install
# or
pnpm install
# Start development server
npm run dev
# or
pnpm run devFrontend will be running at: http://localhost:5173
Open your browser and navigate to:
- Frontend: http://localhost:5173
- Backend API Docs: http://localhost:8000/docs
You're all set! Start generating QR codes! π
- Enter URL: Type or paste any URL in the input field
- Customize Colors (Optional):
- Choose foreground color (QR code color)
- Choose background color
- Select from pre-designed templates
- Select Format: Choose from PNG, JPG, PDF, or SVG
- Generate: Click "Generate QR Code"
- Download: Click download button to save your QR code
- History: Access your previously generated QR codes from the History page
- β
https://example.com - β
http://example.com - β
example.com(automatically adds https://) - β
subdomain.example.com - β
URLs with paths:
example.com/path/to/page - β
URLs with parameters:
example.com?id=123&name=test
Visit http://localhost:8000/docs to access the interactive API documentation (Swagger UI).
Test QR Generation via curl:
curl -X POST "http://localhost:8000/generate-qr" \
-H "Content-Type: application/json" \
-d '{
"url": "https://github.com",
"foreground_color": "#000000",
"background_color": "#ffffff",
"format": "png"
}'GET /- Health checkPOST /generate-qr- Generate QR codePOST /download-qr- Download QR code in specified formatGET /docs- Interactive API documentation
linkr/
βββ π backend/ # Python FastAPI backend
β βββ main.py # Main FastAPI application
β βββ requirements.txt # Python dependencies
β βββ README.md # Backend documentation
βββ π src/ # React frontend source
β βββ π assets/ # Static assets (images, logos)
β βββ π components/ # Reusable React components
β β βββ π ui/ # Shadcn/ui components
β β βββ Header.tsx # Navigation header
β β βββ Footer.tsx # Site footer
β β βββ QRGenerator.tsx # Main QR generation component
β βββ π pages/ # Page components
β β βββ Home.tsx # Landing page
β β βββ Developer.tsx # About developer page
β β βββ NotFound.tsx # 404 page
β βββ π contexts/ # React contexts
β βββ π hooks/ # Custom React hooks
β βββ π lib/ # Utility functions
βββ π public/ # Public static files
βββ package.json # Frontend dependencies
βββ tailwind.config.ts # Tailwind CSS configuration
βββ vite.config.ts # Vite configuration
βββ README.md # Project documentation
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint# From backend/ directory with venv activated
uvicorn main:app --reload # Start with auto-reload
uvicorn main:app --reload --port 8000 # Specify port
uvicorn main:app --host 0.0.0.0 --port 8000 # Expose to networkCreate a .env file in the project root:
VITE_API_URL=http://localhost:8000Frontend (React + TypeScript)
β
Vite Dev Server (localhost:5173)
β
HTTP Requests
β
Backend (FastAPI + Python)
β
Uvicorn Server (localhost:8000)
β
QR Code Generation
- Frontend: Component-based React architecture with TypeScript
- Backend: RESTful API with FastAPI
- Styling: Tailwind CSS with custom design system
- State Management: React Hooks (useState, useEffect)
- API Communication: Fetch API with async/await
- No Data Storage: URLs are processed in memory but never stored on disk or database
- Client-Side Processing: Frontend handles UI state locally in browser
- No Tracking: No analytics or user tracking implemented
- Open Source: Fully transparent codebase for security auditing
Error: ModuleNotFoundError: No module named 'fastapi'
Solution: Make sure virtual environment is activated and dependencies are installed:
cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
pip install -r requirements.txtError: Network request failed / CORS error
Solution:
- Ensure backend is running on port 8000
- Check backend terminal for any errors
- Verify CORS is configured in
backend/main.py
Error: Address already in use
Solution:
# Windows - Find and kill process on port 8000
netstat -ano | findstr :8000
taskkill /PID <PID> /F
# macOS/Linux
lsof -ti:8000 | xargs kill -9Solution:
# Clear npm cache
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
# Or use pnpm
pnpm store prune
rm -rf node_modules pnpm-lock.yaml
pnpm installSagnik Pal - Exploring AI Milestones
- π GitHub: writetosagnik
- πΌ LinkedIn: sagnik-pal-930160277
- π§ Email: [email protected]
- π¬ Reddit: Comfortable-Web-5719
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/linkr.git - Create a feature branch:
git checkout -b feature/AmazingFeature - Make your changes
- Test thoroughly (both frontend and backend)
- Commit your changes:
git commit -m 'Add some AmazingFeature' - Push to your fork:
git push origin feature/AmazingFeature - Open a Pull Request
- Follow existing code style and conventions
- Write clear, descriptive commit messages
- Test your changes locally before submitting PR
- Update documentation if needed
- Keep PRs focused on a single feature/fix
For detailed guidelines, see CONTRIBUTING.md
This project is licensed under the MIT License - see the LICENSE file for details.
Want to deploy your own instance? Check out our Deployment Guide for detailed instructions on deploying to Render, Vercel, and other platforms.
- React - Amazing JavaScript framework
- FastAPI - Modern Python web framework
- Tailwind CSS - Utility-first CSS framework
- Shadcn/ui - Beautiful, accessible components
- Lucide - Clean, consistent icons
- Vite - Lightning-fast build tool
- π§ Email: [email protected]
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
If you find this project helpful, please consider giving it a star on GitHub! It helps others discover the project.
Made with β€οΈ by Sagnik Pal | Live Demo | Report Bug | Request Feature
This project follows the all-contributors specification. Contributions of any kind welcome!