- Notifications
You must be signed in to change notification settings - Fork0
A beautiful and fully-featured administration interface builder for hypermedia APIs
License
SebLevDev/api-platform-admin
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
API Platform Admin is a tool to automatically create a beautiful (Material Design) and fully-featured administration interfacefor any API supportingthe Hydra Core Vocabulary or exposing anOpenAPI documentation,including but not limited to all APIs created usingthe API Platform framework.
The generated administration is a 100% standalone Single-Page-Application with no coupling to the server part, accordingto the API-first paradigm.
API Platform Admin parses Hydra or OpenAPI documentations, then uses the awesomeReact-adminlibrary (andReact) to expose a nice, responsive, management interface (Create-Retrieve-Update-Delete)for all available resources.
You can also customize all screens by using React-admin components and even raw JavaScript/React code.
Click here to test API Platform Admin in live.
The source code of the demo is availablein this repository.
yarn add @api-platform/adminimportReactfrom'react';importReactDOMfrom'react-dom';import{HydraAdmin,OpenApiAdmin}from'@api-platform/admin';// To use Hydra:constAdmin=()=><HydraAdminentrypoint="https://demo.api-platform.com"/>;// Replace with your own API entrypoint// To use OpenAPI (with a very simple REST data provider):constAdmin=()=><OpenApiAdmindocEntrypoint="https://demo.api-platform.com/docs.json"// Replace with your own OpenAPI documentation entrypointentrypoint="https://demo.api-platform.com"// Replace with your own API entrypoint/>;ReactDOM.render(<Admin/>,document.getElementById('root'));
Or alternatively:
importReactfrom'react';importReactDOMfrom'react-dom';import{AdminGuesser,hydraDataProvider,hydraSchemaAnalyzer,openApiDataProvider,openApiSchemaAnalyzer}from'@api-platform/admin';importsimpleRestProviderfrom'ra-data-simple-rest';// Use your custom data provider or resource schema analyzer// Hydra:constdataProvider=hydraDataProvider({entrypoint:'https://demo.api-platform.com'});constschemaAnalyzer=hydraSchemaAnalyzer();// OpenAPI:constdataProvider=openApiDataProvider({// Use any data provider you likedataProvider:simpleRestProvider('https://demo.api-platform.com'),entrypoint:'https://demo.api-platform.com',docEntrypoint:'https://demo.api-platform.com/docs.json',});constschemaAnalyzer=openApiSchemaAnalyzer();constAdmin=()=>(<AdminGuesserdataProvider={dataProvider}schemaAnalyzer={schemaAnalyzer}/>);ReactDOM.render(<Admin/>,document.getElementById('root'));
- Automatically generates an admin interface for all the resources of the API thanks to the hypermedia features of Hydra or to the OpenAPI documentation
- Generates 'list', 'create', 'show', and 'edit' screens, as well as a delete button
- Generates suitable inputs and fields according to the API doc (e.g. number HTML input for numbers, checkbox for booleans, selectbox for relationships...)
- Generates suitable inputs and fields according to Schema.org types if available (e.g. email field for
http://schema.org/email) - Handles relationships
- Supports pagination
- Supports filters and ordering
- Automatically validates whether a field is mandatory client-side according to the API description
- Sends proper HTTP requests to the API and decodes them using Hydra and JSON-LD formats if available
- Nicely displays server-side errors (e.g. advanced validation)
- Supports real-time updates withMercure
- All thefeatures provided by React-admin can also be used
- 100% customizable
The documentation of API Platform Admin can be browsedon the official website.
Check also the documentation of React-adminon their official website.
Created byKévin Dunglas. Sponsored byLes-Tilleuls.coop.Commercial support available upon request.
About
A beautiful and fully-featured administration interface builder for hypermedia APIs
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- TypeScript94.7%
- PHP2.4%
- Dockerfile1.2%
- JavaScript0.8%
- Shell0.5%
- Twig0.2%
- MDX0.2%
