Muli-joe/library-management-system ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple library management backend for a book catalog.

I want a NestJS app with Prisma and PostgreSQL that can store users, genres, books, and reviews. Books should belong to a genre through a proper relation, not by typing the genre name into every book. Users should have a role of either patron or librarian, and new users should default to patron. Books should track how many copies exist and how many are available. Reviews should connect a user to a book, and the same person shouldn’t be able to review the same book twice.

Please set up the Prisma schema, the initial migration, and a seed script with a few genres and books so I can test it right away. Make sure the database connections are wired up cleanly in NestJS and the project starts from a simple env file with a PostgreSQL connection string. If you need to check current NestJS or Prisma docs while setting it up, feel free to do that.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab