This project expose some simple api's to handle an headless news cms.
You will be able to:
- create users and assign them roles
- list all news
- list a news identified by ID (Iri)
- create a news
- update, replace, delete a news
- list all news' comments
- list a comment by id
- create new comments for a news
- update, replace, delete a comment
This project uses Api Platform as it's base component.
API Platform is a set of tools to build and consume web APIs that relies on Symfony Framework.
This project ships with a complete-working-out-of-the-box environment made with Docker. It consist of:
- PHP 8.0.3 fpm with Composer2, OpCache, ACPU and Xdebug already configured.
- Caddy web server with the Mercure (real-time and async) and Vulcain (relations preloading) modules
- Postgres DB
You can override the configuration (mainly ports etc) by modifying
docker-compose.override.yml
conf file.
The main part of this project is no the api
directory. So switch to api
and install all the stuff:
cd api
make first_run
This command will:
- Prepare Docker environment
- Start the container
- Prepare all the ssl certificates for JWT to work
- Create the DB and all the tables
- Load the fixtures
Then go to https://localhost and accept the self signed certificate. You will be prompted with the default API Platform page.
Go to https://localhost/docs for the OpenApi docs
nb: all the makefile scripts are in api
directory
make run_tests
make start #Start docker
make stop #Stop docker
make bash #Open a bash into php container
make help #Show all commands infos
👤 Carmelo Badalamenti [aka rollsappletree]
- Twitter: @rollsappletree
- Github: @rollsappletree
- LinkedIn: @rollsappletree
Give a ⭐️ if this project helped you!
This README was generated with ❤️ by readme-md-generator