This repository contains the frontend applications built using Vue 3 within an NX monorepo architecture.
Seperated in 2 appilcations chat-app and admin-app
- Node : Version >22.12.0
- Fomatter : Vue-Official & Basic Ts formatter
Install all dependencies for both apps
npm installTo serve one of the application, you can run this command at the root of your workspace.
// runs the chat app on http://localhost:4200
npx nx serve chat-app:serve
// runs the admin app on http://localhost:4300
npx nx serve admin-app:serveWhen running via Tilt, the frontend containers use Nginx and Tilt syncs the built assets (Vite dist/) directly into /usr/share/nginx/html inside the pod. For live updates while editing code, run a build in watch mode and Tilt will sync changes automatically:
# From services/frontend
npx nx run admin-app:build --watch
npx nx run chat-app:build --watchTo run unit test, you can run this command at the root of your workspace.
npm run test- @vueuse/core: Utility functions
- pinia: State management
- vue-i18n: Internationalization
- vue-router: Routing
- daisyUI: Tailwind based CSS framework
- heroicons: Hand-crafted SVG icons (by Tailwind CSS)
- cypress: End-to-end testing framework
- vite: Local development server
apps/: Base of the apps chat & administrationlibs/: main logic at feature-* folders, shared dumb ui components and utils. See Library Types in Nxi18n: For localization, each app has its own folder:i18n/chatandi18n/admin
To change the theme, open the tailwind.config.js file and refer to the available color configuration options for DaisyUI at https://daisyui.com/docs/colors/
- VITE_API_URL = The URL for the backend
- VITE_ADMIN_URL = The URL where the admin frontend is running
- VITE_CHAT_URL = The URL where the chat frontend is running
- VITE_BOT_NAME = The AI assistant's display name (default: "Knowledge Agent")
- VITE_UI_LOGO_PATH = Common path to the main navigation logo (default: "/assets/navigation-logo.svg"). Used as a fallback for both light/dark.
- VITE_UI_LOGO_PATH_LIGHT = Path to the logo used in light mode (fallbacks to VITE_UI_LOGO_PATH)
- VITE_UI_LOGO_PATH_DARK = Path to the logo used in dark mode (fallbacks to VITE_UI_LOGO_PATH)
- VITE_UI_THEME_DEFAULT = Default theme when user first visits (default: "dark")
- VITE_UI_THEME_OPTIONS = Available theme options, comma-separated (default: "light,dark")
For detailed UI customization instructions, see UI Customization Guide.
Important:
The environment variables are not used after the docker-image is build. When using the
Dockerfileto run the frontend you have to copy the build frontend from/app/frontendto/usr/share/nginx/htmland run the/app/env.shscript.This can be done with the following command:
cp -r /app/frontend/. /usr/share/nginx/html /bin/sh -c /app/env.shThis is a workaround for the inability of Vite to use env-vars at runtime.