Skip to content

REST API for managing a cinema created with PHP 8, Symfony 6 and FOSRestBundle 3

License

Notifications You must be signed in to change notification settings

Heaven31415/my-cinema

Repository files navigation

My Cinema

tests

My Cinema is an REST API for managing a cinema created with PHP 8, Symfony 6 and FOSRestBundle 3

JetBrains support

This project is supported by JetBrains via its OpenSourceSupport initiative

Demo

Live demo is available here

OpenAPI documentation can be found here

Project overview

  • CRUDs for Genres, Halls, Movies and Shows: 4 services, 4 entities and 4 controllers
  • 16 endpoints with documentation in OpenAPI format via NelmioApiDocBundle
  • 75 unit and integration tests (187 assertions)
  • Authentication via LexikJWTAuthenticationBundle and authorization support (WIP)
  • Sensible data fixtures implemented with ZenstruckFoundryBundle
  • Live version API and documentation, deployed on Heroku
  • GitHub Actions CI support
  • Local docker development support (WIP)

Local setup and development

Requirements

Setup instructions

  1. Download project: $ git clone https://github.com/Heaven31415/my-cinema.git

  2. Change to its directory: $ cd my-cinema

  3. Create local .env files:

    • $ cp .env .env.local
    • $ cp .env.test .env.test.local
  4. Configure the value of DATABASE_URL environment variable in .env.local and .env.test.local files (its value should be identical in both files) so you can connect to your PostgreSQL server

  5. Run $ bin/setup bash script to install project dependencies and setup main and test databases

Run development server

$ symfony serve

Run tests

$ bin/phpunit

View API docs

Start development server, open your browser and visit this link to see the docs

Heroku deployment

  • Add a new commit to the master branch
  • git push heroku master
  • heroku run php bin/console doctrine:migrations:migrate --no-interaction

About

REST API for managing a cinema created with PHP 8, Symfony 6 and FOSRestBundle 3

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages