Skip to content

rollsappletree/headless_news_api

Repository files navigation

Welcome to Headless News Api 👋

Version Twitter: rollsappletree

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

Tecnologies

Api Platform

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.

Docker

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.

Install

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

Run tests

make run_tests

Other Commands:

make start                     #Start docker
make stop                      #Stop docker
make bash                      #Open a bash into php container
make help                      #Show all commands infos

Technical infos:

TO DO

Author

👤 Carmelo Badalamenti [aka rollsappletree]

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published