feat: implement real-time booking updates using Server-Sent Events (SSE) and add public booking URL sharing to the dashboard

This commit is contained in:
Jose Selesan
2026-04-17 17:25:46 -03:00
parent a075f13587
commit e0d755bef7
10 changed files with 226 additions and 8 deletions

View File

@@ -12,6 +12,7 @@ import { userRoutes } from '@/modules/user/user.routes';
import type { AppEnv } from '@/types/hono';
import type { Hono } from 'hono';
import { serveStatic } from 'hono/bun';
import { registerEventsRoutes } from './lib/sse';
import { healthCheckRoutes } from './modules/health-check/health-check.routes';
export function registerRoutes(app: Hono<AppEnv>) {
@@ -28,6 +29,8 @@ export function registerRoutes(app: Hono<AppEnv>) {
.route('/api/admin-bookings', adminBookingRoutes)
.route('/api/health', healthCheckRoutes);
registerEventsRoutes(app);
app.use('*', serveStatic({ root: './public' }));
app.get('*', async (c) => {
if (c.req.path === '/api' || c.req.path.startsWith('/api/')) {