Backend copied from ticketboard project