Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Random secret for Vercel cron authentication — set same value in Vercel env vars
CRON_SECRET=your-random-secret

# Google Analytics 4 Measurement ID (format: G-XXXXXXXXXX)
# Get from analytics.google.com -> Admin -> Data Streams -> your stream -> Measurement ID
NEXT_PUBLIC_GA_MEASUREMENT_ID=G-CCRK2NRGSL
4 changes: 4 additions & 0 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Metadata, Viewport } from 'next'
import { DM_Sans, Plus_Jakarta_Sans, JetBrains_Mono } from 'next/font/google'
import { ThemeProvider } from 'next-themes'
import { Analytics } from '@vercel/analytics/next'
import { GoogleAnalytics } from '@next/third-parties/google'
import { FaviconInit } from '@/components/ui/FaviconInit'
import './globals.css'

Expand Down Expand Up @@ -94,6 +95,9 @@ export default function RootLayout({
suppressHydrationWarning
className={`${dmSans.variable} ${plusJakartaSans.variable} ${jetbrainsMono.variable}`}
>
{process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID && (
<GoogleAnalytics gaId={process.env.NEXT_PUBLIC_GA_MEASUREMENT_ID} />
)}
<body className="bg-background text-foreground font-sans min-h-screen antialiased">
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
<script
Expand Down
4 changes: 2 additions & 2 deletions app/privacy/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const metadata: Metadata = {

export default function PrivacyPage() {
return (
<PolicyPageLayout title="Privacy Policy" lastUpdated="March 2026">
<PolicyPageLayout title="Privacy Policy" lastUpdated="April 2026">
<section>
<h2 className="font-semibold text-base mb-2 text-[var(--text-primary)]">What we collect</h2>
<p>When you sign in with GitHub or Google, we store your name, email, and avatar URL to create your profile. We also store the focus sessions you participate in and your pomodoro statistics.</p>
Expand All @@ -19,7 +19,7 @@ export default function PrivacyPage() {
</section>
<section>
<h2 className="font-semibold text-base mb-2 text-[var(--text-primary)]">Third parties</h2>
<p>We use Supabase for authentication and data storage, and Vercel for hosting. Both are SOC 2 compliant. Analytics are provided by Vercel Analytics (privacy-friendly, no cookies).</p>
<p>We use Supabase for authentication and data storage, and Vercel for hosting. Both are SOC 2 compliant. We use Vercel Analytics (no cookies) and Google Analytics 4 for usage metrics. Google Analytics sets cookies (_ga, _ga_*) and transmits anonymized usage data to Google. You can opt out via <a href="https://tools.google.com/dlpage/gaoptout" target="_blank" rel="noopener noreferrer" className="text-[var(--accent)]">Google&apos;s opt-out tool</a>.</p>
</section>
<section>
<h2 className="font-semibold text-base mb-2 text-[var(--text-primary)]">Your rights</h2>
Expand Down
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const nextConfig = {
{ key: 'X-Frame-Options', value: 'DENY' },
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
{ key: 'Permissions-Policy', value: 'camera=(), microphone=(), geolocation=()' },
{ key: 'Content-Security-Policy', value: `default-src 'self'; script-src 'self' 'unsafe-inline'${isDev ? " 'unsafe-eval'" : ''} va.vercel-scripts.com; style-src 'self' 'unsafe-inline'; connect-src 'self' *.supabase.co wss://*.supabase.co vitals.vercel-insights.com; img-src 'self' data: blob: *.supabase.co *.githubusercontent.com lh3.googleusercontent.com; font-src 'self' data: fonts.gstatic.com fonts.googleapis.com;` },
{ key: 'Content-Security-Policy', value: `default-src 'self'; script-src 'self' 'unsafe-inline'${isDev ? " 'unsafe-eval'" : ''} va.vercel-scripts.com www.googletagmanager.com; style-src 'self' 'unsafe-inline'; connect-src 'self' *.supabase.co wss://*.supabase.co vitals.vercel-insights.com www.google-analytics.com region1.google-analytics.com; img-src 'self' data: blob: *.supabase.co *.githubusercontent.com lh3.googleusercontent.com www.googletagmanager.com; font-src 'self' data: fonts.gstatic.com fonts.googleapis.com;` },
],
},
]
Expand Down
20 changes: 20 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"test:watch": "vitest"
},
"dependencies": {
"@next/third-parties": "^16.2.4",
"@react-three/fiber": "^8.18.0",
"@supabase/ssr": "^0.5.0",
"@supabase/supabase-js": "^2.45.0",
Expand All @@ -34,6 +35,7 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/three": "^0.184.0",
"@vitejs/plugin-react": "^6.0.1",
"autoprefixer": "^10.0.1",
"eslint": "^8",
Expand All @@ -42,7 +44,6 @@
"postcss": "^8",
"tailwindcss": "^3.4.0",
"typescript": "^5",
"vitest": "^4.1.4",
"@types/three": "^0.184.0"
"vitest": "^4.1.4"
}
}