diff --git a/nginx.conf b/nginx.conf index 9d4764aa..7198143e 100644 --- a/nginx.conf +++ b/nginx.conf @@ -16,6 +16,10 @@ http { location / { proxy_pass http://localhost:3000; + proxy_http_version 1.1; # Required for WebSocket + proxy_set_header Upgrade $http_upgrade; # WebSocket header + proxy_set_header Connection "upgrade"; # WebSocket header + proxy_set_header Host $host; proxy_read_timeout 30m; proxy_connect_timeout 30m; } diff --git a/servers/nextjs/app/(presentation-generator)/components/HeaderNab.tsx b/servers/nextjs/app/(presentation-generator)/components/HeaderNab.tsx index 5f0fbe2e..d960ad8d 100644 --- a/servers/nextjs/app/(presentation-generator)/components/HeaderNab.tsx +++ b/servers/nextjs/app/(presentation-generator)/components/HeaderNab.tsx @@ -1,5 +1,5 @@ "use client"; -import { LayoutDashboard, Settings } from "lucide-react"; +import { LayoutDashboard, Settings, Upload } from "lucide-react"; import React from "react"; import Link from "next/link"; import { RootState } from "@/store/store"; @@ -11,6 +11,7 @@ const HeaderNav = () => { return (
+ { - if (editor && content !== editor.storage.markdown.getMarkdown()) { - editor.commands.setContent(content); - } - }, [content, editor]); + // useEffect(() => { + // if (editor && content !== editor.storage.markdown.getMarkdown()) { + // editor.commands.setContent(content); + // } + // }, [content, editor]); return (
diff --git a/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx b/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx index 936835f0..40002f3b 100644 --- a/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx +++ b/servers/nextjs/app/(presentation-generator)/outline/components/OutlineItem.tsx @@ -66,16 +66,11 @@ export function OutlineItem({ transform: CSS.Transform.toString(transform), transition, } - - const handleSlideDelete = () => { if (isStreaming) return; dispatch(deleteSlideOutline({ index: index - 1 })) } - - - return (
{/* Main Title Row */} diff --git a/servers/nextjs/app/(presentation-generator)/upload/page.tsx b/servers/nextjs/app/(presentation-generator)/upload/page.tsx index 13d3c028..0866a9a8 100644 --- a/servers/nextjs/app/(presentation-generator)/upload/page.tsx +++ b/servers/nextjs/app/(presentation-generator)/upload/page.tsx @@ -43,7 +43,7 @@ const page = () => {
-

Create Presentation

+

Create Presentation

{/*

We will generate a presentation for you

*/}
diff --git a/servers/nextjs/app/api/layouts/route.ts b/servers/nextjs/app/api/layouts/route.ts index 9ffc3ce1..a179122e 100644 --- a/servers/nextjs/app/api/layouts/route.ts +++ b/servers/nextjs/app/api/layouts/route.ts @@ -3,7 +3,6 @@ import { promises as fs } from 'fs' import path from 'path' import { GroupSetting } from '@/app/layout-preview/types' - export async function GET() { try { // Get the path to the presentation-layouts directory diff --git a/servers/nextjs/app/layout-preview/[slug]/page.tsx b/servers/nextjs/app/layout-preview/[slug]/page.tsx index af64dd0d..00dee152 100644 --- a/servers/nextjs/app/layout-preview/[slug]/page.tsx +++ b/servers/nextjs/app/layout-preview/[slug]/page.tsx @@ -5,7 +5,7 @@ import { useGroupLayoutLoader } from '../hooks/useGroupLayoutLoader' import LoadingStates from '../components/LoadingStates' import { Card } from '@/components/ui/card' import { Button } from '@/components/ui/button' -import { ArrowLeft, Home } from 'lucide-react' +import { ArrowLeft, Home, Wifi, WifiOff, RefreshCw } from 'lucide-react' const GroupLayoutPreview = () => { const params = useParams() @@ -63,6 +63,7 @@ const GroupLayoutPreview = () => {

{layoutGroup.layouts.length} layout{layoutGroup.layouts.length !== 1 ? 's' : ''} • {layoutGroup.settings.description}

+
diff --git a/servers/nextjs/app/layout-preview/page.tsx b/servers/nextjs/app/layout-preview/page.tsx index 91406dca..a7186109 100644 --- a/servers/nextjs/app/layout-preview/page.tsx +++ b/servers/nextjs/app/layout-preview/page.tsx @@ -5,7 +5,7 @@ import { useLayoutLoader } from './hooks/useLayoutLoader' import LoadingStates from './components/LoadingStates' import { Card } from '@/components/ui/card' import { Button } from '@/components/ui/button' -import { ExternalLink } from 'lucide-react' +import { ExternalLink, Wifi, WifiOff, RefreshCw } from 'lucide-react' const LayoutPreview = () => { const { layoutGroups, layouts, loading, error, retry } = useLayoutLoader() @@ -35,6 +35,7 @@ const LayoutPreview = () => {

{layoutGroups.length} groups • {layouts.length} layouts

+
diff --git a/servers/nextjs/next.config.mjs b/servers/nextjs/next.config.mjs index 5338685f..e19c31de 100644 --- a/servers/nextjs/next.config.mjs +++ b/servers/nextjs/next.config.mjs @@ -1,6 +1,14 @@ +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); + + /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: false, + + images: { remotePatterns: [ diff --git a/servers/nextjs/package.json b/servers/nextjs/package.json index 009d983e..109e3de8 100644 --- a/servers/nextjs/package.json +++ b/servers/nextjs/package.json @@ -7,9 +7,8 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint", - "get:version": "next --version" - }, + "lint": "next lint" + }, "dependencies": { "@dnd-kit/core": "^6.3.1", "@dnd-kit/sortable": "^10.0.0", @@ -38,9 +37,11 @@ "@tiptap/extension-underline": "^2.0.0", "@tiptap/react": "^2.11.5", "@tiptap/starter-kit": "^2.11.5", + "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cmdk": "^1.0.0", + "jsonrepair": "^3.12.0", "lucide-react": "^0.447.0", "marked": "^15.0.11", @@ -56,6 +57,7 @@ "tailwind-scrollbar-hide": "^2.0.0", "tailwindcss-animate": "^1.0.7", "tiptap-markdown": "^0.8.10", + "ws": "^8.18.0", "uuid": "^11.1.0", "zod": "^4.0.5" }, @@ -66,6 +68,7 @@ "@types/react": "^18", "@types/react-dom": "^18", "@types/uuid": "^10.0.0", + "@types/ws": "^8.5.13", "cypress": "^14.3.3", "tailwindcss": "^3.4.1", "typescript": "^5" diff --git a/servers/nextjs/presentation-layouts/default/Type1SlideLayout.tsx b/servers/nextjs/presentation-layouts/default/Type1SlideLayout.tsx index 888adb91..79fd6e66 100644 --- a/servers/nextjs/presentation-layouts/default/Type1SlideLayout.tsx +++ b/servers/nextjs/presentation-layouts/default/Type1SlideLayout.tsx @@ -7,10 +7,10 @@ export const layoutName = 'Type1 Slide' export const layoutDescription = 'A clean two-column layout with title and description on the left and a featured image on the right.' const type1SlideSchema = z.object({ - title: z.string().min(3).max(100).default('Sample Title').meta({ + title: z.string().min(3).max(100).default('Hot NOT Reload Working!').meta({ description: "Main title of the slide", }), - description: z.string().min(10).max(500).default('Your description content goes here. This layout provides a clean and professional way to present content with supporting imagery.').meta({ + description: z.string().min(10).max(500).default('This is a test of the hot reload system! If you can see this text, hot reload is working perfectly. Changes should appear instantly without page refresh.').meta({ description: "Main description text", }), image: ImageSchema.default({ @@ -30,7 +30,6 @@ interface Type1SlideLayoutProps { } const Type1SlideLayout: React.FC = ({ data: slideData }) => { - return (
= ({ data: slideData })
{/* Title */}

- {slideData?.title || 'Sample Title'} + nice {slideData?.title || ' This is the title of slide'}

{/* Description */}

- {slideData?.description || 'Your description content goes here. This layout provides a clean and professional way to present content with supporting imagery.'} + {slideData?.description || 'This is a test of the hot reload system! If you can see this text, hot reload is working perfectly. Changes should appear instantly without page refresh.'}