From a6e6eddc941f9d2acfeca746dcbd6005cc659866 Mon Sep 17 00:00:00 2001 From: Amiram_se Date: Mon, 5 Oct 2026 22:33:00 +0400 Subject: [PATCH] feat(apps): registration step 5 pages in bull and bear Add /onboarding/creator-profile and /onboarding/investor-profile to both apps, with the group's loading skeleton. Each page renders its frame on the server and its step only in the browser behind AuthGuard for its role, with noindex. bull uses the mobile top bar and column; bear the desktop header, with the creator's form card beside its live preview (AuthTemplate `framed={false}`) and the investor in the 560 card. Co-Authored-By: Claude Opus 5.5 --- apps/bear/src/app/(onboarding)/loading.tsx | 13 ++++++ .../onboarding/creator-profile/.gitkeep | 0 .../onboarding/creator-profile/page.tsx | 43 +++++++++++++++++ .../onboarding/investor-profile/.gitkeep | 0 .../onboarding/investor-profile/page.tsx | 37 +++++++++++++++ .../templates/auth-template/AuthTemplate.tsx | 26 +++++++---- .../src/app/templates/auth-template/types.ts | 5 ++ apps/bull/src/app/(onboarding)/loading.tsx | 16 +++++++ .../onboarding/creator-profile/.gitkeep | 0 .../onboarding/creator-profile/page.tsx | 46 +++++++++++++++++++ .../onboarding/investor-profile/.gitkeep | 0 .../onboarding/investor-profile/page.tsx | 40 ++++++++++++++++ 12 files changed, 216 insertions(+), 10 deletions(-) create mode 100644 apps/bear/src/app/(onboarding)/loading.tsx delete mode 100644 apps/bear/src/app/(onboarding)/onboarding/creator-profile/.gitkeep create mode 100644 apps/bear/src/app/(onboarding)/onboarding/creator-profile/page.tsx delete mode 100644 apps/bear/src/app/(onboarding)/onboarding/investor-profile/.gitkeep create mode 100644 apps/bear/src/app/(onboarding)/onboarding/investor-profile/page.tsx create mode 100644 apps/bull/src/app/(onboarding)/loading.tsx delete mode 100644 apps/bull/src/app/(onboarding)/onboarding/creator-profile/.gitkeep create mode 100644 apps/bull/src/app/(onboarding)/onboarding/creator-profile/page.tsx delete mode 100644 apps/bull/src/app/(onboarding)/onboarding/investor-profile/.gitkeep create mode 100644 apps/bull/src/app/(onboarding)/onboarding/investor-profile/page.tsx diff --git a/apps/bear/src/app/(onboarding)/loading.tsx b/apps/bear/src/app/(onboarding)/loading.tsx new file mode 100644 index 0000000..c431c6d --- /dev/null +++ b/apps/bear/src/app/(onboarding)/loading.tsx @@ -0,0 +1,13 @@ +import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset'; + +import { i18n } from '../../i18n'; +import { AuthTemplate } from '../templates/auth-template'; + +/** Registration's last steps, before their frame arrives: the header, the card and a form step's shape. */ +export default function OnboardingLoading() { + return ( + + + + ); +} diff --git a/apps/bear/src/app/(onboarding)/onboarding/creator-profile/.gitkeep b/apps/bear/src/app/(onboarding)/onboarding/creator-profile/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/apps/bear/src/app/(onboarding)/onboarding/creator-profile/page.tsx b/apps/bear/src/app/(onboarding)/onboarding/creator-profile/page.tsx new file mode 100644 index 0000000..341554f --- /dev/null +++ b/apps/bear/src/app/(onboarding)/onboarding/creator-profile/page.tsx @@ -0,0 +1,43 @@ +import { AuthGuard } from '@lumina/market/app/guards/auth-guard'; +import { + CreatorProfileStep, + CreatorProfileStepSkeleton, +} from '@lumina/market/app/screens/(onboarding)/onboarding/creator-profile/organisms/creator-profile-step'; +import type { Metadata } from 'next'; +import { Suspense } from 'react'; + +import { i18n } from '../../../../i18n'; +import { AuthTemplate } from '../../../templates/auth-template'; + +export function generateMetadata(): Metadata { + return { + title: i18n.t('auth:register.profile.meta-title'), + robots: { index: false }, + }; +} + +/** + * Registration step 5 for a creator, on the session: the form card beside its live preview. The + * frame renders on the server; the step only in the browser, behind the same-size skeleton. + */ +export default function CreatorProfilePage() { + const skeleton = ( + + ); + return ( + + + + + + + + ); +} diff --git a/apps/bear/src/app/(onboarding)/onboarding/investor-profile/.gitkeep b/apps/bear/src/app/(onboarding)/onboarding/investor-profile/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/apps/bear/src/app/(onboarding)/onboarding/investor-profile/page.tsx b/apps/bear/src/app/(onboarding)/onboarding/investor-profile/page.tsx new file mode 100644 index 0000000..6ca8d9f --- /dev/null +++ b/apps/bear/src/app/(onboarding)/onboarding/investor-profile/page.tsx @@ -0,0 +1,37 @@ +import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset'; +import { AuthGuard } from '@lumina/market/app/guards/auth-guard'; +import { InvestorProfileStep } from '@lumina/market/app/screens/(onboarding)/onboarding/investor-profile/organisms/investor-profile-step'; +import type { Metadata } from 'next'; + +import { i18n } from '../../../../i18n'; +import { AuthTemplate } from '../../../templates/auth-template'; + +export function generateMetadata(): Metadata { + return { + title: i18n.t('auth:register.profile.meta-title'), + robots: { index: false }, + }; +} + +/** + * Registration step 5 for an investor, optional, on the session, in the 560 card. The frame + * renders on the server; the step only in the browser, for the signed-in investor. + */ +export default function InvestorProfilePage() { + return ( + + + } + > + + + + ); +} diff --git a/apps/bear/src/app/templates/auth-template/AuthTemplate.tsx b/apps/bear/src/app/templates/auth-template/AuthTemplate.tsx index 77af0c2..6cf1cfa 100644 --- a/apps/bear/src/app/templates/auth-template/AuthTemplate.tsx +++ b/apps/bear/src/app/templates/auth-template/AuthTemplate.tsx @@ -11,11 +11,13 @@ import type { AuthTemplateProps } from './types'; /** * Login and registration on desktop: the logged-out header (the brand and support) and each - * step in one centred card, its buttons inside the card under the fields. Browser back is the + * step in one centred card, its buttons inside the card under the fields. Registration step 5 + * keeps the header, signed in: there is no nav until registration is complete. Browser back is the * way back; there is no back button. */ export function AuthTemplate({ width = 'narrow', + framed = true, children, }: AuthTemplateProps) { return ( @@ -43,15 +45,19 @@ export function AuthTemplate({ justifyContent="justify-center" className="px-4 pt-28 pb-16" > - - {children} - + {framed ? ( + + {children} + + ) : ( + children + )} ); diff --git a/apps/bear/src/app/templates/auth-template/types.ts b/apps/bear/src/app/templates/auth-template/types.ts index 811277a..a950b0f 100644 --- a/apps/bear/src/app/templates/auth-template/types.ts +++ b/apps/bear/src/app/templates/auth-template/types.ts @@ -3,5 +3,10 @@ import type { ReactNode } from 'react'; export type AuthTemplateProps = { /** narrow (480): the number and the code. wide (560): the account type and step 4. */ width?: 'narrow' | 'wide'; + /** + * false: no card; the step draws its own, such as registration step 5's form card beside its + * live preview. + */ + framed?: boolean; children: ReactNode; }; diff --git a/apps/bull/src/app/(onboarding)/loading.tsx b/apps/bull/src/app/(onboarding)/loading.tsx new file mode 100644 index 0000000..82f9f02 --- /dev/null +++ b/apps/bull/src/app/(onboarding)/loading.tsx @@ -0,0 +1,16 @@ +import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset'; + +import { i18n } from '../../i18n'; +import { AuthTopBar } from '../organisms/auth-top-bar'; +import { AuthTemplate } from '../templates/auth-template'; + +/** Registration's last steps, before their frame arrives: the top bar and a form step's shape. */ +export default function OnboardingLoading() { + return ( + } + > + + + ); +} diff --git a/apps/bull/src/app/(onboarding)/onboarding/creator-profile/.gitkeep b/apps/bull/src/app/(onboarding)/onboarding/creator-profile/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/apps/bull/src/app/(onboarding)/onboarding/creator-profile/page.tsx b/apps/bull/src/app/(onboarding)/onboarding/creator-profile/page.tsx new file mode 100644 index 0000000..815db16 --- /dev/null +++ b/apps/bull/src/app/(onboarding)/onboarding/creator-profile/page.tsx @@ -0,0 +1,46 @@ +import { AuthGuard } from '@lumina/market/app/guards/auth-guard'; +import { + CreatorProfileStep, + CreatorProfileStepSkeleton, +} from '@lumina/market/app/screens/(onboarding)/onboarding/creator-profile/organisms/creator-profile-step'; +import type { Metadata } from 'next'; +import { Suspense } from 'react'; + +import { i18n } from '../../../../i18n'; +import { AuthTopBar } from '../../../organisms/auth-top-bar'; +import { AuthTemplate } from '../../../templates/auth-template'; + +export function generateMetadata(): Metadata { + return { + title: i18n.t('auth:register.profile.meta-title'), + robots: { index: false }, + }; +} + +/** + * Registration step 5 for a creator, on the session. The frame renders on the server; the step + * only in the browser, for the signed-in creator, behind the same-size skeleton. + */ +export default function CreatorProfilePage() { + const skeleton = ( + + ); + return ( + } + > + + + + + + + ); +} diff --git a/apps/bull/src/app/(onboarding)/onboarding/investor-profile/.gitkeep b/apps/bull/src/app/(onboarding)/onboarding/investor-profile/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/apps/bull/src/app/(onboarding)/onboarding/investor-profile/page.tsx b/apps/bull/src/app/(onboarding)/onboarding/investor-profile/page.tsx new file mode 100644 index 0000000..1a3eb99 --- /dev/null +++ b/apps/bull/src/app/(onboarding)/onboarding/investor-profile/page.tsx @@ -0,0 +1,40 @@ +import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset'; +import { AuthGuard } from '@lumina/market/app/guards/auth-guard'; +import { InvestorProfileStep } from '@lumina/market/app/screens/(onboarding)/onboarding/investor-profile/organisms/investor-profile-step'; +import type { Metadata } from 'next'; + +import { i18n } from '../../../../i18n'; +import { AuthTopBar } from '../../../organisms/auth-top-bar'; +import { AuthTemplate } from '../../../templates/auth-template'; + +export function generateMetadata(): Metadata { + return { + title: i18n.t('auth:register.profile.meta-title'), + robots: { index: false }, + }; +} + +/** + * Registration step 5 for an investor, optional, on the session. The frame renders on the + * server; the step only in the browser, for the signed-in investor. + */ +export default function InvestorProfilePage() { + return ( + } + > + + } + > + + + + ); +}