How the database and ORM are configured in ShipThing.
@repo/database
. You can import this package into any server-side component, like so:
packages/database/prisma/schema.prisma
. This schema file uses Prisma’s schema definition language to describe your database tables, relationships, and types.
Post
, describing a blog post. The blog content will be in a JSON format, generated by a library like Tiptap. To do this, we would add the following to your schema:
npx prisma format
to format the schema filenpx prisma generate
to generate the Prisma clientnpx prisma db push
to push the schema changes to the databasestudio
application runs on port 3005.