This is designed to be an offline version of the Prisma Playground as I found that the online version sometimes errors out and can sometimes be a little slow.
Note that rather than scrape the data in the Playground database, this project uses Faker to create the data but the schema should still be compatible.
Note that this repo is based on the template that Prisma uses to demonstrate its Client Extensions, e.g. this one so thanks to them for that 😀
Clone this repository:
git clone git@github.com:BounceSecurity/prisma-playground-simulator.git
Create a .env
file and install dependencies:
cd prisma-sqli
cp .env.example .env
npm install
Run the following command to start a new Postgres database in a Docker container:
docker compose up -d
Run this command to apply migrations to the database:
npx prisma migrate deploy
Run the following command to add seed data to the database:
npx prisma db seed
To run the Javascript version of the simulator, run the following command:
npm run dev
To run the Typescript version of the simulator, run the following command:
npm run devts
(You may need agree to install tsx)