Skip to content

noisebridge/donate-portal

Repository files navigation

donate.noisebridge.net

Donation portal for Noisebridge hackerspace.

Screenshot

Setup

Install Bun

curl -fsSL https://bun.sh/install | bash

Install dependencies

bun install
playwright install firefox

Set up .env file

See below.

Run setup script

bun run stripe-setup

Development

Set up environment variables

Create a .env file in the root of the repository with the following variables:

  • SERVER_HOST - 127.0.0.1:3000 for local dev
  • DISABLE_RATE_LIMIT - true for local dev and e2e tests
  • STRIPE_SECRET - Get a Stripe test key for local dev
  • STRIPE_PORTAL_CONFIG - ID like bpc_... from ./scripts/stripe-setup.ts
  • STRIPE_WEBHOOK_SECRET - Get from stripe listen --forward-to localhost:3000/webhook
  • GITHUB_CLIENT_ID - Create an OAuth app on Github
  • GITHUB_SECRET - Create an OAuth app on Github
  • GOOGLE_CLIENT_ID - Create an OAuth app in the Google Cloud Console
  • GOOGLE_SECRET - Create an OAuth app in the Google Cloud Console
  • RESEND_KEY - From https://resend.com
  • EMAIL_DOMAIN - Where to send emails from (defaults to [email protected])
  • COOKIE_SECRET - Randomly generated string
  • TOTP_SECRET - Randomly generated string

Run!

bun run dev

Test!

bun run test
bun run test:e2e

Format & Lint!

bun run lint:fix

License

AGPLv3