- Create a .env.local file and populate it with a PostgreSQL Database URL, Admin Public Key and RPC Url
POSTGRES_URL=
NEXT_PUBLIC_ADMIN_PUBLIC_KEY=
NEXT_PUBLIC_MAINNET_ENDPOINT=
- Install all dependencies
yarn
- Generate the Prisma client
yarn prisma generate
- Deploy the Prisma schema
yarn prisma db push
- Run the development server
yarn dev
- Open the Prisma GUI to add values to your db
yarn prisma studio
Prerequisites:
- A Vercel account.
- A GitHub account.
-
Use the 'Deploy with Vercel' Button:
Clicking on the button will navigate you to the Vercel platform for deployment initialization. Through this process:
- A new repository is created in your GitHub account with the source code.
- A PostgreSQL storage instance is set up on Vercel. If you're inclined to use an external PostgreSQL instance, you'll need to set the
POSTGRES_URL
environment variable in the Vercel app.
During this deployment phase, be ready to provide values for certain environment variables (
NEXT_PUBLIC_ADMIN_PUBLIC_KEY
andNEXT_PUBLIC_MAINNET_ENDPOINT
). -
Post-Deployment Configurations:
Should you decide to host your PostgreSQL externally, make it a point to whitelist the Vercel deployment URL, ensuring uninterrupted access for the application to the database.