Skip to content
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

Improve prisma example #2441

Merged
merged 3 commits into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion examples/with-prisma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,34 @@

<p class="description">A basic Toolpad application that demonstrates how to integrate with prisma.</p>

{{"component": "modules/components/DocsImage.tsx", "src": "/static/toolpad/marketing/with-prisma.png", "alt": "Toolpad example with prisma", "caption": "Toolpad example with prisma" }}
<a target="_blank">
<img src="https://mui.com//static/toolpad/marketing/with-prisma.png" alt="Toolpad example app with Prisma ORM" style="aspect-ratio: 1.8" width="100%">
</a>

## How to run

Download the example [or clone the repo](https://github.com/mui/mui-toolpad):

<!-- #default-branch-switch -->

```bash
curl https://codeload.github.com/mui/mui-toolpad/tar.gz/master | tar -xz --strip=2 mui-toolpad-master/examples/with-prisma
cd with-prisma
```

Install it and run:

```bash
npm install
npm run dev
```

## What's inside

This app demonstrates the following capabilities of Toolpad:

1. Reusing your models in Toolpad UI
2. Using a Data Grid, Button and a text input component.
3. Using CRUD operations from [Prisma Client API](https://www.prisma.io/docs/concepts/components/prisma-client/crud)

[Check out the source code](https://github.com/mui/mui-toolpad/tree/master/examples/with-prisma)