← All work/ Case 005Backend + MobileShipped · 2024

Qraven

An event platform: organisers publish events, users buy tickets, and payment status drives the ticket's lifecycle. A Go API underneath, an Expo app on top.

Role
Solo: Go API, mobile app
Timeline
Aug 2024 – Apr 2026
Stack
Go · Gin · PostgreSQL · Redis · JWT with role middleware · Prometheus · Expo / React Native
Links
API codeMobile code
Chapters
Problem

Three roles, one ticket

Organisers, attendees and admins need different powers over the same events, and a ticket must never drift from the payment that bought it.

Approach

Roles on every route

A Gin API with JWT auth and role middleware on every route. Issuing a ticket updates event capacity; updating a payment's status moves the ticket with it.

Outcome

An API and an app

Eleven routes across auth, events, tickets and payments, Prometheus metrics and a scheduled token cleanup, plus an Expo app for browsing, favouriting and holding tickets.

The real screens

Qraven onboarding screen
Onboarding
Qraven favourites
Favourites
Qraven tickets
Tickets
Inside the API

Every route checks a role.

Routes live under /api/v1 and pass through Authorize middleware with the roles allowed to call them. Swagger UI serves the canonical docs, and /metrics exposes Prometheus counters.

11API routes
3Roles: User · Organizer · Admin
JWTAuth with role middleware
Expo 52Mobile app
pkg/router · /api/v1
  1. 01POST /auth/register create an account
  2. 02POST /events create an eventOrganizer
  3. 03GET /events/:id read an eventall roles
  4. 04POST /tickets/:eventId issue a ticket, update capacityall roles
  5. 05POST /payments/initialize start a paymentall roles
  6. 06PATCH /payments/:id/status status moves the ticketall roles