https://github.com/tsingson/ra-postgrest-client
react-admin's dataProvider for postgREST
https://github.com/tsingson/ra-postgrest-client
aor-postgrest-client javascript postgrest react-admin
Last synced: 2 months ago
JSON representation
react-admin's dataProvider for postgREST
- Host: GitHub
- URL: https://github.com/tsingson/ra-postgrest-client
- Owner: tsingson
- License: mit
- Created: 2018-05-04T01:03:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-04T16:54:28.000Z (over 3 years ago)
- Last Synced: 2025-10-11T22:58:21.383Z (6 months ago)
- Topics: aor-postgrest-client, javascript, postgrest, react-admin
- Language: JavaScript
- Homepage:
- Size: 114 KB
- Stars: 4
- Watchers: 0
- Forks: 2
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ra-postgrest-client : react-admin's dataProvider for postgREST
**fork from https://github.com/tomberek/aor-postgrest-client and port to [React-Admin](https://marmelab.com/react-admin/) ( new name for admin-on-rest version 2.0 )**
thanks a lot to [tomberek](https://github.com/tomberek)
For using [PostgRest](https://github.com/PostgREST/postgrest) with [react-admin](https://github.com/marmelab/react-admin), use the `postgrestClient` function to convert React-Admin's REST dialect into one compatible with postgREST.
## motivation
reference to [postgrest-guide](https://github.com/tsingson/postgrest-guide)
in a new project, we try to replace Admin Panel with new [React-Admin](https://github.com/marmelab/react-admin), this repo is bridge to [PostgRest](https://github.com/PostgREST/postgrest)
## some New
* support React-Admin ( Admin-On-Rest 2.0 ) only
* support postgRest 4.4 with pgjwt ( generate JWT via pgplsql ) , and will add authProvider for postgRest soon
* support multiple item to delete
* support filters in react-admin well
## Installation
```
yarn add ra-postgrest-client
```
## Usage
```js
// in src/App.js
import React from "react";
import {Admin, Resource, Delete} from "react-admin";
import postgrestClient from "ra-postgrest-client";
import {
CategoryList,
CategoryCreate,
CategoryEdit,
CategoryShow
} from "./cms/Category";
const App = () => (
);
export default App;
```
## Build
clone the repo and build
```
git clone https://github.com/tsingson/ra-postgrest-client
cd ./ra-postgrest-client
make build
```
## Work in Progress
**Do not use in production**
this repo is work in progress yet.......
## License
This library is licensed under the [MIT Licence](LICENSE)