- CLAUDE.md: add EmailConnectorService/Controller to vendor package - .env.example: replace SMTP vars with note about runtime UI config - docker/CLAUDE.md: update sign-in UI and bootstrap descriptions - ui/CLAUDE.md: add EmailConfigPage, update sidebar and registration notes - ui/sign-in/Dockerfile: update connector install comment - installer: update README, .env.example (submodule) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.7 KiB
2.7 KiB
Frontend
React 19 SPA served at /platform/* by the Spring Boot backend.
Core files
main.tsx— React 19 rootrouter.tsx—/vendor/*+/tenant/*withRequireScopeguards,LandingRedirectthat waits for scopes (redirects to/onboardingif user has zero orgs),/registerroute for OIDC sign-up flow,/onboardingroute for self-service tenant creationLayout.tsx— persona-aware sidebar: vendor sees expandable "Vendor" section (Tenants, Audit Log, Certificates, Metrics, Infrastructure, Email Connector, Logto Console), tenant admin sees Dashboard/License/SSO/Team/Audit/SettingsOrgResolver.tsx— merges global + org-scoped token scopes (vendor's platform:admin is global)config.ts— fetch Logto config from /platform/api/config
Auth hooks
auth/useAuth.ts— auth hook (isAuthenticated, logout, signIn)auth/useOrganization.ts— Zustand store for current tenantauth/useScopes.ts— decode JWT scopes, hasScope()auth/ProtectedRoute.tsx— guard (redirects to /login)auth/LoginPage.tsx— redirects to Logto OIDC sign-inauth/RegisterPage.tsx— redirects to Logto OIDC withfirstScreen: 'register'
Pages
- Onboarding:
OnboardingPage.tsx— self-service trial tenant creation (org name + slug), shown to users with zero org memberships after sign-up - Vendor pages:
VendorTenantsPage.tsx,CreateTenantPage.tsx,TenantDetailPage.tsx,VendorAuditPage.tsx,CertificatesPage.tsx,InfrastructurePage.tsx,EmailConfigPage.tsx(SMTP connector config, registration toggle, test email) - Tenant pages:
TenantDashboardPage.tsx(restart + upgrade server),TenantLicensePage.tsx,SsoPage.tsx,TeamPage.tsx(reset member passwords),TenantAuditPage.tsx,SettingsPage.tsx(change own password, reset server admin password)
Custom Sign-in UI (ui/sign-in/)
Separate Vite+React SPA replacing Logto's default sign-in page. Built as custom Logto Docker image — see docker/CLAUDE.md for details.
SignInPage.tsx— sign-in + registration form with @cameleer/design-system components. Three modes:signIn(email/username + password),register(email + password + confirm),verifyCode(6-digit email verification). Readsfirst_screen=registerfrom URL query params to determine initial view. Registration is disabled by default — the vendor admin enables it via the Email Connector page after configuring SMTP.experience-api.ts— Logto Experience API client. Sign-in: init -> verify password -> identify -> submit. Registration: init Register -> send verification code -> verify code -> add password profile -> identify -> submit. Auto-detects email vs username identifiers.