Skip to content

gwould/Tickify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎫 Tickify β€” Event Ticket System

Fast, secure, and scalable platform to create events, sell tickets, and validate entry.

Status Backend Database Frontend License


🧭 Table of Contents

  1. Overview
  2. Goals
  3. Architecture
  4. Tech Stack
  5. Main Features
  6. System Flows
  7. Database Schema
  8. API Endpoints
  9. Project Structure
  10. Setup & Installation
  11. Configuration
  12. Testing
  13. Security
  14. Monitoring & Performance
  15. Frontend Options
  16. Roadmap
  17. Contributing
  18. License
  19. Example Flow

🎯 Overview

Tickify is a modern event management and ticketing system built with ASP.NET Core (C#) and SQL Server. It empowers event organizers to publish and manage events while giving users a fast and intuitive booking experience.

🎟️ From event creation β†’ ticket sales β†’ QR check-in β€” all in one system.


🧩 System Goals

  • ⚑ Frictionless Checkout: Simple, fast, and responsive ticket buying experience.
  • 🧠 Smart Management: Organizers can manage events, tickets, and promotions easily.
  • πŸ”’ Secure & Reliable: Prevent double-booking and overselling with transactional safety.
  • πŸ“Š Scalable: Clean modular architecture to support future features and integrations.
  • πŸ” Transparent: Clear order history, fees, and refund policies.

πŸ—οΈ Architecture Overview

Frontend (Next.js / React SPA)
β”‚
β”‚  HTTPS REST API Calls
β–Ό
Backend (ASP.NET Core 8 Web API)
β”œβ”€β”€ Controllers β†’ Routes
β”œβ”€β”€ Services β†’ Business Logic
β”œβ”€β”€ EF Core β†’ SQL Server
└── Auth β†’ JWT + ASP.NET Identity

Database: SQL Server 2019+
(Phase 2) Redis β†’ seat lock, rate limiting

Layered Design:

  • Controllers: REST endpoints.
  • Services: Business rules (pricing, inventory, payments).
  • Data: EF Core ORM & migrations.
  • Infrastructure: Payment, email, and storage adapters.

βš™οΈ Tech Stack

Layer Technology
Backend ASP.NET Core 8, C#, EF Core
Database Microsoft SQL Server
Frontend Next.js / React + TailwindCSS + shadcn/ui
Auth JWT + ASP.NET Identity
Payments Stripe API (modular)
Docs Swagger / OpenAPI 3.1
DevOps Docker + GitHub Actions

πŸ”‘ Main Features

πŸ‘₯ Roles

  • Buyer: Browse, purchase, and view tickets.
  • Organizer: Create and manage events, pricing, and promotions.
  • Door Staff: Validate QR codes and manage entry (Phase 2).
  • Admin: Manage users, roles, and audit logs.

πŸ›’ Buyer Experience

  • Explore events with smart filters (date, city, category).
  • Transparent pricing and fee breakdown.
  • Instant confirmation & downloadable ticket (QR/PDF).
  • Order history and e-wallet integration (Phase 2).

🏒 Organizer Tools

  • Event creation wizard (title β†’ tickets β†’ policies β†’ publish).
  • Ticket type management (GA, VIP, Sectioned).
  • Dashboard with analytics (sales, attendees, revenue).
  • Promotion codes & early-bird pricing.

βš™οΈ Admin Features

  • User & event moderation.
  • System-level reports and metrics.
  • Role-based access control.

πŸ”„ System Flows

πŸ›οΈ Checkout Flow

  1. User selects tickets.
  2. System locks inventory (TTL ~10min).
  3. Create pending order + Stripe payment intent.
  4. Payment success β†’ confirm webhook β†’ mint QR tickets.
  5. Order marked paid β†’ email confirmation.

🎫 Ticket Validation Flow

  • QR scanned β†’ API verifies validity.
  • active β†’ mark as used.
  • Response: valid | used | invalid.

πŸ“… Event Creation Flow

  1. Organizer inputs details.
  2. Adds schedule, ticket tiers, and refund rules.
  3. Preview β†’ Publish β†’ Goes live.

🧠 Database Schema (Core)

Users(id, email, password_hash, role, status, created_at)
Organizers(id, user_id, legal_name, kyc_status)
Venues(id, name, address, city, country, capacity)
Events(id, organizer_id, venue_id, slug, title, starts_at, ends_at, status)
TicketTypes(id, event_id, name, price_cents, capacity, sales_start, sales_end)
Inventory(id, event_id, ticket_type_id, status, lock_expires_at)
Orders(id, user_id, event_id, status, total_cents, currency)
OrderItems(id, order_id, ticket_type_id, quantity, price_cents)
Tickets(id, order_item_id, qr_payload, status, used_at)
Promotions(id, event_id, code, type, value, max_uses, used)
AuditLogs(id, actor_id, action, target_type, metadata_json, created_at)

πŸ“‘ API Endpoints

Category Endpoint Description
Public GET /events Browse events
GET /events/{id} Event details
GET /events/{id}/ticket-types Ticket list
POST /cart Create/update cart
POST /inventory/lock Reserve tickets
POST /checkout/start Begin checkout
POST /checkout/webhook/stripe Stripe webhook
GET /me/orders View user orders
Organizer POST /organizers/events Create draft event
PUT /organizers/events/{id} Update event
POST /organizers/events/{id}/publish Publish event
GET /organizers/events/{id}/orders Sales data
Admin GET /admin/users Manage users
GET /admin/audit-logs View logs

🧱 Project Structure

Tickify/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ Tickify.Api/              # ASP.NET Core Backend
β”‚   β”‚   β”œβ”€β”€ Controllers/
β”‚   β”‚   β”œβ”€β”€ Data/ (DbContext, Entities)
β”‚   β”‚   β”œβ”€β”€ Dtos/
β”‚   β”‚   β”œβ”€β”€ Services/
β”‚   β”‚   β”œβ”€β”€ Infrastructure/ (Payments, QR, Email)
β”‚   β”‚   └── Program.cs
β”‚   β”œβ”€β”€ Tickify.Frontend/         # Next.js / React frontend
β”‚   └── Tickify.Tests/            # Unit & integration tests
β”œβ”€β”€ docs/
β”œβ”€β”€ docker-compose.yml
└── .github/workflows/ci.yml

βš™οΈ Setup & Installation

🧰 Requirements

  • .NET 8 SDK
  • SQL Server 2019+
  • Node.js 20+ (if using frontend)

πŸš€ Backend Setup

cd src/Tickify.Api
dotnet restore
dotnet ef database update
dotnet run

API: https://localhost:5001/swagger

πŸ’» Frontend Setup

cd src/Tickify.Frontend
npm install
npm run dev

Frontend: http://localhost:3000


βš™οΈ Configuration (appsettings.json)

{
  "ConnectionStrings": {
    "Default": "Server=localhost;Database=Tickify;Trusted_Connection=True;TrustServerCertificate=True"
  },
  "Jwt": {
    "SigningKey": "CHANGE_THIS_SECRET_KEY"
  },
  "Stripe": {
    "PublishableKey": "pk_test_...",
    "SecretKey": "sk_test_...",
    "WebhookSecret": "whsec_..."
  }
}

πŸ§ͺ Testing

cd src/Tickify.Tests
dotnet test

βœ… Unit: pricing, inventory, promotions. βœ… Integration: checkout & webhooks. βœ… E2E (optional): Playwright for full buyer flow.


πŸ” Security

  • HTTPS enforced (HSTS).
  • JWT tokens (access + refresh).
  • Role-based access (Buyer, Organizer, Admin).
  • Inventory locking to prevent overselling.
  • Input validation via FluentValidation.
  • Encrypted secrets and audit logging.

πŸ“ˆ Monitoring & Performance

  • Logging via Serilog.
  • Metrics via OpenTelemetry (Prometheus).
  • Query profiling with EF Core logs.
  • CDN + caching for static assets (frontend).

πŸ’‘ Frontend Options

Next.js

  • Server-side rendering for SEO.
  • Tailwind + shadcn/ui design system.
  • React Query for caching.

🧭 Roadmap

Phase 1 (MVP)

  • Event management, checkout, payments, QR generation.
  • Organizer dashboard.

Phase 2

  • Reserved seating map.
  • Ticket transfer & resale.
  • Box office & offline validation.
  • Advanced analytics + payouts.

🀝 Contributing

  1. Fork repo & clone locally.

  2. Create feature branch:

    git checkout -b feature/new-feature
  3. Commit and push:

    git commit -m "Add new feature"
    git push origin feature/new-feature
  4. Create Pull Request.


πŸ“œ License

Licensed under the MIT License β€” use freely for personal or commercial purposes.


🧠 Appendix β€” Example Checkout Flow

User β†’ Web: select 2 tickets
Web β†’ API(/inventory/lock): lock tickets
Web β†’ API(/cart): price breakdown
Web β†’ API(/checkout/start): create order + payment intent
Stripe β†’ API(webhook): payment_succeeded
API β†’ allocate tickets + send confirmation
User β†’ Web: shows confirmation + QR code

πŸš€ Built with ❀️ by the Tickify Team

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published