This repository contains the frontend application built with Vue 3, TypeScript, and Ant Design Vue. The frontend works together with a Java Spring Boot backend to provide a conversation-driven NoCode experience for generating websites. Key capabilities include interactive AI chat for code generation, real-time preview, and one-click deployment.
The full-stack web application is deployed here.
- Conversation-driven website generation (AI chat)
- Server-Sent Events (SSE) streaming to receive incremental AI-generated content
- Real-time preview of generated sites via the backend static resource endpoint and support for deployment workflows
Main frontend code lives under agent-frontend/:
src/main.ts— application entry: registers Pinia, router, and Ant Design Vuesrc/pages/— route pages (Home, App chat/edit pages, admin pages, user pages)src/layouts/BasicLayout.vue— top-level layout (header / content / footer)src/components/— reusable components (ChatBox, AppCard, GlobalHeader/Footer, etc.)src/api/— OpenAPI-generated API client (matches backend controllers)src/global/request.ts— axios wrapper and interceptors (auth / error handling)src/global/access.ts— global route guard and access control (runs on every route change)src/stores/loginUser.ts— Pinia store for login/user state (fetchLoginUser)src/utils/chatSse.ts— SSE parsing and helper for streaming AI responsessrc/utils/iframeEditor.ts— iframe preview / editor utilities used for live preview
Implementation notes and conventions:
- Uses Vue Composition API (
<script setup lang="ts">) with TypeScript types - API client is generated from OpenAPI with
npm run openapi2tsand placed insrc/api/ - Backend authentication is cookie-based; many requests use
withCredentials: true - SSE streams are parsed manually (handling
data:prefixes and end markers like[DONE])
-
Authentication and route control
src/global/access.tsruns on each route change and attempts to fetch the current user from the backend when needed.src/global/request.tshandles backend error codes (e.g. a custom 40100 NOT_LOGIN error) and redirects to login when necessary.
-
Chat-driven generation and SSE
- Pages such as
AppChatPage.vuesend generation requests to the backend. The backend streams incremental content via SSE. src/utils/chatSse.tsbuffers and parsesdata:lines and exposes partial results to the UI as they arrive.
- Pages such as
-
Preview and deployment
- After generation, the backend exposes the generated static site under a predictable path; the frontend can preview it at
/api/static/{codeGenType}_{appId}/. - The backend also provides deployment endpoints that return production URLs once deployment completes.
- After generation, the backend exposes the generated static site under a predictable path; the frontend can preview it at