diff --git a/apps/bear/public/images/lumina-hero.webp b/apps/bear/public/images/lumina-hero.webp
new file mode 100644
index 0000000..e6828ab
Binary files /dev/null and b/apps/bear/public/images/lumina-hero.webp differ
diff --git a/apps/bear/src/app/(auth)/layout.tsx b/apps/bear/src/app/(auth)/layout.tsx
new file mode 100644
index 0000000..200fbbe
--- /dev/null
+++ b/apps/bear/src/app/(auth)/layout.tsx
@@ -0,0 +1,10 @@
+import type { ReactNode } from 'react';
+
+// Every request renders fresh: nothing in this group is prerendered or cached on the server.
+// Only the landing is (0026), so this lives in each route group's layout, not the root's.
+export const dynamic = 'force-dynamic';
+
+/** Adds nothing to the page; it holds the group's rendering mode. */
+export default function AuthLayout({ children }: { children: ReactNode }) {
+ return children;
+}
diff --git a/apps/bear/src/app/(flow)/layout.tsx b/apps/bear/src/app/(flow)/layout.tsx
new file mode 100644
index 0000000..87499fb
--- /dev/null
+++ b/apps/bear/src/app/(flow)/layout.tsx
@@ -0,0 +1,10 @@
+import type { ReactNode } from 'react';
+
+// Every request renders fresh: nothing in this group is prerendered or cached on the server.
+// Only the landing is (0026), so this lives in each route group's layout, not the root's.
+export const dynamic = 'force-dynamic';
+
+/** Adds nothing to the page; it holds the group's rendering mode. */
+export default function FlowLayout({ children }: { children: ReactNode }) {
+ return children;
+}
diff --git a/apps/bear/src/app/(landing)/error.tsx b/apps/bear/src/app/(landing)/error.tsx
new file mode 100644
index 0000000..5bca98a
--- /dev/null
+++ b/apps/bear/src/app/(landing)/error.tsx
@@ -0,0 +1,3 @@
+'use client';
+
+export { PageError as default } from '@lumina/market/app/screens/organisms/page-error';
diff --git a/apps/bear/src/app/(landing)/loading.tsx b/apps/bear/src/app/(landing)/loading.tsx
new file mode 100644
index 0000000..eb42715
--- /dev/null
+++ b/apps/bear/src/app/(landing)/loading.tsx
@@ -0,0 +1,36 @@
+import { FlexBox } from '@lumina/island/atoms/flex-box';
+import { GridBox } from '@lumina/island/atoms/grid-box';
+import { Skeleton, SkeletonRegion } from '@lumina/island/atoms/skeleton';
+
+import { i18n } from '../../i18n';
+
+/** The landing before it arrives: the header's height, then the hero's copy beside its picture. */
+export default function Loading() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/bear/src/app/(landing)/page.tsx b/apps/bear/src/app/(landing)/page.tsx
new file mode 100644
index 0000000..6f839d1
--- /dev/null
+++ b/apps/bear/src/app/(landing)/page.tsx
@@ -0,0 +1,65 @@
+import { Element } from '@lumina/island/primitives/element';
+import { LandingRedirect } from '@lumina/market/app/guards/landing-redirect';
+import { faqEntries } from '@lumina/market/app/screens/(landing)/organisms/landing-faq';
+import {
+ landingLabels,
+ LandingTemplate,
+} from '@lumina/market/app/screens/(landing)/templates/landing-template';
+import {
+ faqJsonLd,
+ landingMetadata,
+ loadLandingPage,
+} from '@lumina/market/server';
+import type { Metadata } from 'next';
+import { PHASE_PRODUCTION_BUILD } from 'next/constants';
+
+import { displayUrl } from '../../configs';
+import { serverEnv } from '../../env/server';
+import { i18n } from '../../i18n';
+
+// The landing is the same for every visitor and reads no session, so it is prerendered and its
+// featured analysts are read again every 10 minutes (0026). Every other route renders fresh.
+export const dynamic = 'force-static';
+export const revalidate = 600;
+
+export function generateMetadata(): Metadata {
+ return landingMetadata({
+ title: i18n.t('landing:meta.title'),
+ description: i18n.t('landing:hero.lead'),
+ });
+}
+
+/**
+ * The landing, `/`: what Lumina is, for a signed-out visitor, and the way to registration. A
+ * signed-in person is sent on to their home once the browser knows them (0027).
+ */
+export default async function LandingPage() {
+ // A failed read hides the analysts at build time; at a revalidation it keeps the last good page.
+ const { featured } = await loadLandingPage({
+ hideOnError: serverEnv.NEXT_PHASE === PHASE_PRODUCTION_BUILD,
+ });
+ const labels = landingLabels(
+ i18n.getFixedT(null, 'landing'),
+ i18n.getFixedT(null, 'common'),
+ i18n.getFixedT(null, 'content'),
+ );
+
+ return (
+ <>
+
+
+
+ >
+ );
+}
diff --git a/apps/bear/src/app/(main)/@modal/page.tsx b/apps/bear/src/app/(main)/@modal/feed/page.tsx
similarity index 100%
rename from apps/bear/src/app/(main)/@modal/page.tsx
rename to apps/bear/src/app/(main)/@modal/feed/page.tsx
diff --git a/apps/bear/src/app/(main)/(home)/loading.tsx b/apps/bear/src/app/(main)/feed/loading.tsx
similarity index 100%
rename from apps/bear/src/app/(main)/(home)/loading.tsx
rename to apps/bear/src/app/(main)/feed/loading.tsx
diff --git a/apps/bear/src/app/(main)/(home)/page.tsx b/apps/bear/src/app/(main)/feed/page.tsx
similarity index 93%
rename from apps/bear/src/app/(main)/(home)/page.tsx
rename to apps/bear/src/app/(main)/feed/page.tsx
index 7d6732c..1345e85 100644
--- a/apps/bear/src/app/(main)/(home)/page.tsx
+++ b/apps/bear/src/app/(main)/feed/page.tsx
@@ -18,7 +18,7 @@ export function generateMetadata(): Metadata {
}
/**
- * خانه, `/`: the investor's feed of the creators they follow. The server sends only the frame and
+ * خانه, `/feed`: the investor's feed of the creators they follow. The server sends only the frame and
* the feed's skeleton, the same for every visitor; the feed loads in the browser with the session.
* A guest goes to login, which returns here, and a creator to their own channel. A failed feed
* shows in a card in the column, as the desktop boards draw a state there (S3, S2-Desktop).
diff --git a/apps/bear/src/app/(main)/(home)/templates/home-template/HomeTemplate.tsx b/apps/bear/src/app/(main)/feed/templates/home-template/HomeTemplate.tsx
similarity index 100%
rename from apps/bear/src/app/(main)/(home)/templates/home-template/HomeTemplate.tsx
rename to apps/bear/src/app/(main)/feed/templates/home-template/HomeTemplate.tsx
diff --git a/apps/bear/src/app/(main)/(home)/templates/home-template/index.ts b/apps/bear/src/app/(main)/feed/templates/home-template/index.ts
similarity index 100%
rename from apps/bear/src/app/(main)/(home)/templates/home-template/index.ts
rename to apps/bear/src/app/(main)/feed/templates/home-template/index.ts
diff --git a/apps/bear/src/app/(main)/(home)/templates/home-template/types.ts b/apps/bear/src/app/(main)/feed/templates/home-template/types.ts
similarity index 100%
rename from apps/bear/src/app/(main)/(home)/templates/home-template/types.ts
rename to apps/bear/src/app/(main)/feed/templates/home-template/types.ts
diff --git a/apps/bear/src/app/(main)/layout.tsx b/apps/bear/src/app/(main)/layout.tsx
index 3c2f305..0c03b75 100644
--- a/apps/bear/src/app/(main)/layout.tsx
+++ b/apps/bear/src/app/(main)/layout.tsx
@@ -2,6 +2,10 @@ import { FlexBox } from '@lumina/island/atoms/flex-box';
import { DesktopHeader } from '@lumina/market/app/navigation';
import type { ReactNode } from 'react';
+// Every request renders fresh: nothing in this group is prerendered or cached on the server.
+// Only the landing is (0026), so this lives in each route group's layout, not the root's.
+export const dynamic = 'force-dynamic';
+
type MainLayoutProps = {
children: ReactNode;
/** The `@modal` slot: «پست جدید» over the page (C4 ۷.۳), or nothing. */
diff --git a/apps/bear/src/app/(onboarding)/layout.tsx b/apps/bear/src/app/(onboarding)/layout.tsx
new file mode 100644
index 0000000..f5f532f
--- /dev/null
+++ b/apps/bear/src/app/(onboarding)/layout.tsx
@@ -0,0 +1,14 @@
+import type { ReactNode } from 'react';
+
+// Every request renders fresh: nothing in this group is prerendered or cached on the server.
+// Only the landing is (0026), so this lives in each route group's layout, not the root's.
+export const dynamic = 'force-dynamic';
+
+/** Adds nothing to the page; it holds the group's rendering mode. */
+export default function OnboardingLayout({
+ children,
+}: {
+ children: ReactNode;
+}) {
+ return children;
+}
diff --git a/apps/bear/src/app/(onboarding)/onboarding/creator-profile/(form)/loading.tsx b/apps/bear/src/app/(onboarding)/onboarding/creator-profile/(form)/loading.tsx
index 8ba4960..078dc81 100644
--- a/apps/bear/src/app/(onboarding)/onboarding/creator-profile/(form)/loading.tsx
+++ b/apps/bear/src/app/(onboarding)/onboarding/creator-profile/(form)/loading.tsx
@@ -1,4 +1,5 @@
import { CreatorProfileStepSkeleton } from '@lumina/market/app/screens/(onboarding)/onboarding/creator-profile/organisms/creator-profile-step';
+import { ROUTES } from '@lumina/market/app/navigation';
import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template';
@@ -6,7 +7,7 @@ import { AuthTemplate } from '../../../../templates/auth-template';
/** Registration step 5 for a creator, before its frame arrives. The same frame and skeleton as the page, so nothing moves when it arrives. */
export default function Loading() {
return (
-
+
);
return (
-
+
+
);
diff --git a/apps/bear/src/app/(onboarding)/onboarding/creator-profile/done/page.tsx b/apps/bear/src/app/(onboarding)/onboarding/creator-profile/done/page.tsx
index 1fd886a..6487abf 100644
--- a/apps/bear/src/app/(onboarding)/onboarding/creator-profile/done/page.tsx
+++ b/apps/bear/src/app/(onboarding)/onboarding/creator-profile/done/page.tsx
@@ -1,4 +1,5 @@
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
+import { ROUTES } from '@lumina/market/app/navigation';
import {
CreatorProfileDoneStep,
CreatorProfileDoneStepSkeleton,
@@ -25,7 +26,7 @@ export default function CreatorProfileDonePage() {
);
return (
-
+
diff --git a/apps/bear/src/app/(onboarding)/onboarding/investor-profile/loading.tsx b/apps/bear/src/app/(onboarding)/onboarding/investor-profile/loading.tsx
index d6b8444..5081587 100644
--- a/apps/bear/src/app/(onboarding)/onboarding/investor-profile/loading.tsx
+++ b/apps/bear/src/app/(onboarding)/onboarding/investor-profile/loading.tsx
@@ -1,4 +1,5 @@
import { InvestorProfileStepSkeleton } from '@lumina/market/app/screens/(onboarding)/onboarding/investor-profile/organisms/investor-profile-step';
+import { ROUTES } from '@lumina/market/app/navigation';
import { i18n } from '../../../../i18n';
import { AuthTemplate } from '../../../templates/auth-template';
@@ -6,7 +7,7 @@ import { AuthTemplate } from '../../../templates/auth-template';
/** Registration step 5 for an investor, before its frame arrives. The same frame and skeleton as the page, so nothing moves when it arrives. */
export default function Loading() {
return (
-
+
);
diff --git a/apps/bear/src/app/(onboarding)/onboarding/investor-profile/page.tsx b/apps/bear/src/app/(onboarding)/onboarding/investor-profile/page.tsx
index 8897b51..e3e6b40 100644
--- a/apps/bear/src/app/(onboarding)/onboarding/investor-profile/page.tsx
+++ b/apps/bear/src/app/(onboarding)/onboarding/investor-profile/page.tsx
@@ -1,4 +1,5 @@
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
+import { ROUTES } from '@lumina/market/app/navigation';
import {
InvestorProfileStep,
InvestorProfileStepSkeleton,
@@ -21,7 +22,7 @@ export function generateMetadata(): Metadata {
*/
export default function InvestorProfilePage() {
return (
-
+
+
+
+
+
+
+
+
+
+
+ );
+}
diff --git a/apps/bull/src/app/(landing)/page.tsx b/apps/bull/src/app/(landing)/page.tsx
new file mode 100644
index 0000000..3b522af
--- /dev/null
+++ b/apps/bull/src/app/(landing)/page.tsx
@@ -0,0 +1,65 @@
+import { Element } from '@lumina/island/primitives/element';
+import { LandingRedirect } from '@lumina/market/app/guards/landing-redirect';
+import { faqEntries } from '@lumina/market/app/screens/(landing)/organisms/landing-faq';
+import {
+ landingLabels,
+ LandingTemplate,
+} from '@lumina/market/app/screens/(landing)/templates/landing-template';
+import {
+ faqJsonLd,
+ landingMetadata,
+ loadLandingPage,
+} from '@lumina/market/server';
+import type { Metadata } from 'next';
+import { PHASE_PRODUCTION_BUILD } from 'next/constants';
+
+import { displayUrl } from '../../configs';
+import { serverEnv } from '../../env/server';
+import { i18n } from '../../i18n';
+
+// The landing is the same for every visitor and reads no session, so it is prerendered and its
+// featured analysts are read again every 10 minutes (0026). Every other route renders fresh.
+export const dynamic = 'force-static';
+export const revalidate = 600;
+
+export function generateMetadata(): Metadata {
+ return landingMetadata({
+ title: i18n.t('landing:meta.title'),
+ description: i18n.t('landing:hero.lead'),
+ });
+}
+
+/**
+ * The landing, `/`: what Lumina is, for a signed-out visitor, and the way to registration. A
+ * signed-in person is sent on to their home once the browser knows them (0027).
+ */
+export default async function LandingPage() {
+ // A failed read hides the analysts at build time; at a revalidation it keeps the last good page.
+ const { featured } = await loadLandingPage({
+ hideOnError: serverEnv.NEXT_PHASE === PHASE_PRODUCTION_BUILD,
+ });
+ const labels = landingLabels(
+ i18n.getFixedT(null, 'landing'),
+ i18n.getFixedT(null, 'common'),
+ i18n.getFixedT(null, 'content'),
+ );
+
+ return (
+ <>
+
+
+
+ >
+ );
+}
diff --git a/apps/bull/src/app/(main)/(home)/loading.tsx b/apps/bull/src/app/(main)/feed/loading.tsx
similarity index 100%
rename from apps/bull/src/app/(main)/(home)/loading.tsx
rename to apps/bull/src/app/(main)/feed/loading.tsx
diff --git a/apps/bull/src/app/(main)/(home)/page.tsx b/apps/bull/src/app/(main)/feed/page.tsx
similarity index 92%
rename from apps/bull/src/app/(main)/(home)/page.tsx
rename to apps/bull/src/app/(main)/feed/page.tsx
index 304cf69..bcce534 100644
--- a/apps/bull/src/app/(main)/(home)/page.tsx
+++ b/apps/bull/src/app/(main)/feed/page.tsx
@@ -18,7 +18,7 @@ export function generateMetadata(): Metadata {
}
/**
- * خانه, `/`: the investor's feed of the creators they follow. The server sends only the frame and
+ * خانه, `/feed`: the investor's feed of the creators they follow. The server sends only the frame and
* the feed's skeleton, the same for every visitor; the feed loads in the browser with the session.
* A guest goes to login, which returns here, and a creator to their own channel.
*/
diff --git a/apps/bull/src/app/(main)/(home)/templates/home-template/HomeTemplate.tsx b/apps/bull/src/app/(main)/feed/templates/home-template/HomeTemplate.tsx
similarity index 100%
rename from apps/bull/src/app/(main)/(home)/templates/home-template/HomeTemplate.tsx
rename to apps/bull/src/app/(main)/feed/templates/home-template/HomeTemplate.tsx
diff --git a/apps/bull/src/app/(main)/(home)/templates/home-template/index.ts b/apps/bull/src/app/(main)/feed/templates/home-template/index.ts
similarity index 100%
rename from apps/bull/src/app/(main)/(home)/templates/home-template/index.ts
rename to apps/bull/src/app/(main)/feed/templates/home-template/index.ts
diff --git a/apps/bull/src/app/(main)/(home)/templates/home-template/types.ts b/apps/bull/src/app/(main)/feed/templates/home-template/types.ts
similarity index 100%
rename from apps/bull/src/app/(main)/(home)/templates/home-template/types.ts
rename to apps/bull/src/app/(main)/feed/templates/home-template/types.ts
diff --git a/apps/bull/src/app/(main)/layout.tsx b/apps/bull/src/app/(main)/layout.tsx
index 04d8392..0b7af91 100644
--- a/apps/bull/src/app/(main)/layout.tsx
+++ b/apps/bull/src/app/(main)/layout.tsx
@@ -2,6 +2,10 @@ import { FlexBox } from '@lumina/island/atoms/flex-box';
import { BottomNav } from '@lumina/market/app/navigation';
import type { ReactNode } from 'react';
+// Every request renders fresh: nothing in this group is prerendered or cached on the server.
+// Only the landing is (0026), so this lives in each route group's layout, not the root's.
+export const dynamic = 'force-dynamic';
+
/** The main pages on mobile: each page brings its top bar; the bottom nav is shared. */
export default function MainLayout({ children }: { children: ReactNode }) {
return (
diff --git a/apps/bull/src/app/(onboarding)/layout.tsx b/apps/bull/src/app/(onboarding)/layout.tsx
new file mode 100644
index 0000000..f5f532f
--- /dev/null
+++ b/apps/bull/src/app/(onboarding)/layout.tsx
@@ -0,0 +1,14 @@
+import type { ReactNode } from 'react';
+
+// Every request renders fresh: nothing in this group is prerendered or cached on the server.
+// Only the landing is (0026), so this lives in each route group's layout, not the root's.
+export const dynamic = 'force-dynamic';
+
+/** Adds nothing to the page; it holds the group's rendering mode. */
+export default function OnboardingLayout({
+ children,
+}: {
+ children: ReactNode;
+}) {
+ return children;
+}
diff --git a/apps/bull/src/app/(onboarding)/onboarding/creator-profile/done/loading.tsx b/apps/bull/src/app/(onboarding)/onboarding/creator-profile/done/loading.tsx
index e781c1d..bd6b9f3 100644
--- a/apps/bull/src/app/(onboarding)/onboarding/creator-profile/done/loading.tsx
+++ b/apps/bull/src/app/(onboarding)/onboarding/creator-profile/done/loading.tsx
@@ -1,4 +1,5 @@
import { CreatorProfileDoneStepSkeleton } from '@lumina/market/app/screens/(onboarding)/onboarding/creator-profile/done/organisms/creator-profile-done-step';
+import { ROUTES } from '@lumina/market/app/navigation';
import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar';
@@ -7,7 +8,7 @@ import { AuthTemplate } from '../../../../templates/auth-template';
/** The creator's end of registration, before its frame arrives. The same frame and skeleton as the page, so nothing moves when it arrives. */
export default function Loading() {
return (
- }>
+ }>
);
diff --git a/apps/bull/src/app/(onboarding)/onboarding/creator-profile/done/page.tsx b/apps/bull/src/app/(onboarding)/onboarding/creator-profile/done/page.tsx
index 6c441a7..591f0de 100644
--- a/apps/bull/src/app/(onboarding)/onboarding/creator-profile/done/page.tsx
+++ b/apps/bull/src/app/(onboarding)/onboarding/creator-profile/done/page.tsx
@@ -1,4 +1,5 @@
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
+import { ROUTES } from '@lumina/market/app/navigation';
import {
CreatorProfileDoneStep,
CreatorProfileDoneStepSkeleton,
@@ -27,7 +28,7 @@ export default function CreatorProfileDonePage() {
);
return (
- }>
+ }>
diff --git a/apps/bull/src/app/layout.tsx b/apps/bull/src/app/layout.tsx
index 04bb28c..932b144 100644
--- a/apps/bull/src/app/layout.tsx
+++ b/apps/bull/src/app/layout.tsx
@@ -12,9 +12,6 @@ import { rootMetadata } from '../configs';
import { i18n } from '../i18n';
import { AppProviders } from './organisms/app-providers';
-// Every request renders fresh: nothing is prerendered or cached on the server.
-export const dynamic = 'force-dynamic';
-
export function generateMetadata(): Metadata {
return rootMetadata();
}
diff --git a/apps/bull/src/app/organisms/auth-top-bar/AuthTopBar.tsx b/apps/bull/src/app/organisms/auth-top-bar/AuthTopBar.tsx
index 3887280..3180b92 100644
--- a/apps/bull/src/app/organisms/auth-top-bar/AuthTopBar.tsx
+++ b/apps/bull/src/app/organisms/auth-top-bar/AuthTopBar.tsx
@@ -13,7 +13,11 @@ import type { AuthTopBarProps } from './types';
* support on a pushed step; only the name on a step with no way back (registration step 4).
* Back keeps what was typed: the number lives in the flow store.
*/
-export function AuthTopBar({ title, back }: AuthTopBarProps) {
+export function AuthTopBar({
+ title,
+ back,
+ brandHref = ROUTES.landing,
+}: AuthTopBarProps) {
return (