My Cinema
is an REST API for managing a cinema created with PHP 8, Symfony 6 and FOSRestBundle 3
This project is supported by JetBrains via its OpenSourceSupport initiative
Live demo is available here
OpenAPI documentation can be found here
- 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)
- PHP 8.1.20 or 8.2.7 (CI is run against both versions)
- Composer 2.5.5
- Symfony CLI 5.5.6
- PostgreSQL 15.0
-
Download project:
$ git clone https://github.com/Heaven31415/my-cinema.git
-
Change to its directory:
$ cd my-cinema
-
Create local
.env
files:$ cp .env .env.local
$ cp .env.test .env.test.local
-
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 -
Run
$ bin/setup
bash script to install project dependencies and setup main and test databases
$ symfony serve
$ bin/phpunit
Start development server, open your browser and visit this link to see the docs
- Add a new commit to the master branch
git push heroku master
heroku run php bin/console doctrine:migrations:migrate --no-interaction