Paywall-style signup page for a Mastodon instance. Users subscribe via PayPal and an account is created through the Mastodon API.
- Node.js 20+ (or compatible with Next.js 16)
- A Mastodon API token with account creation permissions
- PayPal subscription client + plan IDs
Server/runtime variables (set on the server, no rebuild required):
API_TOKEN- Mastodon API tokenPAYPAL_CLIENT_ID- PayPal client IDPAYPAL_PLAN_ID- PayPal subscription plan ID
Local development:
cp .env.local.example .env.localFill in .env.local with the variables above.
npm install
npm run devnpm run build
npm run startThe client fetches PayPal config at runtime from:
/api/public-config
This allows you to set PayPal IDs on the server without rebuilding.