GithubHelp home page GithubHelp logo

amenophis / api-platform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from api-platform/api-platform

0.0 3.0 0.0 354 KB

API-first web framework on top of Symfony with JSON-LD, Schema.org and Hydra support

Home Page: https://api-platform.com

License: MIT License

ApacheConf 6.28% PHP 91.04% Shell 2.68%

api-platform's Introduction

The API Platform framework

Join the chat at https://gitter.im/api-platform/api-platform

The new breed of web frameworks

API Platform

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

API Platform is a next-generation PHP web framework designed to easily create API-first projects without compromising 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, Hydra (and such other data formats like HAL, YAML, XML, CSV) and provides a ton of features (CRUD, validation and error handling, relation embedding, filters, ordering...)
  • Enjoy the beautiful automatically generated API documentation (Swagger-like)
  • Easily add 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

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 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 recommends these formats. And yes, Google crawls full-Javascript applications as well as old-fashioned ones.

Last but not least, 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 of the incredible amount 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 api-platform/api-platform 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?

API Platform provides rock solid foundations to build your project:

  • The Schema Generator to generate PHP entities from Schema.org types with Doctrine ORM mappings, Symfony validation and extended PHPDoc
  • The API bundle to expose in minutes your entities as a JSON-LD and Hydra enabled hypermedia REST API
  • NelmioApiDocBundle integrated with the API bundle to automatically generate a beautiful human-readable documentation and a sandbox to test the API
  • Behat and Behatch configured to easily test the API
  • The full power of the Symfony framework and its ecosystem
  • Doctrine ORM/DBAL
  • 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 - API Platform is built on top of the full-stack Symfony framework
  • API Platform's API bundle - 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 (useful in emails)
  • SecurityBundle - Authentication and roles 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 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 API Platform.

Oauth support can also be easily added using FOSOAuthServerBundle.

Enjoy!

Credits

Created by Kévin Dunglas. Sponsored by Les-Tilleuls.coop Commercial support available upon request.

api-platform's People

Contributors

aitboudad avatar dunglas avatar gitter-badger avatar n1c01a5 avatar nitneuk avatar sroze avatar teohhanhui avatar theofidry avatar toofff avatar tpluscode avatar vincentchalamon avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.