New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document a way of wrapping Existing api with BaseResource #306
Comments
yes, but it is not the same as in react-admin. You will have to write your custom resource adapter which extends from BaseResource class. I recently wrote an example app in typescript which shows this approach: Here is the adapter which wraps JIRA API for projects: https://github.com/wojtek-krysiak/admin-bro-workshop/blob/master/src/jira-projects/jira-project.adapter.ts and here is how to add this to AdminBroOptions: https://github.com/wojtek-krysiak/admin-bro-workshop/blob/master/src/admin/router.ts#L25 Example uses the latest beta version but it should work with the 1.6.x as well. Here you can find the documentation for all methods in BaseResource: https://softwarebrothers.github.io/admin-bro-dev/BaseResource.html (1.6v) or: https://softwarebrothers.github.io/admin-bro-dev/v2/BaseResource.html (2.0 v) |
@wojtek-krysiak Thanks. Is it possible to use AdminBro UI as SPA without any server routing? If so, how could I render root component? |
@wojtek-krysiak any help? |
you can reuse our design system. It is here: https://github.com/SoftwareBrothers/admin-bro/tree/master/src/frontend/components/design-system. You can copy it to your project and use all the components we build (we have plan to extract this to a separate npm package) |
@wojtek-krysiak No, I mean I would like if it would be possible to use auto generated UI for
Is there any plans to support something like this? |
no. we dont have this in plans unfortunately :(. but may I ask why you dont want to use react-admin? |
It have a pure support for typescript and also it doesn't have something like |
What is the advantages of using frontend UI through server instead of SPA approach? |
in server version, you have everything out of the box. So, in order to build a working admin panel you just need a database connection - admin generates api routes on the backend with all the CRUD logic. In SPA version you have to maintain backend on our own. I am leaving this task open and I will add this to a description. Maybe someone will do this. |
why is this closed? this isnt documented https://docs.adminjs.co/basics/resource or do i miss something?! |
Original question:
I have my own rest crud api and I would like to use only frontend part of admin-bro.
Does admin-bro support such scenario?
Proposed solution: MVP
End Solution
externalAPI
(but we have to think of how to copy this function to the 'frontend' side)The text was updated successfully, but these errors were encountered: