Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

License

NeuralNik/linkr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Linkr Banner

πŸ”— linkr

A modern, feature-rich QR code generator with React frontend and Python FastAPI backend

Live Demo License Hacktoberfest

🌟 Overview

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/

✨ Features

🎨 Customization Options

  • 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

🎯 User Experience

  • 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

πŸ”§ Technical Features

  • 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

πŸ› οΈ Tech Stack

Frontend

  • 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

Backend

  • Framework: FastAPI (Python)
  • QR Generation: qrcode library with PIL
  • PDF Generation: ReportLab
  • Server: Uvicorn ASGI
  • CORS: Configured for cross-origin requests

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

Installation & Setup

1. Clone the Repository

git clone https://github.com/writetosagnik/linkr.git
cd linkr

2. Setup Backend (Terminal 1)

# 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 8000

Backend will be running at:

3. Setup Frontend (Terminal 2)

Open a new terminal window:

# From project root
# Install dependencies
npm install
# or
pnpm install

# Start development server
npm run dev
# or
pnpm run dev

Frontend will be running at: http://localhost:5173

4. Access the Application

Open your browser and navigate to:

You're all set! Start generating QR codes! πŸŽ‰

οΏ½ Usage

  1. Enter URL: Type or paste any URL in the input field
  2. Customize Colors (Optional):
    • Choose foreground color (QR code color)
    • Choose background color
    • Select from pre-designed templates
  3. Select Format: Choose from PNG, JPG, PDF, or SVG
  4. Generate: Click "Generate QR Code"
  5. Download: Click download button to save your QR code
  6. History: Access your previously generated QR codes from the History page

Supported URL Formats

  • βœ… 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

πŸ§ͺ Testing

Test the Backend API

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"
  }'

Available Endpoints

  • GET / - Health check
  • POST /generate-qr - Generate QR code
  • POST /download-qr - Download QR code in specified format
  • GET /docs - Interactive API documentation

πŸ“ Project Structure

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

οΏ½ Available Scripts

Frontend

npm run dev          # Start development server
npm run build        # Build for production
npm run preview      # Preview production build
npm run lint         # Run ESLint

Backend

# 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 network

πŸ› οΈ Development

Environment Variables

Create a .env file in the project root:

VITE_API_URL=http://localhost:8000

Project Architecture

Frontend (React + TypeScript)
    ↓
  Vite Dev Server (localhost:5173)
    ↓
  HTTP Requests
    ↓
Backend (FastAPI + Python)
    ↓
  Uvicorn Server (localhost:8000)
    ↓
  QR Code Generation

Code Structure

  • 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

πŸ”’ Privacy & Security

  • 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

πŸ› Troubleshooting

Backend won't start

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.txt

Frontend can't connect to backend

Error: Network request failed / CORS error

Solution:

  1. Ensure backend is running on port 8000
  2. Check backend terminal for any errors
  3. Verify CORS is configured in backend/main.py

Port already in use

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 -9

Dependencies installation fails

Solution:

# 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 install

πŸ‘¨β€πŸ’» Developer

Sagnik Pal - Exploring AI Milestones

🀝 Contributing

We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.

How to Contribute

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/YOUR_USERNAME/linkr.git
  3. Create a feature branch: git checkout -b feature/AmazingFeature
  4. Make your changes
  5. Test thoroughly (both frontend and backend)
  6. Commit your changes: git commit -m 'Add some AmazingFeature'
  7. Push to your fork: git push origin feature/AmazingFeature
  8. Open a Pull Request

Development Guidelines

  • 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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

🌐 Deployment

Want to deploy your own instance? Check out our Deployment Guide for detailed instructions on deploying to Render, Vercel, and other platforms.

πŸ™ Acknowledgments

  • 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

πŸ“ž Support

⭐ Show Your Support

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!

About

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.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •