remove separate ui service, serve ui with backend
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 10s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 10s
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.env
|
||||
target/
|
||||
dist/
|
||||
|
||||
0
backend/Cargo.lock → Cargo.lock
generated
0
backend/Cargo.lock → Cargo.lock
generated
30
Justfile
30
Justfile
@ -1,8 +1,30 @@
|
||||
run *ARGS: build
|
||||
docker compose up {{ARGS}}
|
||||
./target/debug/nuchat {{ARGS}}
|
||||
|
||||
stop:
|
||||
docker compose down
|
||||
start: build
|
||||
./target/debug/nuchat 2>&1 > target/debug/logs/nuchat.log &
|
||||
|
||||
build:
|
||||
build: build-cargo build-ui
|
||||
|
||||
build-cargo:
|
||||
@mkdir -p target/debug/logs
|
||||
@mkdir -p dist
|
||||
cargo build
|
||||
|
||||
[working-directory: "ui"]
|
||||
build-ui:
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
test: integration unit
|
||||
|
||||
integration:
|
||||
if [ ! $(curl -sf "localhost:7000/api/healthcheck" ) ]; then just run; fi
|
||||
cargo test --test '*'
|
||||
|
||||
unit:
|
||||
cargo test --lib --bins
|
||||
|
||||
docker *ARGS:
|
||||
docker compose build
|
||||
docker compose up {{ARGS}}
|
||||
|
||||
2
backend/.gitignore
vendored
2
backend/.gitignore
vendored
@ -1,2 +0,0 @@
|
||||
target/
|
||||
dist/
|
||||
@ -1,26 +0,0 @@
|
||||
run *ARGS: build
|
||||
./target/debug/nuchat {{ARGS}}
|
||||
|
||||
start: build
|
||||
./target/debug/nuchat 2>&1 > target/debug/logs/nuchat.log &
|
||||
|
||||
build: build-cargo build-ui
|
||||
|
||||
build-cargo:
|
||||
@mkdir -p target/debug/logs
|
||||
@mkdir -p dist
|
||||
cargo build
|
||||
|
||||
[working-directory: "ui"]
|
||||
build-ui:
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
test: integration unit
|
||||
|
||||
integration:
|
||||
if [ ! $(curl -sf "localhost:7000/api/healthcheck" ) ]; then just run; fi
|
||||
cargo test --test '*'
|
||||
|
||||
unit:
|
||||
cargo test --lib --bins
|
||||
33
backend/ui/.gitignore
vendored
33
backend/ui/.gitignore
vendored
@ -1,33 +0,0 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
|
||||
/cypress/videos/
|
||||
/cypress/screenshots/
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
*.tsbuildinfo
|
||||
|
||||
logs/
|
||||
tests_output/
|
||||
@ -1,61 +0,0 @@
|
||||
# assets
|
||||
|
||||
This template should help get you started developing with Vue 3 in Vite.
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
||||
|
||||
## Type Support for `.vue` Imports in TS
|
||||
|
||||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
||||
|
||||
## Customize configuration
|
||||
|
||||
See [Vite Configuration Reference](https://vite.dev/config/).
|
||||
|
||||
## Project Setup
|
||||
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compile and Hot-Reload for Development
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Type-Check, Compile and Minify for Production
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Run Unit Tests with [Vitest](https://vitest.dev/)
|
||||
|
||||
```sh
|
||||
npm run test:unit
|
||||
```
|
||||
|
||||
### Run End-to-End Tests with [Nightwatch](https://nightwatchjs.org/)
|
||||
|
||||
```sh
|
||||
# When using CI, the project must be built first.
|
||||
npm run build
|
||||
|
||||
# Runs the end-to-end tests
|
||||
npm run test:e2e
|
||||
# Runs the tests only on Chrome
|
||||
npm run test:e2e -- --env chrome
|
||||
# Runs the tests of a specific file
|
||||
npm run test:e2e -- tests/e2e/example.ts
|
||||
# Runs the tests in debug mode
|
||||
npm run test:e2e -- --debug
|
||||
```
|
||||
|
||||
### Lint with [ESLint](https://eslint.org/)
|
||||
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
@ -1,49 +0,0 @@
|
||||
{
|
||||
"name": "assets",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"preview": "vite preview",
|
||||
"test:unit": "vitest",
|
||||
"test:e2e": "nightwatch tests/e2e/*",
|
||||
"build-only": "vite build --outDir ../dist",
|
||||
"type-check": "vue-tsc --build",
|
||||
"lint": "eslint . --fix",
|
||||
"format": "prettier --write src/"
|
||||
},
|
||||
"dependencies": {
|
||||
"vue": "^3.5.17",
|
||||
"vue-router": "^4.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nightwatch/vue": "^3.1.2",
|
||||
"@tsconfig/node22": "^22.0.2",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^22.15.32",
|
||||
"@vitejs/plugin-vue": "^6.0.0",
|
||||
"@vitest/eslint-plugin": "^1.2.7",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.5.1",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"chromedriver": "^137.0.4",
|
||||
"eslint": "^9.29.0",
|
||||
"eslint-plugin-vue": "~10.2.0",
|
||||
"geckodriver": "^5.0.0",
|
||||
"jiti": "^2.4.2",
|
||||
"jsdom": "^26.1.0",
|
||||
"nightwatch": "^3.12.2",
|
||||
"npm-run-all2": "^8.0.4",
|
||||
"prettier": "3.5.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.8.0",
|
||||
"vite": "^7.0.0",
|
||||
"vite-plugin-nightwatch": "^0.4.6",
|
||||
"vite-plugin-vue-devtools": "^7.7.7",
|
||||
"vitest": "^3.2.4",
|
||||
"vue-tsc": "^2.2.10"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@ -1,17 +0,0 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.node.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./tsconfig.vitest.json"
|
||||
},
|
||||
{
|
||||
"path": "./nightwatch/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,19 +1,6 @@
|
||||
services:
|
||||
ui:
|
||||
build: ./ui
|
||||
ports:
|
||||
- "3000:3000"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_started
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-q", "--spider", "http://0.0.0.0:3000"]
|
||||
interval: 2s
|
||||
retries: 3
|
||||
timeout: 5s
|
||||
|
||||
backend:
|
||||
build: ./backend
|
||||
server:
|
||||
build: ./
|
||||
ports:
|
||||
- "7000:7000"
|
||||
depends_on:
|
||||
|
||||
@ -1,4 +0,0 @@
|
||||
.nuxt
|
||||
.output
|
||||
node_modules
|
||||
README.md
|
||||
45
ui/.gitignore
vendored
45
ui/.gitignore
vendored
@ -1,24 +1,33 @@
|
||||
# Nuxt dev/build outputs
|
||||
.output
|
||||
.data
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
dist
|
||||
|
||||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Misc
|
||||
node_modules
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
dist
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
/cypress/videos/
|
||||
/cypress/screenshots/
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
*.tsbuildinfo
|
||||
|
||||
logs/
|
||||
tests_output/
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
FROM node:24-alpine AS base
|
||||
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
RUN corepack enable
|
||||
|
||||
FROM base AS prod
|
||||
WORKDIR /app
|
||||
|
||||
COPY pnpm-lock.yaml .
|
||||
RUN pnpm fetch --prod
|
||||
|
||||
FROM base AS build
|
||||
WORKDIR /app
|
||||
|
||||
COPY pnpm-lock.yaml .
|
||||
COPY package.json .
|
||||
RUN pnpm install
|
||||
|
||||
COPY . .
|
||||
RUN pnpm run build
|
||||
|
||||
FROM base AS runner
|
||||
WORKDIR /app
|
||||
COPY --from=prod /app/node_modules /app/node_modules
|
||||
COPY --from=build /app/.output ./
|
||||
|
||||
|
||||
ENV PORT=3000
|
||||
ENV NODE_ENV=production
|
||||
EXPOSE $PORT
|
||||
|
||||
CMD ["node", "server/index.mjs"]
|
||||
98
ui/README.md
98
ui/README.md
@ -1,75 +1,61 @@
|
||||
# Nuxt Minimal Starter
|
||||
# assets
|
||||
|
||||
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||
This template should help get you started developing with Vue 3 in Vite.
|
||||
|
||||
## Setup
|
||||
## Recommended IDE Setup
|
||||
|
||||
Make sure to install dependencies:
|
||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
||||
|
||||
```bash
|
||||
# npm
|
||||
## Type Support for `.vue` Imports in TS
|
||||
|
||||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
||||
|
||||
## Customize configuration
|
||||
|
||||
See [Vite Configuration Reference](https://vite.dev/config/).
|
||||
|
||||
## Project Setup
|
||||
|
||||
```sh
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# bun
|
||||
bun install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
### Compile and Hot-Reload for Development
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
```sh
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
|
||||
# bun
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
### Type-Check, Compile and Minify for Production
|
||||
|
||||
Build the application for production:
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
```bash
|
||||
# npm
|
||||
### Run Unit Tests with [Vitest](https://vitest.dev/)
|
||||
|
||||
```sh
|
||||
npm run test:unit
|
||||
```
|
||||
|
||||
### Run End-to-End Tests with [Nightwatch](https://nightwatchjs.org/)
|
||||
|
||||
```sh
|
||||
# When using CI, the project must be built first.
|
||||
npm run build
|
||||
|
||||
# pnpm
|
||||
pnpm build
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
|
||||
# bun
|
||||
bun run build
|
||||
# Runs the end-to-end tests
|
||||
npm run test:e2e
|
||||
# Runs the tests only on Chrome
|
||||
npm run test:e2e -- --env chrome
|
||||
# Runs the tests of a specific file
|
||||
npm run test:e2e -- tests/e2e/example.ts
|
||||
# Runs the tests in debug mode
|
||||
npm run test:e2e -- --debug
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
### Lint with [ESLint](https://eslint.org/)
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
pnpm preview
|
||||
|
||||
# yarn
|
||||
yarn preview
|
||||
|
||||
# bun
|
||||
bun run preview
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<NuxtRouteAnnouncer />
|
||||
<NuxtWelcome />
|
||||
</div>
|
||||
</template>
|
||||
0
backend/ui/env.d.ts → ui/env.d.ts
vendored
0
backend/ui/env.d.ts → ui/env.d.ts
vendored
@ -1,6 +0,0 @@
|
||||
// @ts-check
|
||||
import withNuxt from './.nuxt/eslint.config.mjs'
|
||||
|
||||
export default withNuxt(
|
||||
// Your custom configs here
|
||||
)
|
||||
@ -1,12 +0,0 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2025-07-15',
|
||||
devtools: { enabled: true },
|
||||
|
||||
modules: [
|
||||
'@nuxt/eslint',
|
||||
'@nuxt/image',
|
||||
'@nuxt/test-utils',
|
||||
'@nuxt/ui'
|
||||
]
|
||||
})
|
||||
@ -1,23 +1,49 @@
|
||||
{
|
||||
"name": "nuxt-app",
|
||||
"name": "assets",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
"dev": "vite",
|
||||
"build": "run-p type-check \"build-only {@}\" --",
|
||||
"preview": "vite preview",
|
||||
"test:unit": "vitest",
|
||||
"test:e2e": "nightwatch tests/e2e/*",
|
||||
"build-only": "vite build --outDir ../dist",
|
||||
"type-check": "vue-tsc --build",
|
||||
"lint": "eslint . --fix",
|
||||
"format": "prettier --write src/"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/eslint": "1.5.2",
|
||||
"@nuxt/image": "1.10.0",
|
||||
"@nuxt/test-utils": "3.19.2",
|
||||
"@nuxt/ui": "3.2.0",
|
||||
"eslint": "^9.31.0",
|
||||
"nuxt": "^4.0.0",
|
||||
"typescript": "^5.8.3",
|
||||
"vue": "^3.5.17",
|
||||
"vue-router": "^4.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nightwatch/vue": "^3.1.2",
|
||||
"@tsconfig/node22": "^22.0.2",
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^22.15.32",
|
||||
"@vitejs/plugin-vue": "^6.0.0",
|
||||
"@vitest/eslint-plugin": "^1.2.7",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"@vue/eslint-config-typescript": "^14.5.1",
|
||||
"@vue/test-utils": "^2.4.6",
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"chromedriver": "^137.0.4",
|
||||
"eslint": "^9.29.0",
|
||||
"eslint-plugin-vue": "~10.2.0",
|
||||
"geckodriver": "^5.0.0",
|
||||
"jiti": "^2.4.2",
|
||||
"jsdom": "^26.1.0",
|
||||
"nightwatch": "^3.12.2",
|
||||
"npm-run-all2": "^8.0.4",
|
||||
"prettier": "3.5.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"typescript": "~5.8.0",
|
||||
"vite": "^7.0.0",
|
||||
"vite-plugin-nightwatch": "^0.4.6",
|
||||
"vite-plugin-vue-devtools": "^7.7.7",
|
||||
"vitest": "^3.2.4",
|
||||
"vue-tsc": "^2.2.10"
|
||||
}
|
||||
}
|
||||
|
||||
10850
ui/pnpm-lock.yaml
generated
10850
ui/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
@ -1,2 +0,0 @@
|
||||
User-Agent: *
|
||||
Disallow:
|
||||
|
Before Width: | Height: | Size: 276 B After Width: | Height: | Size: 276 B |
@ -1,18 +1,17 @@
|
||||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"files": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.app.json"
|
||||
"path": "./tsconfig.node.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.server.json"
|
||||
"path": "./tsconfig.app.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.shared.json"
|
||||
"path": "./tsconfig.vitest.json"
|
||||
},
|
||||
{
|
||||
"path": "./.nuxt/tsconfig.node.json"
|
||||
"path": "./nightwatch/tsconfig.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user