QrGate is a modern, web-based ticketing and access control system for events. It enables ticket sales, management, and QR code-based validation, providing a user-friendly interface for administrators and visitors.
QrGate is a comprehensive system for managing events, tickets, and access control. It consists of a Backend (Python/Quart) and a Frontend (PHP) with a modern, responsive user interface.
- Ticket Sales: Simple ticket purchase via web interface with support for various payment methods (cash, Stripe)
- Access Control: QR code-based ticket validation for entry
- Admin Panel: Comprehensive dashboard for managing events, tickets, and statistics
- Multi-language Support: German and English
- Responsive Design: Optimized for desktop and mobile devices
- CSRF Protection: All forms are protected against Cross-Site Request Forgery attacks
- XSS Prevention: User inputs are sanitized using
htmlspecialchars() - Session-based Authentication: Secure login system with PHP sessions
- API Key Authentication: Backend communication secured with authorization headers
- Role-based Access Control: Three user levels (Admin, Ticketflow, Handheld)
---
---
Backend:
- Python 3.7 or higher
- pip (Python package manager)
Frontend:
- Web server with PHP support (e.g., Apache with mod_php, Nginx with PHP-FPM, XAMPP, or LAMP)
- PHP 7.4 or higher
- Composer (PHP package manager)
- PHP cURL extension enabled
-
Clone the repository:
git clone https://github.com/rwolf2467/QrGate.git cd QrGate -
Set up the Backend:
cd backend pip install quart quart-cors reportlab qrcode reds_simple_logger -
Set up the Frontend:
cd frontend composer install -
Configure the application:
Backend (
backend/config/conf.py):class API: port = 1654 backend_url = "https://your-backend-url.com/" class Auth: auth_key = "YourSecureRandomKeyHere" class Mail: smtp_server = "smtp.example.com" smtp_port = 587 smtp_user = "user@example.com" smtp_password = "your_smtp_password"
Frontend (
frontend/config.php):define('API_BASE_URL', 'https://your-backend-url.com'); define('API_KEY', 'YourSecureRandomKeyHere'); // Must match backend auth_key // Change these passwords in production! define('ADMIN_PASSWORD', 'your_secure_admin_password'); define('TICKETFLOW_PASSWORD', 'your_secure_ticketflow_password'); define('HANDHELD_PASSWORD', 'your_secure_handheld_password');
-
Configure the web server:
- Point your web server's document root to the
frontend/directory - Ensure the
backend/data/andbackend/codes/directories are writable
- Point your web server's document root to the
-
Start the application:
Backend:
cd backend python main.pyFrontend: Access via your web server (e.g.,
https://your-domain.com)
QrGate/
├── backend/
│ ├── assets/ # Backend modules (ticket management, validation, etc.)
│ ├── config/ # Configuration files
│ ├── codes/ # Generated PDFs and QR codes
│ ├── data/ # Data storage (shows, tickets, stats)
│ └── main.py # Main backend server
│
├── frontend/
│ ├── admin/ # Admin interface
│ │ ├── ticketflow/ # Box office interface
│ │ └── handheld/ # Mobile QR scanner
│ ├── help/ # Help pages
│ ├── screens/ # Event display screens
│ ├── buy.php # Ticket purchase
│ ├── config.php # Frontend configuration
│ └── index.php # Main page
│
└── README.md
- Navigate to the application homepage
- Select the desired event
- Fill out the form and confirm the purchase
- Your ticket will be sent via email or can be downloaded
- Log in with handheld credentials
- Navigate to the access control interface
- Scan the ticket's QR code
- The system validates the ticket and displays the status
- Log in as administrator
- Navigate to the admin panel
- Manage events, tickets, and view statistics
The admin panel provides the following features:
- Dashboard: Overview of sold tickets, available tickets, and estimated revenue
- Statistics: Graphical display of ticket sales and availability
- Event Management: Edit event settings
- Date Management: Add, edit, and delete event dates
- Image Management: Upload and manage event images
| Route | Method | Purpose |
|---|---|---|
/api/ticket/create |
POST | Create ticket |
/api/ticket/validate |
POST | QR validation |
/api/show/get |
GET | Event info |
/api/show/edit |
POST | Update event |
/api/stats |
GET | Sales statistics |
/codes/pdf?tid=X |
GET | Download ticket PDF |
Backend configuration is done in backend/config/conf.py. Here you can adjust settings such as the API port, backend URL, authentication keys, and SMTP settings for email delivery.
Frontend configuration is done in frontend/config.php. Here you can adjust settings such as the API base URL, authentication key, and user passwords. Stripe payment settings are configured directly in the Admin Dashboard.
Important: The API_KEY in the frontend must match the auth_key in the backend configuration.
We welcome contributions to QrGate. Please follow these steps:
- Fork the repository
- Create a new branch for your changes
- Implement and test your changes
- Create a pull request with a description of your changes
QrGate is released under the MIT License. See the LICENSE file for more information.
For questions or support, you can create an issue in the repository or contact us at:
- Email: support@avocloud.net
Developed by avocloud.net
