Directory Structure¶
The main directory organization of the OpsAnt code repository.
opsant/
├── frontend/ # Vue 3 前端
│ ├── src/
│ │ ├── views/ # 页面组件
│ │ ├── components/ # 通用组件
│ │ ├── layouts/ # 布局(ConsoleLayout 等)
│ │ ├── api/ # API 封装
│ │ ├── locales/ # 多语言(7 语言)
│ │ ├── stores/ # Pinia 状态
│ │ ├── router/ # 路由
│ │ └── styles/ # 全局样式
│ └── ...
├── opsant/ # Django 后端
│ ├── views/ # API 视图(hosts/monitor/ai/permission 等)
│ ├── models.py # 数据模型
│ ├── urls.py # API 路由
│ └── migrations/ # 数据库迁移
├── proxy/ # 兼容 OpsAny Proxy 的旧模块(SaltStack/Ansible API)
├── opsmini-server/ # OpsMini Server(Go 子项目)
├── install/ # 安装脚本与配置模板
├── docker/ # Dockerfile
├── static/opsant/ # 前端构建产物(SPA)
├── templates/opsant/ # SPA 入口 HTML
└── opsant-docs/ # 本文档站点
Key Notes¶
- opsant/ and proxy/ are two coexisting modules:
opsant/is the API and models of the new platform (standalone product)proxy/is a module compatible with the legacy OpsAny routes, isolated via theOPSANT_ENABLEDswitch- frontend/src/locales/ is the single source of truth for frontend internationalization
- docs/zh/ is the source language (single source of truth) of this documentation, and other languages are machine-translated by scripts