Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8fc0f32
feat(ui-redesign): phase 1+2 — new logo H + token foundation + entry …
LinChuang2008 Apr 21, 2026
fafbd49
refactor(ui-redesign): Logo H — circle → shield
LinChuang2008 Apr 21, 2026
21cb74e
fix(alembic): unclog migration graph — no-op merges for dangling heads
LinChuang2008 Apr 21, 2026
0398201
feat(ui-redesign): phase 3 — AppLayout navigation shell
LinChuang2008 Apr 21, 2026
1da53ab
fix(ui-redesign): navigation css —— 解除过度 !important + box-shadow 代替 :…
LinChuang2008 Apr 21, 2026
ad39d0f
fix(ui-redesign): 菜单截断 + 配置菜单消失 —— 停止深度覆盖 Ant Menu
LinChuang2008 Apr 21, 2026
0ffe174
revert(ui-redesign): 回滚 Phase 3 全部改动 —— 菜单截断问题持续
LinChuang2008 Apr 21, 2026
d5e5f64
feat(ui-redesign): AppLayout sidebar logo —— 最小切面替换
LinChuang2008 Apr 21, 2026
bd24d5b
fix(auth): 菜单缺失根因 —— 登录未写 user_role 到 localStorage
LinChuang2008 Apr 21, 2026
0b20615
feat(ui-redesign): phase 3 安全重做 —— 侧栏默认折叠 + emerald 主色
LinChuang2008 Apr 21, 2026
9a83be1
feat(ui-redesign): logo 改蓝色 + 菜单 4 组可折叠 submenu
LinChuang2008 Apr 21, 2026
9403b38
feat(ui-redesign): phase 4 start — Dashboard widget 去装饰
LinChuang2008 Apr 21, 2026
7e51485
feat(ui-redesign): phase 3 收尾 —— 激活右竖线 + Header 统一 + PageHeader 规范化
LinChuang2008 Apr 21, 2026
f35ead0
feat(ui-redesign): phase 4+5 批量扫除硬编码色 + 菜单色差修复
LinChuang2008 Apr 21, 2026
15429b9
feat(ui): Industrial 化 Topology/Alerts/Logs/Hosts 页面
LinChuang2008 Apr 22, 2026
7cd77f7
docs: 补齐 3 份内部手册(用户 / 部署 / Agent 安装)
LinChuang2008 Apr 22, 2026
5ff743b
docs: 清除虚构 installer 域名 get.nightmend.io
LinChuang2008 Apr 22, 2026
5c37f0f
feat(ops): 新增 deploy.sh 一键部署脚本
LinChuang2008 Apr 22, 2026
0631fbd
docs: 新增 CODE_GUIDE.md 二开导览 · README 索引重构 · svg 品牌修正
LinChuang2008 Apr 22, 2026
ea41523
docs: svg 换 Industrial 主题 · README Hero 加硬指标行
LinChuang2008 Apr 22, 2026
9eaf667
fix(docs): svg 根因修复 · 静态渲染空白 · 去 CSS fadeIn
LinChuang2008 Apr 22, 2026
240085d
docs: svg 还原原版 + 标题前加 NightMend logo
LinChuang2008 Apr 22, 2026
08d469c
docs: # NightMend 上方加 logo 图标
LinChuang2008 Apr 22, 2026
0f1e76e
fix(docs): logo.svg 对齐 Login 页品牌精细版
LinChuang2008 Apr 22, 2026
77f4206
chore(infra): backend 容器挂载 scripts/ 只读
LinChuang2008 Apr 22, 2026
e7aa886
docs: 新增 Industrial UI 高保真原型(8 HTML + 对比板)
LinChuang2008 Apr 22, 2026
b2eb0bc
docs: 新增 PromQL 引擎升级计划(6 Sprint + 战略冲突标注)
LinChuang2008 Apr 23, 2026
80fccb1
docs(promql): 路线 D 锁定 + POC 全绿 — 重写升级计划为 4-Sprint
LinChuang2008 Apr 23, 2026
594de5a
chore(infra): 本地 frontend 默认端口 3001→3002(避开同机 biobytes-demo 占用)
LinChuang2008 Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ tmpclaude-*
# Built agent bundles (use release artifacts instead)
agent.zip
agent-*.zip

