floriaaan / prismext

Prismext is a plug'n'play back-office for Next.js & Prisma apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Prismext

Database management for NextJS+Prisma apps

A plug'n'play back-office solution for your apps

Bundle Size Downloads Github Stars Github Stable Release

Overview

Prismext is a plug'n'play back-office solution for your apps. It is built on top of NextJS and Prisma. Prismext repo is composed of two parts:

  • Prismext - The main repo, which contains the core of the project
  • Prismext Examples - A collection of examples to help you get started with Prismext

Getting Started

npm install prismext

TODO: Add more info

Features

CRUD operations

Prismext provides a set of components to perform CRUD operations on your database. It is built on top of Prisma and NextJS.

Supported operations:

[X] Create [X] Read [ ] Update [ ] Delete

Pages

TO BE COMPLETED

TypeScript

Prismext comes with built-in types to help you get started with Prismext configuration. You can check the Prismext Types to see all the available types.

Example

Add API Route

// pages/api/[...prismext]/index.(js|ts)
import { Prismext } from "prismext";
import prisma from "lib/prisma";

export default Prismext({
  prisma: {
    // You can bring your own prisma instance
    instance: prisma,
  },
});

Add Prismext page

// pages/prismext.(js|tsx) (or any other path, e.g. pages/admin/prismext.tsx)
import { PrismextPage } from "prismext/client";

// You can add a GetServerSideProps function to manage access to the page (with cookies or Nextauth.js for example)

const PrismextClient = () => {
  {
    /* You can add your own components here such as a "middleware" */
  }
  return <PrismextPage />;
};

export default PrismextClient;

Security

If you think you have found a vulnerability (or not sure) in Prismext, please open Pull Requests/Issues/Discussions.

Contributing

We're open to all community contributions!

License

Apache-2.0

About

Prismext is a plug'n'play back-office for Next.js & Prisma apps

License:Apache License 2.0


Languages

Language:TypeScript 88.6%Language:JavaScript 11.4%