Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cminhho/aws-amplify-demo
https://github.com/cminhho/aws-amplify-demo
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/cminhho/aws-amplify-demo
- Owner: cminhho
- License: mit
- Created: 2023-11-03T08:01:03.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-03T08:18:07.000Z (about 1 year ago)
- Last Synced: 2023-11-03T09:27:27.452Z (about 1 year ago)
- Language: JavaScript
- Size: 251 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React Admin Amplify Demo
This project aims to demonstrate the use of [React Admin Amplify](https://github.com/MrHertal/react-admin-amplify).
The demo is accessible here: .
Feel free to play with it!
## About React Admin Amplify
[React Admin Amplify](https://github.com/MrHertal/react-admin-amplify) is a module that connects a react-admin frontend to an Amplify backend.
It includes the data and auth providers, but also some components that make things easier to set up.
## About this demo
The schema used in this demo is a variant of the [schema with 17 patterns related to relational designs](https://docs.amplify.aws/cli/graphql-transformer/dataaccess).
## How to clone this project
If you want to use this project as a bootstrap. Follow these steps:
```sh
git clone https://github.com/MrHertal/react-admin-amplify-demo.git && cd react-admin-amplify-demo
```Install dependencies:
```sh
yarn
```Init Amplify project:
```sh
amplify init
```Push project to the cloud:
```sh
amplify push
```Do not retrieve demo user avatar and remove the custom login page:
```jsx
// in App.js// Get the demo user avatar
// authProvider.getIdentity = async () => {
// try {
// const userData = await API.graphql(
// graphqlOperation(queries.getUser, { id: "demo" })
// );// const url = await Storage.get(userData.data.getUser.picture.key);
// return {
// id: "demo",
// fullName: "Demo",
// avatar: url,
// };
// } catch (e) {
// console.log(e);
// }
// };function App() {
return (
);
}
```Create a user using the cognito console for example. If you want to change the status `FORCE_CHANGE_PASSWORD` of your newly created user, use the AWS cli as explained [here](https://stackoverflow.com/a/56948249/4140356).
Finally, add the user to the `admin` group.
Start the project:
```sh
yarn start
```You should be able to login with your user.
## Learn More
See [react-admin](https://marmelab.com/react-admin/Readme.html) and [Amplify](https://docs.amplify.aws).