🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Continue (#110)
Bill Yang9e6199326933
diff --git a/client/src/app/signup/page.tsx b/client/src/app/signup/page.tsxindex 71da01492..7e92a073f 100644--- a/client/src/app/signup/page.tsx+++ b/client/src/app/signup/page.tsx@@ -18,8 +18,8 @@ import {User,} from "lucide-react";import Link from "next/link";-import { useRouter } from "next/navigation";-import { useState } from "react";+import { useRouter, useSearchParams } from "next/navigation";+import { useState, useEffect, Suspense } from "react";import { addSite } from "../../api/admin/sites";import { CodeSnippet } from "../../components/CodeSnippet";import { Alert, AlertDescription, AlertTitle } from "../../components/ui/alert";@@ -34,6 +34,20 @@ const contentVariants = {visible: { opacity: 1, x: 0, transition: { duration: 0.3 } },};+// Client component to handle step from URL params+function StepHandler({ onSetStep }: { onSetStep: (step: number) => void }) {+ const searchParams = useSearchParams();++ useEffect(() => {+ const step = searchParams.get("step");+ if (step && !isNaN(Number(step))) {+ onSetStep(Number(step));+ }+ }, [searchParams, onSetStep]);++ return null;+}+export default function SignupPage() {const [currentStep, setCurrentStep] = useState(1);const [isLoading, setIsLoading] = useState(false);@@ -255,6 +269,7 @@ export default function SignupPage() {onClick={() => {authClient.signIn.social({provider: "google",+ callbackURL: "/signup?step=2",});}}className="transition-all duration-300 hover:bg-muted bg-neutral-800/50 border-neutral-700"@@ -268,6 +283,7 @@ export default function SignupPage() {onClick={() => {authClient.signIn.social({provider: "github",+ callbackURL: "/signup?step=2",});}}className="transition-all duration-300 hover:bg-muted bg-neutral-800/50 border-neutral-700"@@ -475,6 +491,11 @@ export default function SignupPage() {return (<div className="flex justify-center items-center min-h-screen bg-background p-4 relative overflow-hidden">+ {/* Suspense boundary for the URL parameter handler */}+ <Suspense fallback={null}>+ <StepHandler onSetStep={setCurrentStep} />+ </Suspense>+{/* Background gradients similar to docs page */}<div className="absolute top-0 left-0 w-[550px] h-[550px] bg-emerald-500/40 rounded-full blur-[80px] opacity-40"></div><div className="absolute top-20 left-20 w-[400px] h-[400px] bg-emerald-600/30 rounded-full blur-[70px] opacity-30"></div>diff --git a/docs/src/content/self-hosting.mdx b/docs/src/content/self-hosting.mdxindex 21891f5f6..11c34d148 100644--- a/docs/src/content/self-hosting.mdx+++ b/docs/src/content/self-hosting.mdx@@ -72,7 +72,7 @@ Create your admin account. You can then log in and start adding your websites!</Steps>Congratulations! You have successfully self-hosted Rybbit.-+{/*## Security Recommendation: Firewall ConfigurationFor enhanced security, it is highly recommended to configure a firewall on your VPS. Allow incoming connections only on the ports necessary for the application to function externally. In most standard setups, this means allowing traffic only on port `443` (HTTPS).@@ -89,6 +89,6 @@ sudo ufw status # Check the status<Callout type="warning">Ensure you allow SSH access (typically port 22) before enabling the firewall, otherwise you might lock yourself out of your VPS!-</Callout>+</Callout> */}If you run into any issues or need help, feel free to join our Discord community!