monolith-project-overview
Use for quick onboarding to this Monolith Go codebase, understanding startup flow, directory layout, and where to implement changes.
来源信息
- 仓库
- cggonzal/monolith
- 最近来源活动
- 2026年2月14日 03:11
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 0
- 分支
- 0
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- monolith-project-overview
- description
- Use for quick onboarding to this Monolith Go codebase, understanding startup flow, directory layout, and where to implement changes.
# Monolith Project Overview
## Use this skill when
- You need to get oriented in the codebase quickly.
- You are deciding where to place new code.
- You need to trace request lifecycle from `main.go` to controllers.
## High-signal map
- Entry point: `main.go`
- App code: `app/` (`controllers`, `models`, `views`, `routes`, `middleware`, `jobs`, `services`, `session`, `config`)
- Database bootstrapping: `db/db.go`
- Realtime pub/sub: `ws/`
- Scaffolding/generators: `generator/generator.go`
- Static assets: `static/`
- Deployment/runtime scripts: `server_management/`
- Human docs: `README.md` and `guides/*.html`
## Boot sequence (critical)
1. `config.InitConfig()` loads env defaults.
2. `session.InitSession()` initializes cookie store.
3. `db.InitDB()` opens DB + automigrates models.
4. `jobs.InitJobQueue()` starts worker queue.
5. `views.InitTemplates(...)` parses templates.
6. `ws.InitPubSub()` starts WebSocket hub.
7. `server_management.RunServer(...)` starts HTTP server.
## First commands to run
- `make run` (start app)
- `make test` (full tests)
- `make generator help` (list generator capabilities)
- `make guides` (serve built-in guides)
## Placement rules
- HTTP handlers: `app/controllers/`
- Shared request wrappers: `app/middleware/`
- Persistence/domain logic: `app/models/`
- Async work: `app/jobs/`
- External integrations: `app/services/`
- Route wiring: `app/routes/routes.go`
- Templates: `app/views/**/*.html.tmpl`
- Static files: `static/{css,js,img}`
在 GitHub 查看