From 5fc4bef5be5e905033b1b42d314398780e44a8e3 Mon Sep 17 00:00:00 2001 From: "Mr.Dat" Date: Tue, 6 Jan 2026 15:39:38 +0700 Subject: [PATCH] feat: Update Vite configuration and add new public routes - Refactored vite.config.ts to update entry points and improve plugin configuration. - Added Home.vue as the landing page with a modern design and features overview. - Created Layout.vue for consistent header and footer across public routes. - Implemented Privacy.vue and Terms.vue for legal documentation with structured content. - Introduced gRPC and service index files for future service implementations. - Developed createVueApp.ts for application setup with PrimeVue and Pinia. - Enhanced SSR rendering in ssrRender.ts for improved performance and SEO. --- package.json | 8 +- src/client.ts | 4 +- src/components/DashboardLayout.vue | 5 +- src/index.tsx | 91 -------- src/main.ts | 89 +++----- src/routes/auth/layout.vue | 2 +- src/routes/home/Home.vue | 234 --------------------- src/routes/index.ts | 296 ++++++++++++++------------- src/routes/public-routes/Home.vue | 231 +++++++++++++++++++++ src/routes/public-routes/Layout.vue | 84 ++++++++ src/routes/public-routes/Privacy.vue | 61 ++++++ src/routes/public-routes/Terms.vue | 67 ++++++ src/server/grpc/index.ts | 1 + src/server/services/index.ts | 1 + src/shared/createVueApp.ts | 56 +++++ src/worker/html.ts | 56 ----- src/worker/ssrLayout.ts | 4 +- src/worker/ssrRender.ts | 95 +++++++++ uno.config.ts | 24 ++- vite.config.ts | 121 ++++++----- 20 files changed, 876 insertions(+), 654 deletions(-) delete mode 100644 src/index.tsx delete mode 100644 src/routes/home/Home.vue create mode 100644 src/routes/public-routes/Home.vue create mode 100644 src/routes/public-routes/Layout.vue create mode 100644 src/routes/public-routes/Privacy.vue create mode 100644 src/routes/public-routes/Terms.vue create mode 100644 src/server/grpc/index.ts create mode 100644 src/server/services/index.ts create mode 100644 src/shared/createVueApp.ts delete mode 100644 src/worker/html.ts create mode 100644 src/worker/ssrRender.ts diff --git a/package.json b/package.json index f512d9c..4acaa42 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,9 @@ "name": "holistream", "type": "module", "scripts": { - "dev": "vite", - "build": "vite build && bun build dist/server/index.js --target bun --minify --outdir dist", - "preview": "vite preview", - "deploy": "wrangler deploy", - "cf-typegen": "wrangler types --env-interface CloudflareBindings" + "dev": "bunx --bun vite", + "build": "bunx --bun vite build && bun build dist/server/index.js --target bun --minify --outdir dist", + "preview": "bunx --bun vite preview" }, "dependencies": { "@aws-sdk/client-s3": "^3.946.0", diff --git a/src/client.ts b/src/client.ts index 35ba2ae..1fcdc0a 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,7 +1,7 @@ -import { createApp } from './main'; import 'uno.css'; +import createVueApp from './shared/createVueApp'; async function render() { - const { app, router } = createApp(); + const { app, router } = createVueApp(); router.isReady().then(() => { app.mount('body', true) }) diff --git a/src/components/DashboardLayout.vue b/src/components/DashboardLayout.vue index 194bff9..cacf209 100644 --- a/src/components/DashboardLayout.vue +++ b/src/components/DashboardLayout.vue @@ -19,12 +19,11 @@ const links = [ { href: "/upload", label: "Upload", icon: Upload, type: "a" }, { href: "/video", label: "Video", icon: Video, type: "a" }, { href: "/plans", label: "Plans", icon: Credit, type: "a" }, - { href: "/notification", label: "Notification", icon: Bell, type: "a" }, + // { href: "/notification", label: "Notification", icon: Bell, type: "a" }, ];