Event website built with Nuxt and Contentful CMS.
# Install dependencies
pnpm install
# Populate the .env file
cp .env.example .env
# Generate GraphQL types
pnpm generate:types:watchStart the development server on http://localhost:3000:
pnpm devBuild the application for production:
pnpm buildLocally preview production build:
pnpm previewThis project requires the following environment variables:
- Contentful CMS
NUXT_CMS_ENV: Contentful environment (ex. "master")NUXT_CMS_API_KEY: Contentful content delivery API keyNUXT_CMS_SPACE: Contentful space IDNUXT_CMS_PREVIEW_API_KEY: Contentful preview API key, used for preview modeNUXT_CMS_PREVIEW_SECRET: Secret token for accessing preview mode, recommended to generate a random string with letters and numbers
- Site password configuration
NUXT_SESSION_PASSWORD: Secret token for encrypting session cookies, recommended to generate a random string with letters, numbers, and symbols, 32 charactersNUXT_SITE_PASSWORD: Guest password for accessing the site
- OAuth Zitadel configuration, for the admin dashboard login
NUXT_OAUTH_ZITADEL_CLIENT_ID: Client ID from Zitadel OAuth appNUXT_OAUTH_ZITADEL_CLIENT_SECRET: Client secret from Zitadel OAuth appNUXT_OAUTH_ZITADEL_DOMAIN: Domain for Zitadel OAuth app
DATABASE_URL: Connection string for the Neon Postgres databaseNUXT_DISCORD_WEBHOOK_URL: Webhook URL for sending notifications to Discord when a new RSVP or memory is submitted (optional)NUXT_HOME_ASSISTANT_WEBHOOK_URL: Webhook URL for sending notifications to Home Assistant when a new RSVP is submitted (optional)NUXT_PUBLIC_ANALYTICS_URL: URL for the GoatCounter analytics script.
RSVPs and memory form submissions are stored using a Postgres database, with a Neon cloud database adapter. Drizzle ORM is used to query and run migrations against the database.
Database migrations are automatically run by GitHub actions on push to the "staging" and "main" branches.
Other common database commands include:
Note: All commands are run against the DATABASE_URL credentials specified in the .env file.
pnpm db:generate: Generate SQL migration files based on changes to the Drizzle schema.pnpm db:migrate: Run pending SQL migrations against the database.pnpm db:push: Sync the Drizzle schema to the database without generating a migration file.pnpm db:studio: Start the Drizzle Studio web UI for navigating the database.pnpm db:seed: Seed the database with test data from thescripts/seed.csvfile. Test scenarios include a single invite, an invite with an unnamed plus one, and a family of 4.pnpm db:seed:prd: Seed the database with real guest data from thescripts/guests.csvfile. This file is ignored by Git, to prevent committing sensitive guest information.
To view a page in preview mode, append the query parameter ?token=[NUXT_PREVIEW_SECRET] to the end of the URL. After logging in, you will be able to view the preview version of the page.
For example: http://localhost:3000/travel?token=abc123