Prerequisites
Before you begin, make sure you have the following:- Node.js 20.x — The
enginesfield inpackage.jsonpins the required version. Use nvm or fnm to manage Node versions. - A Supabase project — Create one at supabase.com. You will need the project URL and anon key. See Database Setup and Environment Variables.
- npm — Comes bundled with Node.js. The project uses
package-lock.json, so npm is preferred over Yarn or pnpm.
Install
Install dependencies
package.json, including Next.js, the Supabase client libraries, Tailwind CSS v4, and the PWA plugin.Configure environment variables
Create a See Environment Variables for the full list of supported variables, including optional SMTP and Axiom settings.
.env.local file in the project root with your Supabase credentials:.env.local
Run the database migrations
Apply the SQL migrations in your Supabase SQL Editor before starting the app. See Database Setup for the full migration order and instructions.
Start the development server
--webpack flag is set explicitly to avoid Turbopack incompatibilities with some dependencies).Available scripts
| Command | Description |
|---|---|
npm run dev | Start the development server with hot reload at localhost:3000 |
npm run build | Compile a production build (outputs to .next/) |
npm start | Start the production server (requires a prior npm run build) |
npm run lint | Run ESLint across the src/ directory |
Production deployment
The project includes arender.yaml for one-click deployment to Render:
render.yaml
PWA support
The app is configured as a Progressive Web App using@ducanh2912/next-pwa. When built for production, Next.js generates a manifest.json and a service worker automatically. Users on Chrome or Safari can install the app to their home screen for an app-like experience — useful for tablets running the kiosk.
No additional configuration is needed for PWA support. The manifest.json is served from /manifest.json and is referenced in the <head> via the metadata.manifest field in src/app/layout.tsx.