A production-ready, enterprise-grade event ticketing and QR validation platform built with Django.
QRify is a comprehensive event ticketing solution that combines secure QR code generation, cryptographic ticket signing, real-time analytics, and mobile payment integration. Built for event organizers who need enterprise-level reliability with developer-friendly APIs.
- Cryptographically Signed Tickets - Prevent fraud with tamper-proof QR codes
- Real-time Analytics - Track sales, revenue, and attendance instantly
- M-Pesa Integration - Accept mobile payments with STK Push
- Bulk Operations - Generate hundreds of tickets via CSV upload
- Modern UI - Beautiful dark-mode interface with HTMX interactivity
- Docker Ready - Full containerization for easy deployment
- REST API - Complete API with OpenAPI documentation
Event organizers face significant challenges in managing ticketing operations:
-
Ticket Fraud & Duplication: Traditional paper tickets and simple QR codes are easily forged or duplicated, leading to revenue loss and security concerns.
-
Manual Processes: Bulk ticket generation and distribution require tedious manual work, consuming valuable time and resources.
-
Payment Friction: Limited payment options, especially in mobile-first markets, create barriers to ticket sales.
-
Lack of Real-time Insights: Organizers struggle to track sales performance, attendance patterns, and revenue in real-time.
-
Fragmented Systems: Using multiple disconnected tools for ticketing, payments, analytics, and validation creates operational complexity.
QRify addresses these challenges by providing:
- Cryptographic Security: Each ticket is cryptographically signed using Django's Signer, making forgery mathematically infeasible.
- Automated Workflows: Bulk ticket generation via CSV upload with automated email delivery.
- Integrated Payments: Built-in M-Pesa STK Push for seamless mobile payments.
- Unified Dashboard: Single platform for event creation, ticket management, sales tracking, and check-in validation.
- Developer-Friendly: REST API with comprehensive documentation for custom integrations.
| Technology | Version | Purpose |
|---|---|---|
| Python | 3.11+ | Core programming language |
| Django | 5.0+ | Web framework and ORM |
| Django REST Framework | 3.14+ | API development |
| PostgreSQL | 14+ | Production database |
| Redis | 6+ | Caching and message broker |
| Celery | 5.3+ | Asynchronous task processing |
| Gunicorn | 21+ | WSGI HTTP server |
| Technology | Purpose |
|---|---|
| Django Templates | Server-side rendering |
| HTMX | Dynamic interactions without heavy JS |
| Tailwind CSS | Utility-first styling |
| Heroicons | SVG icon library |
| Technology | Purpose |
|---|---|
| Django Signer | Cryptographic ticket signing |
| JWT (Simple JWT) | API authentication |
| UUID | Primary keys for enhanced security |
| django-ratelimit | Rate limiting protection |
| Technology | Purpose |
|---|---|
| Docker | Containerization |
| Docker Compose | Multi-container orchestration |
| Nginx | Reverse proxy (recommended) |
| Git | Version control |
| Service | Purpose |
|---|---|
| M-Pesa Daraja API | Mobile payment processing |
| SMTP (Gmail/SendGrid) | Email delivery |
| Segno | QR code generation |
| pyzbar | QR code decoding |
erDiagram
User ||--o{ Organization : "belongs to"
Organization ||--o{ Event : "organizes"
Event ||--o{ TicketTier : "has"
Event ||--o{ Ticket : "generates"
TicketTier ||--o{ Ticket : "categorizes"
Ticket ||--o{ CheckInLog : "validates"
User ||--o{ CheckInLog : "performs"
User {
uuid id PK
string username
string email
string password_hash
datetime created_at
}
Organization {
uuid id PK
string name
string contact_email
datetime created_at
}
Event {
uuid id PK
uuid organizer_id FK
string title
text description
datetime start_datetime
datetime end_datetime
string location
boolean is_published
datetime created_at
}
TicketTier {
uuid id PK
uuid event_id FK
string name
decimal price
int total_quantity
int sold_quantity
datetime created_at
}
Ticket {
uuid id PK
uuid event_id FK
uuid tier_id FK
string attendee_name
string attendee_email
string signed_token
image qr_code_image
boolean is_used
datetime created_at
}
CheckInLog {
uuid id PK
uuid ticket_id FK
uuid scanned_by_id FK
datetime scanned_at
string location
}
graph TB
subgraph "Event Organizer"
O[Organizer]
end
subgraph "Attendee"
A[Attendee]
end
subgraph "Scanner/Staff"
S[Staff Member]
end
subgraph "QRify System"
UC1[Create Event]
UC2[Manage Ticket Tiers]
UC3[Generate Bulk Tickets]
UC4[View Analytics Dashboard]
UC5[Purchase Ticket]
UC6[Pay via M-Pesa]
UC7[Receive QR Ticket]
UC8[Scan QR Code]
UC9[Validate Ticket]
UC10[Generate Public QR]
UC11[Decode QR Image]
end
O --> UC1
O --> UC2
O --> UC3
O --> UC4
O --> UC8
A --> UC5
A --> UC6
A --> UC7
A --> UC10
A --> UC11
S --> UC8
S --> UC9
UC1 --> UC2
UC2 --> UC3
UC5 --> UC6
UC6 --> UC7
UC8 --> UC9
graph LR
A[User Browser] --> B[Nginx Reverse Proxy]
B --> C[Django/Gunicorn]
C --> D[PostgreSQL Database]
C --> E[Redis Cache]
C --> F[Celery Workers]
F --> E
F --> G[Email Service]
C --> H[M-Pesa API]
C --> I[Static Files]
As an event organizer, I want to:
- Create and publish events with detailed information (title, description, date, location)
- Define multiple ticket tiers (VIP, General, Early Bird) with different pricing
- Edit event details and ticket availability before and after publication
- Unpublish events if needed to prevent further ticket sales
Acceptance Criteria:
- Events can be created with all required fields
- Ticket tiers can be added, edited, and removed
- Published events are visible to potential attendees
- Unpublished events are hidden from public view
As an event organizer, I want to:
- Generate individual tickets for walk-in customers
- Upload a CSV file with attendee details to generate bulk tickets
- Automatically email QR code tickets to attendees
- Download tickets as PDF for printing
Acceptance Criteria:
- Single ticket generation completes in under 2 seconds
- Bulk upload processes 100+ tickets within 5 minutes
- Each ticket has a unique, cryptographically signed QR code
- Emails are delivered within 10 minutes of generation
As an attendee, I want to:
- Purchase tickets using M-Pesa mobile money
- Receive an STK Push notification on my phone
- Complete payment without leaving the platform
- Receive my ticket immediately after successful payment
Acceptance Criteria:
- M-Pesa STK Push is initiated within 3 seconds
- Payment status is updated in real-time
- Tickets are generated only after confirmed payment
- Failed payments show clear error messages
As a venue staff member, I want to:
- Scan QR codes using a mobile device or scanner
- Instantly see if a ticket is valid, already used, or fraudulent
- View attendee details upon successful validation
- Prevent duplicate entry with the same ticket
Acceptance Criteria:
- QR scan validation completes in under 1 second
- Invalid/forged tickets are clearly flagged
- Already-used tickets cannot be scanned again
- Check-in logs are recorded with timestamp and location
As an event organizer, I want to:
- View real-time sales statistics on my dashboard
- Track revenue by ticket tier
- Monitor attendance rates during the event
- Export sales reports for accounting purposes
Acceptance Criteria:
- Dashboard updates in real-time as tickets are sold
- Revenue calculations are accurate to 2 decimal places
- Attendance tracking shows current vs. total capacity
- Reports can be exported as CSV or PDF
As a third-party developer, I want to:
- Access comprehensive API documentation
- Authenticate using JWT tokens
- Programmatically create events and generate tickets
- Receive webhook notifications for ticket sales
Acceptance Criteria:
- API documentation is available at
/api/docs/ - JWT tokens are valid for 24 hours
- All CRUD operations are supported via API
- Webhooks deliver within 30 seconds of events
| Feature | Description |
|---|---|
| Event Management | Create, edit, and publish events with multi-tier pricing |
| Dashboard Analytics | Real-time sales tracking, revenue reports, and attendance metrics |
| Bulk Ticket Issuance | Upload CSV files to generate and email tickets automatically |
| QR Scanner | Validate tickets at venue entrance with mobile scanner |
| Payment Processing | Integrated M-Pesa STK Push for seamless mobile payments |
| Feature | Description |
|---|---|
| REST API | Full-featured API with JWT authentication |
| OpenAPI Docs | Interactive API documentation at /api/docs/ |
| Webhooks | Real-time event notifications (coming soon) |
| SDK Support | Python SDK for easy integration |
- Cryptographic ticket signing with Django's
Signer - UUID-based primary keys for enhanced security
- Rate limiting on public endpoints
- Environment-based configuration (12-factor app)
- CORS and CSRF protection
- Secure password hashing with Django defaults
- Python 3.11+
- PostgreSQL 14+ (or SQLite for development)
- Redis 6+ (for Celery)
- Git
-
Clone the repository
git clone https://github.com/BillyMwangiDev/QRify.git cd QRify -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment
cp .env.example .env # Edit .env with your settings -
Run migrations
python manage.py migrate python manage.py createsuperuser
-
Start development server
python manage.py runserver
Visit http://127.0.0.1:8000 to see the application.
# Build and start all services
docker-compose up -d
# Run migrations
docker-compose exec web python manage.py migrate
# Create superuser
docker-compose exec web python manage.py createsuperuser
# View logs
docker-compose logs -f webServices will be available at:
- Web App: http://localhost:8000
- PostgreSQL: localhost:5432
- Redis: localhost:6379
QRify/
├── apps/ # Application modules
│ ├── core/ # User authentication & base models
│ ├── events/ # Event management & ticketing
│ └── tools/ # QR decoder and utilities
├── templates/ # Django templates
│ ├── base.html # Base template with navigation
│ ├── pages/ # Public pages
│ ├── events/ # Event management UI
│ └── registration/ # Auth pages
├── static/ # Static assets (CSS, JS, images)
├── qrify/ # Project settings
│ ├── settings.py # Configuration
│ ├── urls.py # URL routing
│ └── celery.py # Async task configuration
├── docker-compose.yml # Multi-container setup
├── Dockerfile # Production image
├── requirements.txt # Python dependencies
└── manage.py # Django CLI
Interactive API documentation is available at:
- Swagger UI: http://localhost:8000/api/docs/
- OpenAPI Schema: http://localhost:8000/api/schema/
| Endpoint | Method | Description |
|---|---|---|
/api/public/qr/ |
GET | Generate public QR code |
/api/v1/events/ |
GET, POST | List and create events |
/api/v1/scan/ |
POST | Validate ticket QR code |
/tools/decode/ |
GET, POST | Decode QR image to text |
# Run all tests
pytest
# Run with coverage
pytest --cov=apps --cov-report=html
# Run specific app tests
pytest apps/events/tests/We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 style guide
- Write tests for new features
- Update documentation as needed
- Use meaningful commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Django
- QR generation powered by segno
- UI inspired by modern SaaS platforms
- Icons from Heroicons
- Documentation: Wiki
- Issues: GitHub Issues
- Email: billymwangi200@gmail.com
Made with care by the QRify Team