Overview

We make use of Postgresql and Prisma for our dashboard. This is an easy implementable stack that could be configured to your needs with following steps.

What is Prisma?

Prisma helps app developers build faster and make fewer errors with an open source database toolkit for PostgreSQL, MySQL, SQL Server, SQLite and MongoDB.

How to add a model

In the backend project we have a folder named Prisma there we have a file name schema.prisma. An example of adding a model would be:

model User {
  id String @id @default(uuid())

  //credentials
  firstname String?
  lastname  String?
  email     String @unique
  password  String?

  @@map("users")
}
🛑

Make sure you make a migration after adding a new model. This way the new data type will be accesible in your code.

you can check out the Prisma documentation if you want to go more in depth.