Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/g33kdev/ra-appwrite

React Admin Data and Auth Providers for Appwrite
https://github.com/g33kdev/ra-appwrite

appwrite react-admin

Last synced: 3 months ago
JSON representation

React Admin Data and Auth Providers for Appwrite

Awesome Lists containing this project

README

        

# ra-appwrite

[![Stable Release](https://img.shields.io/npm/v/ra-appwrite)](https://www.npmjs.com/package/ra-appwrite)
![License](https://img.shields.io/github/license/g33kdev/ra-appwrite.svg?style=flat-square)

This package provides a Data Provider and Auth Provider to integrate [Appwrite](https://appwrite.io/) with [react-admin](https://marmelab.com/react-admin).

The Data Provider supports:

- Documents

The Auth Provider supports:

- Login
- Logout
- Permissions (Teams)

## Installation

```sh
yarn add ra-appwrite
# or
npm install ra-appwrite
```

## Usage

```jsx
import React from "react";
import { Appwrite } from "appwrite";
import { AppwriteDataProvider, AppwriteAuthProvider } from "ra-appwrite";
import {
Admin,
EditGuesser,
ListGuesser,
Resource,
ShowGuesser,
} from "react-admin";

// Init your Web SDK
const appwrite = new Appwrite();

appwrite
.setEndpoint("http://localhost/v1") // Your Appwrite Endpoint
.setProject("455x34dfkj"); // Your project ID

// Create a mapping of resources to collection IDs
const resources = {
movies: "6160a2ca6b6fc",
};

// Initialize the providers
const dataProvider = new AppwriteDataProvider(appwrite, resources);
const authProvider = new AppwriteAuthProvider(appwrite);

const App = (): JSX.Element => (



);

export default App;
```

## Roadmap

- Add support for fetching teams
- Add support for fetching files