diff --git a/about.html b/about.html new file mode 100644 index 0000000..fe872d0 --- /dev/null +++ b/about.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + About Grateful Journal | Private, Encrypted Gratitude Journaling + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + diff --git a/index.html b/index.html index 76dfeaf..fa8b2c9 100644 --- a/index.html +++ b/index.html @@ -17,7 +17,7 @@ /> - Grateful Journal — Your Private Gratitude Journal + Private Gratitude Journal App | Grateful Journal @@ -27,20 +27,20 @@ - + - + - + - + diff --git a/nginx/default.conf b/nginx/default.conf index 42f4050..25a4329 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -59,12 +59,26 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } - # Known SPA routes — serve index.html + # Homepage location = / { try_files /index.html =404; } - location ~ ^/(write|history|settings|privacy|about)(/|$) { + # Pre-rendered public pages — each gets its own HTML with correct meta tags + location ~ ^/about(/|$) { + try_files /about.html =404; + } + + location ~ ^/privacy(/|$) { + try_files /privacy.html =404; + } + + location ~ ^/termsofservice(/|$) { + try_files /termsofservice.html =404; + } + + # Protected SPA routes — serve index.html (React handles auth redirect) + location ~ ^/(write|history|settings)(/|$) { try_files /index.html =404; } diff --git a/privacy.html b/privacy.html new file mode 100644 index 0000000..25942f3 --- /dev/null +++ b/privacy.html @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + Privacy Policy | Grateful Journal + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + diff --git a/public/sitemap.xml b/public/sitemap.xml index f5e1a64..6abccb7 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -2,19 +2,25 @@ https://gratefuljournal.online/ - 2026-04-13 + 2026-04-16 monthly 1.0 https://gratefuljournal.online/about - 2026-04-13 + 2026-04-16 monthly - 0.7 + 0.8 https://gratefuljournal.online/privacy - 2026-04-13 + 2026-04-16 + yearly + 0.5 + + + https://gratefuljournal.online/termsofservice + 2026-04-16 yearly 0.4 diff --git a/src/pages/AboutPage.tsx b/src/pages/AboutPage.tsx index 4ca0419..fe42910 100644 --- a/src/pages/AboutPage.tsx +++ b/src/pages/AboutPage.tsx @@ -3,10 +3,10 @@ import { usePageMeta } from '../hooks/usePageMeta' export default function AboutPage() { usePageMeta({ - title: 'About — Grateful Journal', + title: 'About Grateful Journal | Private, Encrypted Gratitude Journaling', description: 'Learn about Grateful Journal — a free, end-to-end encrypted daily gratitude journal. No ads, no tracking, no social feed. Just you and your thoughts.', canonical: 'https://gratefuljournal.online/about', - ogTitle: 'About Grateful Journal', + ogTitle: 'About Grateful Journal | Private, Encrypted Gratitude Journaling', ogDescription: 'A free, private gratitude journal with end-to-end encryption. Learn how we built a distraction-free space for your daily reflection practice.', }) return ( diff --git a/src/pages/LoginPage.tsx b/src/pages/LoginPage.tsx index c9dbf6e..fa893e9 100644 --- a/src/pages/LoginPage.tsx +++ b/src/pages/LoginPage.tsx @@ -8,7 +8,7 @@ import { usePageMeta } from '../hooks/usePageMeta' export default function LoginPage() { usePageMeta({ - title: 'Grateful Journal — Your Private Gratitude Journal', + title: 'Private Gratitude Journal App | Grateful Journal', description: 'A private, end-to-end encrypted gratitude journal. No feeds, no noise — just you and your thoughts. Grow your gratitude one moment at a time.', canonical: 'https://gratefuljournal.online/', }) @@ -34,7 +34,10 @@ export default function LoginPage() { } } - if (loading || signingIn) { + // Keep showing the loader until the navigate effect fires. + // Without the `user` check here, the login form flashes for one frame + // between loading→false and the useEffect redirect. + if (loading || signingIn || user) { return } diff --git a/src/pages/PrivacyPage.tsx b/src/pages/PrivacyPage.tsx index e76a262..9323dbc 100644 --- a/src/pages/PrivacyPage.tsx +++ b/src/pages/PrivacyPage.tsx @@ -3,10 +3,10 @@ import { usePageMeta } from '../hooks/usePageMeta' export default function PrivacyPage() { usePageMeta({ - title: 'Privacy Policy — Grateful Journal', - description: 'Grateful Journal\'s privacy policy. Your journal entries are end-to-end encrypted — we cannot read them. App preferences are stored unencrypted. No ads, no tracking.', + title: 'Privacy Policy | Grateful Journal', + description: 'Grateful Journal\'s privacy policy. Your journal entries are end-to-end encrypted — we cannot read them. No ads, no tracking, no data selling.', canonical: 'https://gratefuljournal.online/privacy', - ogTitle: 'Privacy Policy — Grateful Journal', + ogTitle: 'Privacy Policy | Grateful Journal', ogDescription: 'Your journal entries are end-to-end encrypted and private. App preferences like background images are stored unencrypted. No ads, no tracking, no data selling.', }) return ( diff --git a/src/pages/TermsOfServicePage.tsx b/src/pages/TermsOfServicePage.tsx index c3eea4e..1d650a0 100644 --- a/src/pages/TermsOfServicePage.tsx +++ b/src/pages/TermsOfServicePage.tsx @@ -3,11 +3,11 @@ import { usePageMeta } from '../hooks/usePageMeta' export default function TermsOfServicePage() { usePageMeta({ - title: 'Terms of Service — Grateful Journal', - description: 'Terms of Service for Grateful Journal. Read about the rules and guidelines for using our app.', + title: 'Terms of Service | Grateful Journal', + description: 'Terms of Service for Grateful Journal — a free, private gratitude journal app. Read about the rules and guidelines for using the service.', canonical: 'https://gratefuljournal.online/termsofservice', - ogTitle: 'Terms of Service — Grateful Journal', - ogDescription: 'Terms of Service for Grateful Journal. Read about the rules and guidelines for using our app.', + ogTitle: 'Terms of Service | Grateful Journal', + ogDescription: 'Terms of Service for Grateful Journal — a free, private gratitude journal app. Read about the rules and guidelines for using the service.', }) return (
diff --git a/termsofservice.html b/termsofservice.html new file mode 100644 index 0000000..562c7ba --- /dev/null +++ b/termsofservice.html @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + Terms of Service | Grateful Journal + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + diff --git a/vite.config.ts b/vite.config.ts index a3217de..2bcbd07 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,7 @@ import { defineConfig, loadEnv } from 'vite' import react from '@vitejs/plugin-react' import fs from 'fs' -import path from 'path' +import path, { resolve } from 'path' function injectFirebaseConfig(content: string, env: Record): string { return content @@ -60,6 +60,12 @@ export default defineConfig({ build: { chunkSizeWarningLimit: 1000, rollupOptions: { + input: { + main: resolve(__dirname, 'index.html'), + about: resolve(__dirname, 'about.html'), + privacy: resolve(__dirname, 'privacy.html'), + termsofservice: resolve(__dirname, 'termsofservice.html'), + }, output: { manualChunks(id) { if (id.includes('node_modules/firebase')) {