refactor: 将 apps 重命名为 containers 并同步 harness 默认路径

example-project 与占位符/安装器默认改为 containers/backend|frontend,探测仍兼容旧 apps/。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ning-inspire
2026-11-17 13:46:59 +08:00
parent 26ebadc3ca
commit 28f0490dbf
74 changed files with 102 additions and 79 deletions

View File

@@ -0,0 +1,3 @@
<template>
<router-view />
</template>

View File

@@ -0,0 +1,22 @@
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--primary: #4F46E5; --primary-light: #818CF8; --primary-dark: #3730A3;
--success: #10B981; --warning: #F59E0B; --danger: #EF4444;
--gray-50: #F9FAFB; --gray-100: #F3F4F6; --gray-200: #E5E7EB;
--gray-300: #D1D5DB; --gray-400: #9CA3AF; --gray-500: #6B7280;
--gray-600: #4B5563; --gray-700: #374151; --gray-800: #1F2937; --gray-900: #111827;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--gray-900); background: var(--gray-50); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; }
button { cursor: pointer; border: none; font-size: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; border-radius: 0.375rem; font-weight: 500; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-danger { background: var(--danger); color: white; }
.card { background: white; border-radius: 0.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 1.5rem; }
.input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--gray-300); border-radius: 0.375rem; font-size: 0.875rem; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.25rem; font-weight: 500; font-size: 0.875rem; color: var(--gray-700); }

View File

@@ -0,0 +1,6 @@
/// <reference types="vite/client" />
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}

View File

@@ -0,0 +1,13 @@
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import './assets/main.css'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.use(ElementPlus)
app.mount('#app')

View File

@@ -0,0 +1,10 @@
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(),
routes: [
{ path: '/', name: 'home', component: () => import('@/views/home/HomePage.vue') },
],
})
export default router

View File

@@ -0,0 +1,16 @@
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
/** Auth store shell — wire login/register when ACC is implemented. */
export const useAuthStore = defineStore('auth', () => {
const token = ref(localStorage.getItem('token') || '')
const isLoggedIn = computed(() => !!token.value)
function logout() {
token.value = ''
localStorage.removeItem('token')
localStorage.removeItem('user')
}
return { token, isLoggedIn, logout }
})

View File

@@ -0,0 +1,5 @@
/** Shared frontend types — extend when implementing iteration1 features. */
export interface HealthResponse {
status: string
}

View File

@@ -0,0 +1,20 @@
import axios from 'axios'
const http = axios.create({
baseURL: '/api/v1',
timeout: 15000,
headers: { 'Content-Type': 'application/json' },
})
http.interceptors.request.use(cfg => {
const token = localStorage.getItem('token')
if (token) cfg.headers.Authorization = `Bearer ${token}`
return cfg
})
http.interceptors.response.use(
r => r,
e => Promise.reject(e)
)
export default http

View File

@@ -0,0 +1,25 @@
<template>
<main class="shell">
<h1>咨询预约平台</h1>
<p class="lead">工程骨架已就绪。业务实现待按 iteration1 规格落地。</p>
<ul>
<li>需求规格:<code>docs/features/iteration1/</code></li>
<li>交互原型:<code>docs/features/iteration1/prototypes/</code>(端口 5174)</li>
<li>健康检查:<code>GET /api/v1/health</code></li>
</ul>
</main>
</template>
<style scoped>
.shell {
max-width: 40rem;
margin: 4rem auto;
padding: 0 1.5rem;
font-family: system-ui, sans-serif;
line-height: 1.6;
}
h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.lead { color: #555; margin-bottom: 1.5rem; }
ul { padding-left: 1.25rem; }
code { font-size: 0.9em; background: #f3f4f6; padding: 0.1em 0.35em; border-radius: 4px; }
</style>