Skip to content

iArnaud/api-platform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dunglas's API platform

The new bread of web frameworks

The framework is still in development. The first public release is planned for the end of June 2015

Dunglas's API platform is a next-generation PHP web framework designed to create API-first projects easily but without compromise in the field of extensibility and flexibility:

  • Use our awesome code generator to bootstrap a fully-functional data model from Schema.org vocabularies with ORM mapping and validation (you can also do it manually)
  • Expose in minutes an hypermedia REST API that works out of the box by reusing entity metadata (ORM mapping, validation and serialization) ; that embraces JSON-LD and Hydra and provides a ton of features (CRUD, validation and error handling, relation embedding, filters, ordering...)
  • Enjoy the beautiful automatically generated API documentation (Swagger-like)
  • Add easily JSON Web Token or OAuth authentication
  • Create specs and tests with a developer friendly API context system on top of Behat
  • Develop your website UI, webapp, mobile app or anything else you want using your preferred client-side technologies! Tested and approved with AngularJS (integration included), Ionic, React and native mobile apps

Dunglas's API platform embraces open web standards (JSON-LD, Hydra, JWT, OAuth, HTTP, HTML5...) and the Linked Data movement. Your API will automatically expose structured data in Schema.org/JSON-LD. It means that your Dunglas's API platform application is usable out of the box with technologies of the semantic web.

It also that your SEO will be improved because Google recommends these formats. And yes, Google crawls full-Javascript applications as well as old-fashioned ones.

Last but not least, Dunglas's API platform is built on top of the Symfony full-stack framework and follows its best practices. It means than you can:

  • use thousands of Symfony bundles with API platform
  • integrate API platform in any existing Symfony application
  • reuse all your Symfony skills and benefit from the incredible number of Symfony documentation
  • 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 ODM and ElasticSearch)

Install

Use Composer to create your new project:

composer create-project dunglas/api-platform --stability=dev my-api

Start to hack

A demo application (a bookstore) is pre-installed.

  • Run app/console server:start and open http://localhost:8000 in any HTTP client to access the API.
  • Open http://localhost:8000/doc to read the HTML documentation an play with the sandbox.
  • Give a try to the HydraConsole client to leverage JSON-LD and Hydra features.
  • Build your first custom client using Javascript, CORS headers are already configured.

What's inside?

Dunglas's API platform provides rock solid foundations to build your project:

  • The full power of the Symfony framework and its ecosystem;

  • Doctrine ORM/DBAL;

  • PHP Schema to generate PHP entities from Schema.org types with Doctrine ORM mappings, Symfony validation and extended PHPDoc.

  • DunglasJsonLdApiBundle to expose in minutes your entities as a JSON-LD and Hydra enabled hypermedia REST API.

  • NelmioApiDocBundle integrated with DunglasJsonLdApiBundle to automatically generate a beautiful human-readable documentation and a sandbox to test the API.

  • Behat and Behatch configured to easily test the API.

  • An AppBundle you can use to start coding;

  • Annotations enabled for everything;

  • Swiftmailer and Twig to create beautiful emails;

It comes pre-configured with the following bundles:

  • Symfony - Dunglas's API platform is built on top of the full-stack Symfony framework

  • DunglasJsonLdApiBundle - Creates powerful Hypermedia APIs supporting JSON-LD and Hydra

  • NelmioCorsBundle - Support for CORS headers

  • NelmioApiDocBundle - Generates a human-readable documentation

  • FosHttpCacheBundle - Add powerful caching capacities, supports Varnish, Nginx a built-in PHP reverse proxy

  • SensioFrameworkExtraBundle - Adds several enhancements, including template and routing annotation capability

  • DoctrineBundle - Adds support for the Doctrine ORM

  • TwigBundle - Adds support for the Twig templating engine

  • SecurityBundle - Adds security by integrating Symfony's security component

  • SwiftmailerBundle - Adds support for Swiftmailer, a library for sending emails

  • MonologBundle - Adds support for Monolog, a logging library

  • WebProfilerBundle (in dev/test env) - Adds profiling functionality and the web debug toolbar

  • SensioDistributionBundle (in dev/test env) - Adds functionality for configuring and working with Symfony distributions

  • SensioGeneratorBundle (in dev/test env) - Adds code generation capabilities

All libraries and bundles included in Dunglas's API platform are released under the MIT or BSD license.

Authentication support

Json Web Token is a lightweight and popular way to handle authentication in a stateless way. Install LexikJWTAuthenticationBundle to adds JWT support to Dunglas's API platform.

Oauth support can also be easily added using FOSOAuthServerBundle.

Enjoy!

Credits

Built by Kévin Dunglas. Commercial support available upon request.

About

Dunglas's API platform: the new bread of API-first web frameworks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 94.8%
  • ApacheConf 5.2%