A modern QR Code Generator web application built with ASP.NET Core 9 MVC.
The application allows users to generate QR codes from website URLs, preview them instantly, download them as PNG images, and copy the original URL with a single click.
- Generate QR Codes from any website URL
- Download QR Code as PNG
- Copy URL to Clipboard
- Generate Another option
- URL Validation
- Clean and Responsive UI
- Logging with ILogger
- Exception Handling
- Service Layer Architecture
- Dependency Injection
- Unit Testing using xUnit
- ASP.NET Core 9 MVC
- C#
- Razor Views
- Bootstrap 5
- Bootstrap Icons
- QRCoder
- JavaScript
- Dependency Injection
- ILogger
- xUnit
QrCodeGenerator
│
├── Controllers
│ └── HomeController.cs
│
├── Services
│ ├── Interfaces
│ │ └── IQrCodeService.cs
│ │
│ └── Implementations
│ └── QrCodeService.cs
│
├── ViewModels
│ └── QrCodeViewModel.cs
│
├── Views
│ ├── Home
│ │ ├── Index.cshtml
│ │ └── About.cshtml
│ │
│ └── Shared
│ └── _Layout.cshtml
│
├── wwwroot
│
├── Program.cs
│
└── appsettings.json
- Enter a website URL
- Generate QR Code
- Display generated QR Code
- Download as PNG
- Copy URL
- Generate another QR Code
Displays information about
- Project
- Technologies Used
- Features
- Developer Information
- User enters a website URL.
- The request is sent to the HomeController.
- The controller validates the URL.
- The controller calls the QR Code Service.
- The service generates the QR Code using the QRCoder library.
- The generated image is converted to Base64.
- The image is displayed in the browser.
- Users can download the QR Code or copy the original URL.
- MVC (Model-View-Controller)
- Service Layer Pattern
- Dependency Injection
The application uses ILogger to log:
- Successful QR generation
- Invalid URL submissions
- Exceptions during QR generation
The application gracefully handles unexpected errors and displays a user-friendly message instead of crashing.
- Required URL
- Invalid URL detection
- Prevents generating QR code for an empty value
The project includes xUnit tests for the QR Code generation service.
- Custom QR Colors
- QR Size Selection
- SVG Download
- PDF Download
- QR History
- Dark Mode
- QR Logo Upload
- API Version
Clone the repository
git clone https://github.com/YOUR_GITHUB_USERNAME/QrCodeGenerator.gitGo to the project folder
cd QrCodeGeneratorRestore packages
dotnet restoreRun the project
dotnet runOpen your browser
https://localhost:7189
(Add screenshot here)
(Add screenshot here)
(Add screenshot here)
Deep KC
This project is created for learning and portfolio purposes.