Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

Enhance Tailwind configuration and update styles for data visualization

Bill Yang53d198a282d7
diff --git a/client/src/app/[site]/components/Header/Header.tsx b/client/src/app/[site]/components/Header/Header.tsx
index d4dfa9853..cff298862 100644
--- a/client/src/app/[site]/components/Header/Header.tsx
+++ b/client/src/app/[site]/components/Header/Header.tsx
@@ -6,5 +6,5 @@ import { UsageBanners } from "./UsageBanners";
export function Header() {
const { user } = userStore();
- return <div className="flex flex-col mb-10">{user && <UsageBanners />}</div>;
+ return <div className="flex flex-col">{user && <UsageBanners />}</div>;
}
diff --git a/client/src/app/[site]/components/shared/StandardSection/BaseStandardSection.tsx b/client/src/app/[site]/components/shared/StandardSection/BaseStandardSection.tsx
index 70b07bad8..bc04123df 100644
--- a/client/src/app/[site]/components/shared/StandardSection/BaseStandardSection.tsx
+++ b/client/src/app/[site]/components/shared/StandardSection/BaseStandardSection.tsx
@@ -38,8 +38,7 @@ export const Row = ({
}
>
<div
- // className="absolute h-0.5 bottom-0 bg-accent-400 opacity-90"
- className="absolute inset-0 bg-accent-400 py-2 opacity-25 rounded-md"
+ className="absolute inset-0 bg-dataviz py-2 opacity-25 rounded-md"
style={{ width: `${e.percentage * ratio}%` }}
></div>
<div className="z-10 mx-2 flex justify-between items-center text-xs w-full">
diff --git a/client/src/app/[site]/components/shared/StandardSection/BaseStandardSectionDialog.tsx b/client/src/app/[site]/components/shared/StandardSection/BaseStandardSectionDialog.tsx
index a170bd19f..dfee8a893 100644
--- a/client/src/app/[site]/components/shared/StandardSection/BaseStandardSectionDialog.tsx
+++ b/client/src/app/[site]/components/shared/StandardSection/BaseStandardSectionDialog.tsx
@@ -261,8 +261,8 @@ export function BaseStandardSectionDialog({
>
{cellIndex === 0 && (
<div
- // className="absolute h-0.5 bottom-0 bg-accent-400 opacity-90"
- // className="absolute inset-0 bg-accent-400 py-2 opacity-30 rounded-md h-6 mt-1"
+ // className="absolute h-0.5 bottom-0 bg-dataviz opacity-90"
+ // className="absolute inset-0 bg-dataviz py-2 opacity-30 rounded-md h-6 mt-1"
// style={{
// width: `${row.original.percentage * ratio}%`,
// }}
diff --git a/client/src/app/[site]/main/components/MainSection/Chart.tsx b/client/src/app/[site]/main/components/MainSection/Chart.tsx
index be13d93c6..19b498cdc 100644
--- a/client/src/app/[site]/main/components/MainSection/Chart.tsx
+++ b/client/src/app/[site]/main/components/MainSection/Chart.tsx
@@ -200,7 +200,7 @@ export function Chart({
animate={false}
// motionConfig="stiff"
enableSlices={"x"}
- colors={["hsl(var(--accent-400))"]}
+ colors={["hsl(var(--dataviz))"]}
enableArea={true}
areaBaselineValue={0}
areaOpacity={0.3}
@@ -209,8 +209,8 @@ export function Chart({
id: "gradient",
type: "linearGradient",
colors: [
- { offset: 0, color: "hsl(var(--accent-400))", opacity: 1 },
- { offset: 100, color: "hsl(var(--accent-400))", opacity: 0 },
+ { offset: 0, color: "hsl(var(--dataviz))", opacity: 1 },
+ { offset: 100, color: "hsl(var(--dataviz))", opacity: 0 },
],
},
]}
diff --git a/client/src/app/[site]/main/components/MainSection/SparklinesChart.tsx b/client/src/app/[site]/main/components/MainSection/SparklinesChart.tsx
index 6001184a6..070a0a55d 100644
--- a/client/src/app/[site]/main/components/MainSection/SparklinesChart.tsx
+++ b/client/src/app/[site]/main/components/MainSection/SparklinesChart.tsx
@@ -62,9 +62,7 @@ export function SparklinesChart({
useMesh={true}
animate={false}
enableSlices={"x"}
- colors={[
- isHovering ? "hsl(var(--accent-300))" : "hsl(var(--accent-400))",
- ]}
+ colors={[isHovering ? "hsl(var(--dataviz))" : "hsl(var(--dataviz))"]}
enableArea={false}
areaBaselineValue={0}
areaOpacity={0.3}
@@ -73,8 +71,8 @@ export function SparklinesChart({
id: "gradient",
type: "linearGradient",
colors: [
- { offset: 0, color: "hsl(var(--accent-400))", opacity: 1 },
- { offset: 100, color: "hsl(var(--accent-400))", opacity: 0 },
+ { offset: 0, color: "hsl(var(--dataviz))", opacity: 1 },
+ { offset: 100, color: "hsl(var(--dataviz))", opacity: 0 },
],
},
]}
diff --git a/client/src/app/[site]/main/components/sections/Weekdays.tsx b/client/src/app/[site]/main/components/sections/Weekdays.tsx
index aef37160d..982454ae2 100644
--- a/client/src/app/[site]/main/components/sections/Weekdays.tsx
+++ b/client/src/app/[site]/main/components/sections/Weekdays.tsx
@@ -127,16 +127,16 @@ export function Weekdays() {
const ratio = value / maxValue;
// Use predefined opacity classes that are guaranteed to exist in Tailwind
- if (ratio < 0.1) return "bg-indigo-500 bg-opacity-10";
- if (ratio < 0.2) return "bg-indigo-500 bg-opacity-20";
- if (ratio < 0.3) return "bg-indigo-500 bg-opacity-30";
- if (ratio < 0.4) return "bg-indigo-500 bg-opacity-40";
- if (ratio < 0.5) return "bg-indigo-500 bg-opacity-50";
- if (ratio < 0.6) return "bg-indigo-500 bg-opacity-60";
- if (ratio < 0.7) return "bg-indigo-500 bg-opacity-70";
- if (ratio < 0.8) return "bg-indigo-500 bg-opacity-80";
- if (ratio < 0.9) return "bg-indigo-500 bg-opacity-90";
- return "bg-indigo-500";
+ if (ratio < 0.1) return "bg-emerald-500 bg-opacity-10";
+ if (ratio < 0.2) return "bg-emerald-500 bg-opacity-20";
+ if (ratio < 0.3) return "bg-emerald-500 bg-opacity-30";
+ if (ratio < 0.4) return "bg-emerald-500 bg-opacity-40";
+ if (ratio < 0.5) return "bg-emerald-500 bg-opacity-50";
+ if (ratio < 0.6) return "bg-emerald-500 bg-opacity-60";
+ if (ratio < 0.7) return "bg-emerald-500 bg-opacity-70";
+ if (ratio < 0.8) return "bg-emerald-500 bg-opacity-80";
+ if (ratio < 0.9) return "bg-emerald-500 bg-opacity-90";
+ return "bg-emerald-500";
};
// Format the metric value based on its type
@@ -263,7 +263,7 @@ export function Weekdays() {
<Tooltip key={day}>
<TooltipTrigger asChild>
<div
- className={`flex-1 mx-0.5 ${colorClass} hover:ring-1 hover:ring-indigo-300 transition-all rounded-sm my-0.5`}
+ className={`flex-1 mx-0.5 ${colorClass} hover:ring-1 hover:ring-emerald-300 transition-all rounded-sm my-0.5`}
/>
</TooltipTrigger>
<TooltipContent className="flex flex-col gap-1 p-2">
diff --git a/client/src/app/globals.css b/client/src/app/globals.css
index ff56021e7..46d80906d 100644
--- a/client/src/app/globals.css
+++ b/client/src/app/globals.css
@@ -26,19 +26,32 @@ body {
--input: 240 5.9% 90%;
--ring: 240 5.9% 10%;
--radius: 0.3rem;
+
+ --dataviz: 230 60% 85%;
-
- --accent-50: var(--indigo-50);
- --accent-100: var(--indigo-100);
- --accent-200: var(--indigo-200);
- --accent-300: var(--indigo-300);
- --accent-400: var(--indigo-400);
- --accent-500: var(--indigo-500);
- --accent-600: var(--indigo-600);
- --accent-700: var(--indigo-700);
- --accent-800: var(--indigo-800);
- --accent-900: var(--indigo-900);
- --accent-950: var(--indigo-950);
+ --accent-50: var(--emerald-50);
+ --accent-100: var(--emerald-100);
+ --accent-200: var(--emerald-200);
+ --accent-300: var(--emerald-300);
+ --accent-400: var(--emerald-400);
+ --accent-500: var(--emerald-500);
+ --accent-600: var(--emerald-600);
+ --accent-700: var(--emerald-700);
+ --accent-800: var(--emerald-800);
+ --accent-900: var(--emerald-900);
+ --accent-950: var(--emerald-950);
+
+ /* --accent-50: 155 30% 96%;
+ --accent-100: 155 60% 94%;
+ --accent-200: 155 65% 88%;
+ --accent-300: 155 70% 74%;
+ --accent-400: 155 80% 60%;
+ --accent-500: 155 80% 48%;
+ --accent-600: 155 75% 40%;
+ --accent-700: 155 70% 32%;
+ --accent-800: 155 70% 24%;
+ --accent-900: 155 75% 20%;
+ --accent-950: 155 80% 12%; */
/* Slate */
@@ -94,13 +107,13 @@ body {
--neutral-550: 0 0% 45%;
--neutral-600: 0 0% 40%;
--neutral-650: 0 0% 35%;
- --neutral-700: 0 0% 30%;
- --neutral-750: 0 0% 25%;
- --neutral-800: 0 0% 20%;
- --neutral-850: 0 0% 16%;
- --neutral-900: 0 0% 12%;
- --neutral-950: 0 0% 9%;
- --neutral-1000: 0 0% 5%;
+ --neutral-700: 0 0% 29%;
+ --neutral-750: 0 0% 24%;
+ --neutral-800: 0 0% 19%;
+ --neutral-850: 0 0% 14%;
+ --neutral-900: 0 0% 10.5%;
+ --neutral-950: 0 0% 7.5%;
+ --neutral-1000: 0 0% 4%;
/* Stone */
--stone-50: 60 9.1% 97.8%;
@@ -339,7 +352,7 @@ body {
}
.dark {
- --background: 0 0% 9%;
+ --background: 0 0% 8%;
--foreground: 0 0% 98%;
--popover: 240 10% 3.9%;
diff --git a/client/tailwind.config.ts b/client/tailwind.config.ts
index 81f666d11..9cecd7595 100644
--- a/client/tailwind.config.ts
+++ b/client/tailwind.config.ts
@@ -53,6 +53,9 @@ module.exports = {
900: "hsl(var(--accent-900))",
950: "hsl(var(--accent-950))",
},
+ dataviz: {
+ DEFAULT: "hsl(var(--dataviz))",
+ },
popover: {
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
diff --git a/docs/src/app/layout.jsx b/docs/src/app/layout.jsx
index e88ad9c8e..86eb8d52b 100644
--- a/docs/src/app/layout.jsx
+++ b/docs/src/app/layout.jsx
@@ -47,7 +47,7 @@ export default async function RootLayout({ children }) {
projectLink="https://github.com/goldflag/rybbit"
children={<a href="https://tracking.tomato.gg">
- <button className="bg-neutral-800 hover:bg-neutral-700 text-white font-medium px-3 py-1.5 rounded-lg border border-neutral-600 transform hover:-translate-y-0.5 transition-all duration-200 hover:border-neutral-400 focus:outline-none focus:ring-2 focus:ring-neutral-400 focus:ring-opacity-50">
+ <button className="bg-neutral-800 hover:bg-neutral-700 text-white text-sm font-medium px-3 py-1.5 rounded-md border border-neutral-600 transform hover:-translate-y-0.5 transition-all duration-200 hover:border-neutral-400 focus:outline-none focus:ring-2 focus:ring-neutral-400 focus:ring-opacity-50">
Login
</button>
</a>}
diff --git a/docs/src/app/page.jsx b/docs/src/app/page.jsx
index 13eb60510..7c30ae5d3 100644
--- a/docs/src/app/page.jsx
+++ b/docs/src/app/page.jsx
@@ -27,16 +27,16 @@ export default function IndexPage() {
<div className="flex flex-col items-center justify-center overflow-x-hidden">
<h1 className={`text-4xl md:text-5xl lg:text-7xl font-semibold pt-16 md:pt-24 px-4 tracking-tight max-w-3xl text-center text-transparent bg-clip-text bg-gradient-to-b from-white via-gray-200 to-gray-500 ${tilt_wrap.className}`}>The Modern Google Analytics Alternative</h1>
- <h2 className="text-lg md:text-2xl pt-6 md:pt-8 px-4 tracking-tight max-w-3xl text-center text-neutral-300">Open source web + product analytics for everyone</h2>
+ <h2 className="text-lg md:text-2xl pt-4 md:pt-6 px-4 tracking-tight max-w-3xl text-center text-neutral-300">Next-gen, open source, lightweight, cookieless web & product analytics for everyone — GDPR/CCPA compliant.</h2>
<div className="flex flex-col sm:flex-row my-8 md:my-10 items-center justify-center gap-4 md:gap-6 text-base md:text-lg px-4">
<Link href="https://tracking.tomato.gg/signup" className="w-full sm:w-auto">
- <button className="w-full sm:w-auto bg-emerald-600 hover:bg-emerald-500 text-white font-medium px-6 py-3.5 rounded-lg shadow-lg shadow-emerald-900/20 transform hover:-translate-y-0.5 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-opacity-50">
+ <button className="w-full sm:w-auto bg-emerald-600 hover:bg-emerald-500 text-white font-medium px-5 py-3 rounded-lg shadow-lg shadow-emerald-900/20 transform hover:-translate-y-0.5 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-emerald-500 focus:ring-opacity-50">
Track your Site
</button>
</Link>
<Link href="https://tracking.tomato.gg/1" className="w-full sm:w-auto">
- <button className="w-full sm:w-auto bg-neutral-800 hover:bg-neutral-700 text-white font-medium px-6 py-3.5 rounded-lg border border-neutral-600 transform hover:-translate-y-0.5 transition-all duration-200 hover:border-neutral-400 focus:outline-none focus:ring-2 focus:ring-neutral-400 focus:ring-opacity-50">
+ <button className="w-full sm:w-auto bg-neutral-800 hover:bg-neutral-700 text-white font-medium px-5 py-3 rounded-lg border border-neutral-600 transform hover:-translate-y-0.5 transition-all duration-200 hover:border-neutral-400 focus:outline-none focus:ring-2 focus:ring-neutral-400 focus:ring-opacity-50">
View Live Demo
</button>
</Link>
@@ -51,7 +51,7 @@ export default function IndexPage() {
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[400px] h-[400px] bg-indigo-500/20 rounded-full blur-3xl opacity-40"></div>
{/* Iframe container with responsive visibility */}
- <div className="relative z-10 rounded-xl overflow-hidden border-2 border-neutral-700 shadow-2xl shadow-emerald-900/10">
+ <div className="relative z-10 rounded-lg overflow-hidden border-4 border-neutral-100/5 shadow-2xl shadow-emerald-900/10">
{/* Remove mobile message and show iframe on all devices */}
<iframe
src="https://tracking.tomato.gg/1"
diff --git a/server/src/tracker/trackingUtils.ts b/server/src/tracker/trackingUtils.ts
index 3b44ede96..86b6f85ba 100644
--- a/server/src/tracker/trackingUtils.ts
+++ b/server/src/tracker/trackingUtils.ts
@@ -174,7 +174,6 @@ function getUserId(
): string {
// Only apply salt if the site has salting enabled
if (siteId && siteConfig.shouldSaltUserIds(siteId)) {
- console.info("salted");
const dailySalt = getDailySalt(); // Get the salt for the current day
return crypto
.createHash("sha256")
@@ -182,7 +181,6 @@ function getUserId(
.digest("hex");
}
- console.info("not salted");
// Otherwise, just hash IP and user agent
return crypto
.createHash("sha256")