2025-07-28 13:03:15 +02:00
2025-07-28 12:57:12 +02:00
2025-07-28 12:25:42 +02:00
Fix
2025-07-27 21:16:43 +02:00
2025-07-28 12:25:42 +02:00
2025-07-28 13:03:15 +02:00
2025-07-28 12:25:42 +02:00
2025-07-28 12:25:42 +02:00
2025-07-27 17:36:52 +02:00
2025-07-28 13:03:15 +02:00
2025-07-27 17:36:52 +02:00
2025-07-27 18:45:21 +02:00

BayesBond

This repository provides a boilerplate to quickly set up a Next.js demo application with authentication using NextAuth.js v4, Prisma Postgres and Prisma ORM, and deploy it to Vercel. It includes an easy setup process and example routes that demonstrate basic CRUD operations against the database.

Features

Getting started

1. Install dependencies

After cloning the repo and navigating into it, install dependencies:

npm install

1. Create a Prisma Postgres instance

Create a Prisma Postgres instance by running the following command:

npx prisma init --db

2. Set up your .env file

You now need to configure your database connection via an environment variable.

First, create an .env file:

touch .env

To ensure your authentication works properly, you'll also need to set env vars for NextAuth.js:

AUTH_SECRET="RANDOM_32_CHARACTER_STRING"

You can generate a random 32 character string for the AUTH_SECRET secret with this command:

npx auth secret

In the end, your entire .env file should look similar to this (but using your own values for the env vars):

DATABASE_URL="prisma+postgres://accelerate.prisma-data.net/?api_key=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcGlfa2V5IjoiMWEzMjBiYTEtYjg2Yy00ZTA5LThmZTktZDBhODA3YjQwZjBkIiwidGVuYW50X2lkIjoiY2RhYmM3ZTU1NzdmMmIxMmM0ZTI1Y2IwNWJhZmZhZmU4NjAxNzkxZThlMzhlYjI1NDgwNmIzZjI5NmU1NTkzNiIsImludGVybmFsX3NlY3JldCI6ImI3YmQzMjFhLTY2ODQtNGRiMC05ZWRiLWIyMGE2ZTQ0ZDMwMSJ9.JgKXQBatjjh7GIG3_fRHDnia6bDv8BdwvaX5F-XdBfw"

AUTH_SECRET="gTwLSXFeNWFRpUTmxlRniOfegXYw445pd0k6JqXd7Ag="

3. Migrate the database

Run the following commands to set up your database and Prisma schema:

npx prisma migrate dev --name init


### 5. Run the app

Start the development server:

```bash
npm run dev

Once the server is running, visit http://localhost:3000 to start using the app.

Description
No description provided
Readme AGPL-3.0 14 MiB
Languages
TypeScript 94.1%
JavaScript 1.6%
PLpgSQL 1.3%
CSS 1.1%
Shell 0.8%
Other 1%