Skip to content

Setup admin site infrastructure and authentication#4

Open
umarluqman wants to merge 10 commits intobackpine:mainfrom
umarluqman:umarluqman/center-list-views
Open

Setup admin site infrastructure and authentication#4
umarluqman wants to merge 10 commits intobackpine:mainfrom
umarluqman:umarluqman/center-list-views

Conversation

@umarluqman
Copy link

Summary

Added Amplify webhook integration to trigger directory site deployments when admin data changes. Implemented invitation-based signup flow with automatic center assignment and CLI tools for superadmin management.

Key Changes

  • Amplify webhook trigger (src/lib/amplify.ts): Fire-and-forget HTTP POST to rebuild directory site on updateCenter mutations
  • Invitation signup (signUpWithInvitation): Combined signup and center assignment in one atomic operation
  • Auth restrictions: Locked down email signup to invitation links only via better-auth middleware
  • CLI scripts: create-superadmin and delete-superadmin for user management
  • Deployment config: Updated Cloudflare Workers URLs and production environment settings

Testing

Set AMPLIFY_WEBHOOK_URL in .dev.vars, then test by editing a center in the admin UI and verifying an Amplify build is triggered.

🤖 Generated with Claude Code

umarluqman and others added 10 commits December 25, 2025 14:04
- Add Amplify webhook trigger to deploy directory site on data changes
- Implement invitation-based signup system with automatic center assignment
- Add better-auth middleware to restrict signups to invitation links
- Create superadmin/delete-superadmin CLI scripts for user management
- Update deployment config and trusted origins for production URLs
- Switch from client-side auth to server-side signup with invitation flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant