Installation
Prerequisites
- Node.js 20 LTS or newer
- Git
Quick start
-
Clone the repository
Terminal window git clone https://github.com/mfried40/kiosk-admin.gitcd kiosk-admin/kiosk-admin -
Install dependencies
Terminal window npm install -
Create your
.envfileTerminal window cp .env.example .envThen edit
.envand fill in at minimum:AUTH_SECRET=<random 32+ character string>AUTH_URL=http://localhost:3000ENCRYPTION_SECRET=<64 hex characters>Generate
ENCRYPTION_SECRETwith:Terminal window node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" -
Set up the database
Terminal window npx prisma migrate devThis creates a local
dev.dbSQLite file. No external database required. -
Start the server
Terminal window npm run devOpen http://localhost:3000/setup to create your first admin account.
Production build
npm run buildnpm startUsing PostgreSQL or MongoDB
Set these environment variables before running migrations:
DATABASE_PROVIDER=postgresqlDATABASE_URL=postgresql://user:password@localhost:5432/kiosk_adminFor MongoDB:
DATABASE_PROVIDER=mongodbDATABASE_URL=mongodb://localhost:27017/kiosk_adminThen run npx prisma db push (MongoDB) or npx prisma migrate dev (PostgreSQL) instead.
See Database configuration for more details.