Magic Smoke Concepts Documentation

Architecture

MagicSmoke consists of two main components: the server and the client. The server stores all events, tickets, orders, etc. The client provides access to it.

There are two main lanes of access to the server - one for customers through a web browser and one for the theater itself through the specialized client.

Theater Access Customer Access
Client Browser
Network (HTTP)
machine.php
(Theater Interface)
index.php
(Customer Interface)
MagicSmoke Server / Apache / Database

Events and Tickets

Selling seats for events is what MagicSmoke was created for. In terms of MagicSmoke an event has the following properties: Tickets belong to a specific event and enable the owner to enter the audience of an event. A Ticket has these properties: The amount of tickets for an event is limited by several factors:

Orders and Vouchers

MagicSmoke stores customers with names and potentially many addresses. Customers can be created from the client or by the customer him/herself through the web interface.

An order is generated whenever tickets are ordered, sold, or given away for free. The order connects tickets with customers and tracks the payment of those. The difference between an order and a straight sale is that the "order" is not paid and shipped when created, while the "sale" is paid and shipped right from the start.

Vouchers can be bought by customers and in return they can be used to pay for orders. Like tickets, each voucher has a unique ID that identifies it.

Templates and Printing

Templates are the base of everything that can be stored in OpenOffice files or that can be printed.

MagicSmoke has two ways of printing: tickets and vouchers are printed directly from the client. Other documents are created in OpenDocument format and then stored, opened with OpenOffice, or printed through OpenOffice.

Login, Users, Hosts, and Profiles

MagicSmoke uses the multi-layer login. It authenticates both the client host and the user. This is to make sure that users only connect from hosts that belong to the correct theater, it is also possible to restrict some users to fewer hosts.

The login process performs the following checks:

  1. the client authenticates the server using the SSL certificate
  2. the server authenticates the client using its host name and key
  3. the server authenticates the user by name and password
  4. the server checks that the user is allowed to log in from that host
If any of those checks fails the login is denied.

Profiles are used by the client to link a specific server together with a specific host setting and other settings to be used with this server.

Scripting

MagicSmoke attempts to execute specific scripts at various times, like client startup, the printing of tickets, or the creation of order bills. Scripts are written in the Javascript dialect of Qt.