passkeyd

Database

Passkeyd uses Prisma as an ORM to interface with a database. Prisma generates Typescript types for you schema (schema.prisma). Prisma supports Postgres, MySQL, SQLite, MongoDB, MariaDB and CockroachDB. Prisma also helps you run migrations.

Picking a database

You can select your desired database in the prisma schema. Default is SQLite which will create a file in the prisma folder that holds you local development database.

datasource db {
  provider = "sqlite" //OR postgresql, mysql, sqlserver, mongodb, cockroachdb
  url      = env("DATABASE_URL")
}

Opting out of prisma

If you want to opt out of prisma or itegrate passkeyd to an existing solution you first need to transform the schema.prisma to a real database schema format. This is done by running an initial migration and open up the migrations folder to find the generated code.

Database hosting

Postgres

My prefered Postgres database hosting provider is Neon. If you deploy on vercel you can use Vercel Postgres which is using Neon behind the scenes.

SQLite

If you want to use SQLite I recommend Turso