feat: initialize license platform implementation
Some checks failed
Check / api (push) Has been cancelled
Check / web (push) Has been cancelled

Add the Go Gin backend skeleton, Vue frontend shell, health check, CI workflow, implementation docs, and static review demo.\n\nCo-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
2026-09-30 14:30:36 +08:00
commit 3ab651d3a8
23 changed files with 3440 additions and 0 deletions

1
frontend/src/App.vue Normal file
View File

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

9
frontend/src/main.ts Normal file
View File

@@ -0,0 +1,9 @@
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 './style.css'
createApp(App).use(createPinia()).use(router).use(ElementPlus).mount('#app')

7
frontend/src/router.ts Normal file
View File

@@ -0,0 +1,7 @@
import { createRouter, createWebHistory } from 'vue-router'
import Overview from './views/Overview.vue'
export default createRouter({
history: createWebHistory(),
routes: [{ path: '/', component: Overview }]
})

1
frontend/src/style.css Normal file
View File

@@ -0,0 +1 @@
:root{font-family:Inter,"Microsoft YaHei",system-ui,sans-serif;color:#1c2832;background:#f5f7f8;font-synthesis:none}*{box-sizing:border-box}body{margin:0}.workspace{min-height:100vh}.topbar{height:66px;background:#fff;border-bottom:1px solid #e0e5e6;padding:0 clamp(20px,5vw,72px);display:flex;align-items:center;justify-content:space-between}.wordmark{display:flex;align-items:center;gap:11px;font-size:16px;font-weight:700}.mark{display:grid;place-items:center;width:30px;height:30px;border-radius:6px;color:#fff;background:#16675a}.environment{color:#68767b;font-size:13px}.content{max-width:1100px;margin:0 auto;padding:clamp(25px,5vw,56px) 22px}.heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:35px}.eyebrow{color:#16675a;font-weight:700;font-size:12px;margin:0 0 12px}.heading h1{font-size:clamp(24px,4vw,32px);margin:0}.subheading{color:#64737b;margin:8px 0 0}.status-section{background:#fff;border:1px solid #e0e5e6;border-radius:7px;padding:22px 25px;display:flex;justify-content:space-between;align-items:center;gap:20px}.status-section h2,.scope h2{font-size:17px;margin:0 0 5px}.status-section p{margin:0;color:#64737b;font-size:13px}.status{font-size:13px;white-space:nowrap;border-radius:4px;padding:5px 11px}.status.online{background:#e5f5ec;color:#16734a}.status.offline{background:#fff0ea;color:#b44830}.status.checking{background:#f1f3f4;color:#64737b}.scope{margin-top:38px}.scope dl{border-top:1px solid #dfe5e7;margin:16px 0 0}.scope dl div{display:grid;grid-template-columns:180px 1fr;padding:17px 0;border-bottom:1px solid #dfe5e7;gap:12px}.scope dt{color:#64737b}.scope dd{margin:0;font-weight:500}.footnote{color:#64737b;font-size:13px;margin-top:30px}@media(max-width:600px){.heading{align-items:start}.status-section{align-items:start;flex-direction:column}.scope dl div{grid-template-columns:1fr;gap:4px}.environment{display:none}}

View File

@@ -0,0 +1,37 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import axios from 'axios'
type Connection = 'checking' | 'online' | 'offline'
const connection = ref<Connection>('checking')
async function checkConnection() {
connection.value = 'checking'
try {
const { data } = await axios.get<{ status: string }>('/api/v1/health/live', { timeout: 3000 })
connection.value = data.status === 'ok' ? 'online' : 'offline'
} catch {
connection.value = 'offline'
}
}
onMounted(checkConnection)
</script>
<template>
<div class="workspace">
<header class="topbar"><span class="wordmark"><span class="mark">L</span>License Hub</span><span class="environment">开发环境</span></header>
<main class="content">
<div class="heading"><div><p class="eyebrow">工程状态</p><h1>授权管理平台</h1><p class="subheading">Web 服务器端软件授权 · 首阶段实施</p></div><el-button @click="checkConnection">重新检测</el-button></div>
<section class="status-section" aria-labelledby="api-title">
<div><h2 id="api-title">API 连通性</h2><p>检测 Gin 服务的存活端点,不代表数据库或授权业务已就绪。</p></div>
<span class="status" :class="connection" role="status">{{ connection === 'checking' ? '检测中' : connection === 'online' ? '服务在线' : '服务未连接' }}</span>
</section>
<section class="scope" aria-labelledby="scope-title">
<h2 id="scope-title">实施范围</h2>
<dl><div><dt>首发对象</dt><dd>Web 服务器端软件</dd></div><div><dt>订单与存储</dt><dd>线下订单 · 本地文件</dd></div><div><dt>离线期限</dt><dd>最长连续 14 天</dd></div><div><dt>待确定</dt><dd>实例身份规则、部署拓扑与接入负责人</dd></div></dl>
</section>
<p class="footnote">当前仅完成工程骨架与存活检查。授权签发、登录和订单接口尚未实现。</p>
</main>
</div>
</template>