A simple contact registry application built using Next.js and Prisma.
- Add, edit, and delete contacts
- Search for contacts
- Store contact information, including names, email addresses, and phone numbers
- Node.js (v14 or later)
- PostgreSQL
- Docker
- Clone the repository:
git clone https://github.com/norges-bank/cbdc-sandbox-contact-registry
cd contact-registry
- Install dependencies:
npm install
- Create local database
npm run docker:postgres
-
Configure the environment:
Copy the
.env.example
file to a new file named.env
and update the values to match your PostgreSQL database settings.
cp .env.example .env.local
-
Set up the Prisma ORM:
Generate the Prisma client:
npx prisma generate
Run the migrations to create the database schema:
npx prisma migrate dev --name init
- Start the development server:
npm run dev
- Open your browser and visit http://localhost:3000 to access the application.
- Build the application:
yarn build
- Start the production server:
yarn start
- Open your browser and visit http://localhost:3000 to access the application.