Skip to content

Commit ac9ad72

Browse files
committed
feat: interactive feature showcase on the signup panel
Replaces the static quote in the onboarding layout's left panel with an auto-rotating carousel of product highlights (Deploy / Manage / Scale, 3 slides x 4 items), shown on the cloud signup page only. - OnboardingLayout gets an optional leftPanel override, default quote untouched everywhere else (login, invitation, password reset). - Auto-advances every 6s, pauses on hover/focus, respects prefers-reduced-motion, manual dot + arrow navigation. - Copy pulled from the website's existing first-features.tsx section to stay consistent with approved marketing copy.
1 parent d542967 commit ac9ad72

3 files changed

Lines changed: 219 additions & 5 deletions

File tree

‎apps/dokploy/components/layouts/onboarding-layout.tsx‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ import { Button } from "../ui/button";
88

99
interface Props {
1010
children: React.ReactNode;
11+
/** Overrides the default quote in the left panel (desktop only). */
12+
leftPanel?: React.ReactNode;
1113
}
12-
export const OnboardingLayout = ({ children }: Props) => {
14+
export const OnboardingLayout = ({ children, leftPanel }: Props) => {
1315
const { config: whitelabeling } = useWhitelabelingPublic();
1416
const appName = whitelabeling?.appName || "Dokploy";
1517
const appDescription =
@@ -30,9 +32,11 @@ export const OnboardingLayout = ({ children }: Props) => {
3032
{appName}
3133
</Link>
3234
<div className="relative z-20 mt-auto">
33-
<blockquote className="space-y-2">
34-
<p className="text-lg text-primary">{appDescription}</p>
35-
</blockquote>
35+
{leftPanel ?? (
36+
<blockquote className="space-y-2">
37+
<p className="text-lg text-primary">{appDescription}</p>
38+
</blockquote>
39+
)}
3640
</div>
3741
</div>
3842
<div className="flex min-h-svh w-full flex-col">
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
"use client";
2+
3+
import {
4+
Activity,
5+
ArrowRight,
6+
Bot,
7+
Boxes,
8+
Cloud,
9+
Database,
10+
Layers,
11+
LayoutTemplate,
12+
Rocket,
13+
Shield,
14+
Terminal,
15+
Unlock,
16+
Users,
17+
} from "lucide-react";
18+
import { useEffect, useRef, useState } from "react";
19+
import { cn } from "@/lib/utils";
20+
21+
interface ShowcaseItem {
22+
icon: typeof Users;
23+
title: string;
24+
description: string;
25+
}
26+
27+
const SLIDES: ShowcaseItem[][] = [
28+
[
29+
{
30+
icon: Users,
31+
title: "Team access",
32+
description:
33+
"Anyone in your team can deploy simply and securely in a safe, governed environment.",
34+
},
35+
{
36+
icon: Layers,
37+
title: "Open source",
38+
description:
39+
"Deploy for free with the open-source alternative to Netlify, Vercel, and Heroku.",
40+
},
41+
{
42+
icon: Bot,
43+
title: "AI sandbox",
44+
description:
45+
"Unleash the power of AI and test AI-generated code in a sandbox before deploying to a live URL.",
46+
},
47+
{
48+
icon: Shield,
49+
title: "Enterprise ready",
50+
description:
51+
"Scale when you're ready with granular RBAC, SSO, audit logs, rollback and multi-tenancy.",
52+
},
53+
],
54+
[
55+
{
56+
icon: Rocket,
57+
title: "Any stack",
58+
description:
59+
"Deploy any application using Nixpacks, Heroku Buildpacks, or your own Dockerfile.",
60+
},
61+
{
62+
icon: Boxes,
63+
title: "Docker Compose",
64+
description:
65+
"Deploy complex applications natively with full Docker Compose integration.",
66+
},
67+
{
68+
icon: Cloud,
69+
title: "Multi-server",
70+
description:
71+
"Effortlessly deploy your applications on remote servers, with zero configuration hassle.",
72+
},
73+
{
74+
icon: LayoutTemplate,
75+
title: "Ready templates",
76+
description:
77+
"Get started quickly with pre-configured templates for Supabase, Cal.com, PocketBase, and more.",
78+
},
79+
],
80+
[
81+
{
82+
icon: Database,
83+
title: "Managed databases",
84+
description:
85+
"Manage and back up MySQL, PostgreSQL, MongoDB, MariaDB, and Redis directly from Dokploy.",
86+
},
87+
{
88+
icon: Terminal,
89+
title: "API & CLI",
90+
description: "Full API and CLI access to fit any custom workflow.",
91+
},
92+
{
93+
icon: Activity,
94+
title: "Live monitoring",
95+
description:
96+
"Monitor CPU, memory, and network usage in real time across every deployment.",
97+
},
98+
{
99+
icon: Unlock,
100+
title: "No lock-in",
101+
description:
102+
"Modify, scale, and customize Dokploy however your project needs.",
103+
},
104+
],
105+
];
106+
107+
const AUTO_ADVANCE_MS = 6000;
108+
109+
export const SignupShowcase = () => {
110+
const [active, setActive] = useState(0);
111+
const [paused, setPaused] = useState(false);
112+
const [reduceMotion, setReduceMotion] = useState(false);
113+
114+
useEffect(() => {
115+
const query = window.matchMedia("(prefers-reduced-motion: reduce)");
116+
setReduceMotion(query.matches);
117+
const listener = (e: MediaQueryListEvent) => setReduceMotion(e.matches);
118+
query.addEventListener("change", listener);
119+
return () => query.removeEventListener("change", listener);
120+
}, []);
121+
122+
const timerRef = useRef<ReturnType<typeof setInterval> | null>(null);
123+
124+
useEffect(() => {
125+
if (paused || reduceMotion) {
126+
return;
127+
}
128+
timerRef.current = setInterval(() => {
129+
setActive((prev) => (prev + 1) % SLIDES.length);
130+
}, AUTO_ADVANCE_MS);
131+
return () => {
132+
if (timerRef.current) {
133+
clearInterval(timerRef.current);
134+
}
135+
};
136+
}, [paused, reduceMotion]);
137+
138+
const goTo = (index: number) => {
139+
setActive(((index % SLIDES.length) + SLIDES.length) % SLIDES.length);
140+
};
141+
142+
return (
143+
<div
144+
className="relative"
145+
onMouseEnter={() => setPaused(true)}
146+
onMouseLeave={() => setPaused(false)}
147+
onFocus={() => setPaused(true)}
148+
onBlur={() => setPaused(false)}
149+
>
150+
<div
151+
key={active}
152+
className={cn(
153+
"grid grid-cols-2 gap-4",
154+
!reduceMotion &&
155+
"animate-in fade-in slide-in-from-bottom-2 duration-500 ease-out",
156+
)}
157+
>
158+
{SLIDES[active]?.map((item) => (
159+
<div
160+
key={item.title}
161+
className="group flex flex-col gap-3 rounded-lg border border-primary/10 bg-background/40 p-4 transition-all duration-300 hover:-translate-y-0.5 hover:border-primary/25 hover:bg-background/60"
162+
>
163+
<div className="flex size-9 items-center justify-center rounded-md bg-primary/10 text-primary transition-colors duration-300 group-hover:bg-primary/15">
164+
<item.icon className="size-4.5" strokeWidth={1.75} />
165+
</div>
166+
<div className="space-y-1">
167+
<p className="text-sm font-medium text-primary">{item.title}</p>
168+
<p className="text-sm text-muted-foreground leading-snug">
169+
{item.description}
170+
</p>
171+
</div>
172+
</div>
173+
))}
174+
</div>
175+
176+
<div className="mt-6 flex items-center gap-2">
177+
{SLIDES.map((slide, index) => (
178+
<button
179+
key={slide.map((item) => item.title).join("-")}
180+
type="button"
181+
aria-label={`Show showcase slide ${index + 1}`}
182+
aria-current={index === active}
183+
onClick={() => goTo(index)}
184+
className={cn(
185+
"h-1.5 rounded-full transition-all duration-300",
186+
index === active
187+
? "w-6 bg-primary"
188+
: "w-1.5 bg-primary/20 hover:bg-primary/40",
189+
)}
190+
/>
191+
))}
192+
</div>
193+
194+
<button
195+
type="button"
196+
aria-label="Next showcase slide"
197+
onClick={() => goTo(active + 1)}
198+
className="absolute top-1/2 right-0 z-30 flex size-9 -translate-y-1/2 translate-x-1/2 items-center justify-center rounded-full border border-primary/15 bg-background text-primary shadow-sm transition-all duration-300 hover:scale-105 hover:border-primary/30 hover:shadow-md"
199+
>
200+
<ArrowRight className="size-4" strokeWidth={1.75} />
201+
</button>
202+
</div>
203+
);
204+
};

‎apps/dokploy/pages/register.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { z } from "zod";
1111
import { OnboardingLayout } from "@/components/layouts/onboarding-layout";
1212
import { SignInWithGithub } from "@/components/proprietary/auth/sign-in-with-github";
1313
import { SignInWithGoogle } from "@/components/proprietary/auth/sign-in-with-google";
14+
import { SignupShowcase } from "@/components/proprietary/auth/signup-showcase";
1415
import { AlertBlock } from "@/components/shared/alert-block";
1516
import { Logo } from "@/components/shared/logo";
1617
import { Button } from "@/components/ui/button";
@@ -294,7 +295,12 @@ const Register = ({ isCloud }: Props) => {
294295
export default Register;
295296

296297
Register.getLayout = (page: ReactElement) => {
297-
return <OnboardingLayout>{page}</OnboardingLayout>;
298+
const isCloud = (page.props as Props).isCloud;
299+
return (
300+
<OnboardingLayout leftPanel={isCloud ? <SignupShowcase /> : undefined}>
301+
{page}
302+
</OnboardingLayout>
303+
);
298304
};
299305
export async function getServerSideProps(context: GetServerSidePropsContext) {
300306
if (IS_CLOUD) {

0 commit comments

Comments
 (0)