diff --git a/README.md b/README.md index f3cebf3..7236837 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Spliit is a free and open source alternative to Splitwise. I created it back in - [Next.js](https://nextjs.org/) for the web application - [TailwindCSS](https://tailwindcss.com/) for the styling - [shadcn/UI](https://ui.shadcn.com/) for the UI components +- [Prisma](https://prisma.io) to access the database - [Vercel](https://vercel.com/) for hosting (application and database) ## Contribute diff --git a/next.config.js b/next.config.js index 767719f..7503bbe 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,5 @@ /** @type {import('next').NextConfig} */ const nextConfig = {} -module.exports = nextConfig +const { withPlausibleProxy } = require('next-plausible') +module.exports = withPlausibleProxy()(nextConfig) diff --git a/package-lock.json b/package-lock.json index 56cc1a4..6e32b5c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,6 +24,7 @@ "clsx": "^2.0.0", "lucide-react": "^0.290.0", "next": "^14.0.4", + "next-plausible": "^3.12.0", "next-themes": "^0.2.1", "next13-progressbar": "^1.1.1", "pg": "^8.11.3", @@ -4242,6 +4243,19 @@ } } }, + "node_modules/next-plausible": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/next-plausible/-/next-plausible-3.12.0.tgz", + "integrity": "sha512-SSkEqKQ6PgR8fx3sYfIAT69k2xuCUXO5ngkSS19CjxY97lAoZxsfZpYednxB4zo0mHYv87JzhPynrdBPlCBVHg==", + "funding": { + "url": "https://github.com/4lejandrito/next-plausible?sponsor=1" + }, + "peerDependencies": { + "next": "^11.1.0 || ^12.0.0 || ^13.0.0 || ^14.0.0", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/next-themes": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.2.1.tgz", diff --git a/package.json b/package.json index e61a030..557dfb1 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "clsx": "^2.0.0", "lucide-react": "^0.290.0", "next": "^14.0.4", + "next-plausible": "^3.12.0", "next-themes": "^0.2.1", "next13-progressbar": "^1.1.1", "pg": "^8.11.3", diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 2560871..c54da20 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -4,6 +4,7 @@ import { ThemeToggle } from '@/components/theme-toggle' import { Button } from '@/components/ui/button' import { env } from '@/lib/env' import type { Metadata, Viewport } from 'next' +import PlausibleProvider from 'next-plausible' import Image from 'next/image' import Link from 'next/link' import './globals.css' @@ -63,6 +64,9 @@ export default function RootLayout({ }) { return ( + {env.PLAUSIBLE_DOMAIN && ( + + )}