Skip to content

This is an example project base on Spiral/Vue.js/PHP and GRPC microservices.

Notifications You must be signed in to change notification settings

anthonymedinawork/ticket-booking

Repository files navigation

Demo application - Ticket booking system

Ticket booking

It built on the Spiral Framework, which is a high-performance PHP framework that allows developers to create reusable, independent, and easy-to-maintain services. In this demo application, you can find an example of using RoadRunner's gRPC plugin to create and consume gRPC services.

In this demo system, you can purchase tickets using a fake payment gateway. You can also view and manage your bookings, and receive notifications about your tickets and transactions. It's a great way to get a feel for how a real ticket booking system works, without any of the actual commitment (or expense).

To ensure the best performance, reliability, and observability, we have used a number of powerful tools and technologies such as Opentelemetry, Centrifugo, RoadRunner, Grafana, Bidrdog, Buggregator, and Temporalio. These help us to understand how the system is behaving, identify and fix issues, and optimize the resources.

Grafana dashboard

Overall, our demo ticket booking system is a great example of how Spiral Framework and other tools can be used to build a modern and efficient application. We hope you have a blast using it and learning more about the capabilities of Spiral Framework and the other tools we've used.

Happy (fake) ticket shopping!

Requirements

  • PHP 8.1
  • composer
  • docker

Installation

Clone project into a folder

Run console commands

chmod +x run.sh
./run.sh

Services dashboards

Project structure

  • frontend - SPA GUI
  • centrifugo - Centrifugo API
  • web - REST API
  • users - GRPC microservice. It's responsible for user management and auth tokens management. Works only with database.
  • cinema - GRPC microservice. It's responsible for movies and reservation. Works with database and temporal.
  • payment - GRPC microservice. Fake payment gateway. It's receives requests for money charging and responses with receipt.
  • shared - Shared package for all microservices. It contains common classes, proto files and compiler, DTO's, GRPC clients, e.t.c. docker-compose.yaml contains all necessary containers to run project.

Database

  • Connection address: 127.0.0.1:5432
  • Username: homestead
  • Password: secret
  • Database: homestead

ticket reservation

TODO

  • Register stripe in sandbox mode
  • Book and charge before 15 min screening. User will have the ability to cancel ticket.
  • Schema of services

About

This is an example project base on Spiral/Vue.js/PHP and GRPC microservices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published