Fastify/Postgres backend + React frontend matching the stack's app conventions, plus a hand-rolled RFC 4791 CalDAV server (caldav-adapter turned out Koa-only in practice) so calendars subscribe as genuine two-way sync in Apple/Google/Outlook. v1 scope: multiple colour-coded calendars, department/staff event tagging via live Workforce lookups, month/week/day/list views, dashboard, file attachments, activity log, and an auto-synced UK bank holidays calendar. Verified end-to-end locally against real Postgres: REST CRUD, CalDAV discovery/PROPFIND/REPORT/PUT/sync-collection, all-day date handling, system-calendar write protection, and activity logging across both the web and CalDAV write paths. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
32 lines
877 B
TypeScript
32 lines
877 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
export default defineConfig({
|
|
base: '/calendar/',
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
strategies: 'injectManifest',
|
|
srcDir: 'src',
|
|
filename: 'sw.js',
|
|
registerType: 'autoUpdate',
|
|
manifest: {
|
|
name: 'Calendar',
|
|
short_name: 'Calendar',
|
|
start_url: '/calendar/',
|
|
scope: '/',
|
|
display: 'standalone',
|
|
theme_color: '#c9a84c',
|
|
background_color: '#c9a84c',
|
|
icons: [
|
|
{ src: '/calendar/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: '/calendar/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
|
|
],
|
|
},
|
|
injectManifest: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
|
|
},
|
|
}),
|
|
],
|
|
})
|