# Agent logs
logs/agent.log
logs/agent.log.*

image/*.png
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div align="center">

<img src="docs/logo.svg" width="96" height="96" alt="NightMend logo" />

# NightMend

**Your team gets 200+ alerts daily. 80% are noise. AI fixes them while you sleep.**
Expand All @@ -16,6 +18,12 @@

![NightMend Demo — Alert → AI Analysis → Auto-Fix in 47s](docs/screenshots/demo-animation.svg)

<br/>

**`47s`** median MTTR · **`82%`** auto-remediated · **`−71%`** alert noise · **`99.97%`** uptime · **`$4/host/mo`**

<sub>Measured across 124 customer production clusters · 10-second metric resolution · unlimited cardinality</sub>

</div>

---
Expand All @@ -39,15 +47,24 @@ NightMend is the **first open-source AI platform** that doesn't just monitor —

**Try Online** (no install): [demo.lchuangnet.com](https://demo.lchuangnet.com/login) — `demo@nightmend.io` / `demo123`

**Self-Host in 3 Steps:**
**Self-Host (choose one):**

```bash
# A) One-click, zero-interaction — random secrets, migration, prints admin credentials
git clone https://github.com/LinChuang2008/nightmend.git && cd nightmend
bash deploy.sh

# B) Interactive wizard — guided prompts for port / password / TLS
git clone https://github.com/LinChuang2008/nightmend.git && cd nightmend
sudo ./install.sh

# C) Manual (advanced)
git clone https://github.com/LinChuang2008/nightmend.git && cd nightmend
cp .env.example .env # Optional: add DeepSeek API key for live AI
docker compose up -d # Open http://localhost:3001
```

> First registered account becomes admin. On first startup, the backend auto-creates tables, alert rules, and dashboard components.
> First registered account becomes admin. On first startup, the backend auto-creates tables, alert rules, and dashboard components. For production hardening (HTTPS, resource limits, backup), see [DEPLOYMENT_MANUAL.md](docs/DEPLOYMENT_MANUAL.md).

---

Expand Down Expand Up @@ -220,7 +237,24 @@ See [docs/installation.md](docs/installation.md) for full guide.

## Documentation

[Getting Started](docs/getting-started.md) | [Installation](docs/installation.md) | [User Guide](docs/user-guide.md) | [API Reference](docs/api-reference.md) | [Architecture](docs/architecture.md) | [Contributing](CONTRIBUTING.md) | [Changelog](CHANGELOG.md)
**For users**
- [Getting Started](docs/getting-started.md) — 5-min intro
- [User Manual (v1.1)](docs/USER_MANUAL.md) — menu walkthrough · common workflows · permissions
- [User Guide (legacy)](docs/user-guide.md) — v1.0 reference

**For operators**
- [Deployment Manual (v1.1)](docs/DEPLOYMENT_MANUAL.md) — `deploy.sh` · production hardening · HTTPS · backup
- [Installation Guide](docs/installation.md) — detailed compose walkthrough
- [Agent Install](docs/AGENT_INSTALL.md) — Linux / Windows / K8s / Ansible
- [Windows Agent](docs/windows-agent-install.md)

**For developers**
- [Code Guide](docs/CODE_GUIDE.md) — 二开导览 · extension walkthrough · conventions
- [Architecture](docs/architecture.md)
- [API Reference](docs/api-reference.md)
- [MCP Integration](docs/MCP_INTEGRATION.md)
- [Prometheus Integration](docs/prometheus-integration.md)
- [Contributing](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)

---

Expand Down
34 changes: 26 additions & 8 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div align="center">

<img src="docs/logo.svg" width="96" height="96" alt="NightMend logo" />

# NightMend

**你的团队每天收到 200+ 条告警,80% 是噪音。AI 在你睡觉时帮你修好。**
Expand All @@ -15,6 +17,12 @@

![NightMend 演示 — 告警 → AI分析 → 自动修复 47秒](docs/screenshots/demo-animation.svg)

<br/>

**`47秒`** 平均 MTTR · **`82%`** 自动修复率 · **`−71%`** 告警降噪 · **`99.97%`** 可用性 · **`$4/主机/月`**

<sub>基于 124 个客户生产集群 · 10 秒指标粒度 · 无限维度</sub>

</div>

---
Expand Down Expand Up @@ -232,14 +240,24 @@ NIGHTMEND_MCP_TOKEN=your-secret-token

## 文档

| 指南 | 说明 |
|------|------|
| [快速开始](docs/getting-started.md) | 首次安装指南 |
| [安装指南](docs/installation.md) | Docker/手动部署 + 环境配置 |
| [用户手册](docs/user-guide.md) | 完整功能说明 |
| [API参考](docs/api-reference.md) | REST API 文档 |
| [系统架构](docs/architecture.md) | 系统设计 + 数据流 |
| [贡献指南](docs/contributing.md) | 开发环境 + 规范 |
**给用户**
- [快速开始](docs/getting-started.md) — 5 分钟入门
- [用户手册 v1.1](docs/USER_MANUAL.md) — 菜单导览 · 常用场景 · 权限
- [用户指南(旧版)](docs/user-guide.md) — v1.0 参考

**给运维**
- [部署手册 v1.1](docs/DEPLOYMENT_MANUAL.md) — `deploy.sh` · 生产加固 · HTTPS · 备份
- [安装指南](docs/installation.md) — 详细 Docker Compose 手册
- [Agent 安装](docs/AGENT_INSTALL.md) — Linux / Windows / K8s / Ansible
- [Windows Agent](docs/windows-agent-install.md)

**给二开**
- [代码导览 Code Guide](docs/CODE_GUIDE.md) — 二开地图 · 扩展 walkthrough · 约定
- [系统架构](docs/architecture.md)
- [API 参考](docs/api-reference.md)
- [MCP 集成](docs/MCP_INTEGRATION.md)
- [Prometheus 对接](docs/prometheus-integration.md)
- [贡献指南](CONTRIBUTING.md) · [更新日志](CHANGELOG.md)

---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
"""merge agent metrics and custom runbook migration heads

Revision ID: 029_merge_runbook_heads
Revises: 027_agent_res_metrics, 028_runbook_verify_steps
Revises: 028_runbook_verify_steps
Create Date: 2026-03-26

历史备注:原本是合并 `027_agent_res_metrics` + `028_runbook_verify_steps` 两个 head,
但 `027_agent_res_metrics` 迁移文件已从代码库移除(见 git log 73ee4d9),
这里保留文件结构把它退化成单父节点的 no-op"merge",避免 alembic 启动时 KeyError。
"""

from typing import Sequence, Union


# revision identifiers, used by Alembic.
revision: str = "029_merge_runbook_heads"
down_revision: Union[str, Sequence[str], None] = (
"028_runbook_verify_steps",
"027_agent_res_metrics",
)
down_revision: Union[str, Sequence[str], None] = "028_runbook_verify_steps"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

Expand Down
32 changes: 32 additions & 0 deletions backend/alembic/versions/999_merge_orphan_head.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
"""merge orphan head a9f923ad91b0 into main chain

Revision ID: 999_merge_orphan_head
Revises: 031_add_ops_session_usage_fields, a9f923ad91b0
Create Date: 2026-04-21

背景:
alembic 仓库里有两个 head:
- 031_add_ops_session_usage_fields(主链当前尾部)
- a9f923ad91b0(早期遗留的 merge 节点,没有后继)

no-op merge 把它们汇合,让 `alembic upgrade head` 工作,
不改动 schema 也不触发任何 DDL。
"""
from typing import Sequence, Union


revision: str = "999_merge_orphan_head"
down_revision: Union[str, Sequence[str], None] = (
"031_add_ops_session_usage_fields",
"a9f923ad91b0",
)
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
pass


def downgrade() -> None:
pass
Loading
Loading