1e4fe5f0e3
RSS Feed - /feed.xml proxies the Anchor feed under the site's canonical domain - Rewrites channel <link> and atom:link self-ref to the site URL - Served with 30-min Cache-Control, reuses the existing episode cache PWA - vite-plugin-pwa installed; Workbox service worker auto-generated on build - manifest.json inlined in vite.config.ts (name, icons, theme, standalone) - pwa-192.png and pwa-512.png generated from existing book_icon.png - StaleWhileRevalidate for /api/episodes and /api/questions; CacheFirst for images - API, feed.xml, and uploads routes excluded from navigate fallback Lesson Comments - Import and wire StudySectionComments into ColossiansStudySectionPage - Replaces the CommunityBoard in the Lesson Discussion section - All routes and moderation already existed; only the render was missing Progress Tracking + Streaks - Mark-complete handler now records lastStudiedDate, currentStreak, longestStreak on the user record - Streak increments on consecutive calendar days, resets on a gap - /api/study-account/overview now returns streak fields - Account page: 4-stat summary row (notes, streak 🔥, longest streak, member since) - Per-study progress bars showing completedLessons/totalLessons with gold → green fill at 100% Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
53 lines
1.6 KiB
TypeScript
53 lines
1.6 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['favicon.svg', 'book_icon.png', 'icons.svg'],
|
|
manifest: {
|
|
name: 'Verse by Verse with Nate',
|
|
short_name: 'VBVN',
|
|
description: 'A journey through Scripture — episodes, Q&A, and Bible study.',
|
|
start_url: '/',
|
|
display: 'standalone',
|
|
background_color: '#13120e',
|
|
theme_color: '#13120e',
|
|
icons: [
|
|
{ src: '/pwa-192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: '/pwa-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' },
|
|
],
|
|
},
|
|
workbox: {
|
|
navigateFallback: '/index.html',
|
|
navigateFallbackDenylist: [/^\/api\//, /^\/feed\.xml/, /^\/uploads\//],
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^\/api\/(episodes|questions)/,
|
|
handler: 'StaleWhileRevalidate',
|
|
options: { cacheName: 'api-content', expiration: { maxAgeSeconds: 3600 } },
|
|
},
|
|
{
|
|
urlPattern: /\/images\//,
|
|
handler: 'CacheFirst',
|
|
options: { cacheName: 'images', expiration: { maxEntries: 60, maxAgeSeconds: 86400 * 30 } },
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'react-simple-maps': 'react-simple-maps/dist/index.es.js',
|
|
},
|
|
},
|
|
server: {
|
|
proxy: {
|
|
'/api': 'http://localhost:4173',
|
|
},
|
|
},
|
|
})
|