From 2ed1c09657299eef7f29e9aee1217d3efe4d2e1b Mon Sep 17 00:00:00 2001 From: Andrei Date: Wed, 8 Oct 2025 11:42:41 +0000 Subject: [PATCH] feat: Add registration mode setting (invite-only vs public) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backend: - Added registrationMode and requireInviteCode to settings endpoint - Values pulled from REGISTRATION_MODE and REQUIRE_INVITE_CODE env vars - Defaults to 'invite_only' mode (requires invite code) Frontend: - Added Registration Mode dropdown to General settings tab - Options: 'Invite Only' or 'Public Registration' - Spans full width on desktop layout - Settings persist with backend save This allows admins to toggle between invite-only and public registration modes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../modules/admin/dashboard/dashboard.service.ts | 4 ++++ parentflow-admin/src/app/settings/page.tsx | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/maternal-app/maternal-app-backend/src/modules/admin/dashboard/dashboard.service.ts b/maternal-app/maternal-app-backend/src/modules/admin/dashboard/dashboard.service.ts index f4c6caf..446447c 100644 --- a/maternal-app/maternal-app-backend/src/modules/admin/dashboard/dashboard.service.ts +++ b/maternal-app/maternal-app-backend/src/modules/admin/dashboard/dashboard.service.ts @@ -356,6 +356,10 @@ export class DashboardService { timezone: process.env.TZ || 'UTC', language: 'en', + // Registration Settings + registrationMode: process.env.REGISTRATION_MODE || 'invite_only', // 'public' or 'invite_only' + requireInviteCode: process.env.REQUIRE_INVITE_CODE === 'true' || true, + // Security Settings enforcePasswordPolicy: true, minPasswordLength: 8, diff --git a/parentflow-admin/src/app/settings/page.tsx b/parentflow-admin/src/app/settings/page.tsx index 9aecda2..08c2fa6 100644 --- a/parentflow-admin/src/app/settings/page.tsx +++ b/parentflow-admin/src/app/settings/page.tsx @@ -177,7 +177,7 @@ export default function SettingsPage() { Language + + + + Registration Mode + +