feat: PWA manifest + service worker + SEO improvements - #50
feat: PWA manifest + service worker + SEO improvements#50jerry-shimizutech wants to merge 2 commits into
Conversation
- Install vite-plugin-pwa and configure VitePWA with workbox service worker - Add web app manifest: name, icons, screenshots, shortcuts (Calendar + Rankings) - Generate PWA icons: 192x192, 512x512 standard + 512x512 maskable - Generate app screenshots for install prompt - Update index.html: PWA meta tags (apple-mobile-web-app-*, theme-color, application-name), default OG/Twitter tags, preconnect hints - Add seo.ts helpers: getBreadcrumbSchema, getFaqSchema, getSportsEventSchema - Add BreadcrumbList structured data to CalendarPage and RankingsPage - Add BreadcrumbList + FAQ structured data to AboutPage (5 common BJJ questions) - Workbox runtime caching: API (NetworkFirst 4h), Google Translate (CacheFirst 7d), Cloudinary images (CacheFirst 30d) The site is now installable as a PWA on mobile and desktop with offline support for previously-visited pages. Google will also show FAQ rich results on About.
✅ Deploy Preview for marianas-open ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…status-bar, cacheableResponse guards)
Summary
Makes marianasopen.com installable as a Progressive Web App (PWA) on mobile and desktop. Also improves structured data for Google rich results.
Inbox Item
Leon requested: "Marianas Open — optimize it for SEO and PWA"
Changes
PWA
vite-plugin-pwa+ configure VitePWA with Workbox service workerindex.html meta improvements
apple-mobile-web-app-capable,apple-mobile-web-app-status-bar-style, etc.)<link rel="preconnect">to API and Clerk domains for faster page loadsSEO — Structured Data
seo.tsnew helpers:getBreadcrumbSchema,getFaqSchema,getSportsEventSchemaCalendarPage— BreadcrumbList structured data (Google shows breadcrumbs in search)RankingsPage— BreadcrumbList structured dataAboutPage— BreadcrumbList + FAQPage schema (5 BJJ questions, enables FAQ rich results)Testing
npm run build✅ (133 entries precached, sw.js + workbox bundle generated)PWA Install
After deploy, visiting marianasopen.com on mobile Chrome/Safari will show an "Add to Home Screen" prompt. Users get the dark navy icon with MO logo, shortcuts to Calendar and Rankings.
Screenshots (icons)
icon-192.png and icon-512.png use the MO white logo centered on
#07111f(dark navy) background, consistent with the site's color scheme.Greptile Summary
This PR adds full PWA support (installable app, Workbox service worker, web app manifest) and SEO improvements (BreadcrumbList + FAQPage + SportsEvent structured data, OG/Twitter defaults, preconnect hints) to marianasopen.com. The implementation is well-structured and all previously flagged P1 issues (
crossoriginon preconnects,black-translucentstatus bar, missingcacheableResponseon Translate/Cloudinary caches) have been resolved.\n\nSummary of changes:\n-vite.config.ts—VitePWAplugin with full manifest (icons, screenshots, shortcuts) and three Workbox runtime caching strategies\n-index.html— Apple PWA meta tags, OG/Twitter Card defaults,<link rel=\"preconnect\">hints\n-src/lib/seo.ts— NewgetBreadcrumbSchema,getFaqSchema, andgetSportsEventSchemahelpers\n-AboutPage,CalendarPage,RankingsPage— Breadcrumb structured data;AboutPagealso gets FAQ rich-result schema\n-package.json— Addsvite-plugin-pwa;workbox-windowis listed but not directly used (see comment)\n\nRemaining findings (all P2):\n-item: item.url ?? undefinedingetBreadcrumbSchemais a no-op —?? undefinedcan be dropped\n-workbox-windowdevDependency is redundant;vite-plugin-pwabundles its own copy\n-getSportsEventSchemais exported but not yet wired to any page component\n- Breadcrumb URLs in the three page files are hardcoded strings instead of using the existingbuildCanonicalUrlhelper fromseo.tsConfidence Score: 5/5
Safe to merge — all previous P1 issues are resolved and only minor style suggestions remain.
All three previously-flagged P1 issues (crossorigin on preconnects, black-translucent status bar, missing cacheableResponse) are addressed in this revision. The only remaining findings are P2 style/cleanup items that don't affect runtime correctness or user experience.
No files require special attention.
web/src/lib/seo.tsandweb/package.jsonhave minor style nits worth cleaning up but do not block merge.Important Files Changed
cacheableResponseguards. Clean configuration.getBreadcrumbSchema,getFaqSchema, andgetSportsEventSchemahelpers. Minor issue:item.url ?? undefinedis redundant;getSportsEventSchemais an unused dead export.crossorigin, and status bar is set toblack. All previous concerns addressed.getBreadcrumbSchemaandgetFaqSchemawith 5 well-written BJJ FAQs. Breadcrumb URL is hardcoded rather than usingbuildCanonicalUrl.BreadcrumbListschema. Breadcrumb URL hardcoded (minor style issue).BreadcrumbListschema. Breadcrumb URL hardcoded (minor style issue).vite-plugin-pwaandworkbox-windowas devDependencies.workbox-windowis not imported in any source file and is bundled internally byvite-plugin-pwa, making the explicit listing redundant.Sequence Diagram
sequenceDiagram participant Browser participant SW as Service Worker (Workbox) participant Cache participant API as marianas-open-api participant CDN as Cloudinary/Translate Note over Browser,SW: First visit — PWA install prompt shown Browser->>SW: Install & activate (precache JS/CSS/HTML/images) SW->>Cache: Store precached assets Note over Browser,SW: Subsequent navigation Browser->>SW: Fetch request alt API request (/api/*) SW->>API: NetworkFirst (10s timeout) API-->>SW: 200 OK SW->>Cache: Store (mo-api-cache, 4h TTL) SW-->>Browser: Response else Cloudinary image SW->>Cache: CacheFirst lookup Cache-->>SW: Hit → serve immediately SW-->>Browser: Cached image (30d TTL) else Google Translate SW->>Cache: CacheFirst lookup Cache-->>SW: Miss → fetch CDN CDN-->>SW: Response SW->>Cache: Store (google-translate-cache, 7d TTL) SW-->>Browser: Response else Precached asset SW->>Cache: Cache hit SW-->>Browser: Instant response endPrompt To Fix All With AI
Reviews (2): Last reviewed commit: "fix: address Greptile P2 feedback on PR ..." | Re-trigger Greptile