Back to Projects
Overview
QR Code Generator is a REST API that allows authenticated users to generate and manage QR codes. Built as a personal project to explore Go's ecosystem for building secure and well-documented APIs.
Features
- QR code generation from any text input, stored as image data in the database
- User authentication with registration, login, and JWT-based route protection
- Password hashing with bcrypt for secure credential storage
- Interactive Swagger docs for exploring and testing all endpoints
- Hot-reload development with Air for a fast feedback loop
API Endpoints
| Method | Route | Description |
|---|---|---|
| POST | /api/auth/register | Create a new user account |
| POST | /api/auth/login | Authenticate and receive a JWT token |
| POST | /api/qrcode/generate | Generate a QR code (requires auth) |
Tech Stack
The API is built with Go using Gin as the HTTP framework and GORM for database interaction with PostgreSQL. Authentication is handled through JWT tokens with bcrypt password hashing. The codebase follows a clean layered architecture with separate packages for controllers, services, repositories, models, and middlewares.
QR Code Generator
February 2025
backendREST API built in Go for generating and managing QR codes, featuring JWT authentication, Swagger documentation, and PostgreSQL storage.
Technologies
GolangGinSwaggerGorm