Skip to content

Create REST and GraphQL APIs, scaffold (api-platform without PWA)

License

Notifications You must be signed in to change notification settings

sr-hosseyni/api-platform

Repository files navigation

API-platform with no mercure and PWA (with only neccessary packages)

THIS IS A FORK OF api-platform

PWA and Mercure has been removed!

API Platform

API Platform is a next-generation web framework designed to easily create API-first projects without compromising extensibility and flexibility:

GitHub Actions Codecov SymfonyInsight Scrutinizer Code Quality

The official project documentation is available on the API Platform website.

API Platform embraces open web standards (OpenAPI, RDF/JSON-LD/Hydra, GraphQL, JSON:API, HAL, OAuth...) and the Linked Data movement. Your API will automatically expose structured data in Schema.org / JSON-LD. It means that your API Platform application is usable out of the box with technologies of the semantic web.

It also means that your SEO will be improved because Google leverages these formats.

Last but not least, the server component of API Platform is built on top of the Symfony framework, while client components leverage React (a Vue.js flavor is also available). It means that you can:

  • Use thousands of Symfony bundles and React components with API Platform.
  • Integrate API Platform in any existing Symfony or React application.
  • Reuse all your Symfony and React skills, benefit of the incredible amount of documentation available.
  • Enjoy the popular Doctrine ORM (used by default, but fully optional: you can use the data provider you want, including but not limited to MongoDB and Elasticsearch)

Install

Setup Domain name

cp .env.example .env

edit .env file and set SERVER_NAME

SERVER_NAME=example.local

Also, you can config your db name and credentials.

Build and Start containers

docker-compose build --pull --no-cache
docker-compose up -d

Getting OS X to trust self-signed SSL certificates

Set your os always trust to below certificate

docker-compose cp caddy:/data/caddy/certificates/local/example.local/example.local.crt /any/location/in/your/machine

See https://tosbourn.com/getting-os-x-to-trust-self-signed-ssl-certificates/

Set local host for dev

sudo echo '127.0.0.1 example.local' >> /etc/hosts

Read the official "Getting Started" guide.

Credits

Created by Kévin Dunglas. Commercial support available at Les-Tilleuls.coop.