Refisma is a tool to help you create CRUD applications by using Prisma. It generates services and endpoints for you, so you can focus on the business logic.
Refisma is a tool to help you create CRUD applications by using Prisma. It generates services and endpoints for you, so you can focus on the business logic.
- Next.js
- Node.js (Express)
- MaterialUI
- ChakraUI
- Ant Design
- Mantine
- Types will be based on the Prisma schema
- Zod validation
- Pagination
- Sorting
- Filtering
- Generating services and endpoints for Relations
- One to One
- One to Many
- Many to Many
- Refine Pages (Only for Next.js & MaterialUI)
- List Page
- Create Page
- Edit Page
- Show Page
- Custom identifier for resources
- Providers
- Auth
- i18n
- Access Control
- Compiler For Refisma
- hide fields on views (list, create, edit, show)
- fields accessiblities (list, create, edit, show)
- Middlewares
- Zod validation
- Access Control
npm install refisma
npx refisma
npm install @prisma/client zod
npm install prisma --save-dev
DATABASE_URL=""
NEXT_PUBLIC_SERVER_API_URL='http://localhost:3000/api'
You need to add aliases to your tsconfig.json file.
{
...
"paths": {
"@services/*": ["services/*"],
"@schemas/*": ["schemas/*"],
...
}
...
}
### Adding New Resources to _app.tsx file
The example below shows how to add a new resource to the _app.tsx file.
<Refine
...
resources={[
...
{
name: '{{resourceName}}',
list: '/{{resourceName}}',
create: '/{{resourceName}}/create',
edit: '/{{resourceName}}/edit/:id',
show: '/{{resourceName}}/show/:id',
meta: {
canDelete: true,
},
}
...
]}
...
>
npx prisma generate