Repository navigation
Getting Started
Get up and running with the Avalanche Center Websites project in minutes.
-
Node 24.x
-
pnpm 10.28 (the version is pinned in
package.jsonpackageManager;corepack enablepicks it up) -
sqlite3 CLI (used by the seed scripts)
-
drift- the pre-commit hook runspnpm drift:check, which needs thedriftbinary on your PATH. It's a standalone binary, sopnpm installwon't provide it:brew install fiberplane/tap/drift # macOS / Linux
Then clone the repo.
Create the .env file:
cp .env.example .envImportant
Contact a member of the dev team to get required secret values (TODO: add to shared password manager).
The seed script needs a password for the seeded users. For local dev, add this to .env to use the default password localpass:
ALLOW_SIMPLE_PASSWORDS=trueOr set PAYLOAD_SEED_PASSWORD to choose your own.
pnpm iThe seed scripts create dev.db (in WAL mode) for you, replacing any existing one. There's no need to create the database by hand.
-
pnpm seed- Fresh database and full seed with Next.js dev server -
pnpm seed:standalone- Seed only, faster (no dev server)
When you make changes to the schema or seed data:
- Start with your current database
- Make your changes and test them
- Have
pnpm devrunning - Run
pnpm reseedto update only the changed values - Back up the database to use as your new seed reference
To test tenant-scoped subdomains on your local machine, add the following entries to your hosts file:
-
macOS: Edit
/etc/hosts -
Windows: Edit
C:\Windows\System32\drivers\etc\hosts
127.0.0.1 dvac.localhost
127.0.0.1 nwac.localhost
127.0.0.1 sac.localhost
127.0.0.1 snfac.localhost
The application uses Next.js middleware (src/middleware.ts) to dynamically route requests from these subdomains to the appropriate tenant. Requests are rewritten based on subdomains, custom domains, or direct domain access—allowing multiple URLs to serve the same tenant-specific content.
Then start the development server:
pnpm devOnce the database is seeded and the development server is started:
- Visit
localhost:3000to see our AvyFX homepage. - To see an individual avy site, include the slug in the URL
SLUG.localhost:3000 - Log in to the admin panel at
localhost:3000/adminasadmin@avy.com(super admin) using the seed password above. See the seed script for the full list of seeded users and roles.
If something doesn't work, check Troubleshooting.
- See Git Workflow for guidelines for commits, required signing, and collaborative development.
- See Developer Docs for architecture and coding guides.