How winminsoe/cohesion works
Project Type and Purpose
• This is a small, open-source command-line tool (written in Go) that inspects a relational database’s schema and emits a JSON “table dependency” report.
• It connects to a MySQL (or compatible) database via a DSN, queries foreign-key metadata, then streams JSON objects to stdout (often piped into jq for pretty-printing).
File-Structure Analysis
• README.md at top level describes purpose and usage.
• main.go is the CLI entry point: reads DB_DSN, invokes the query logic, and writes JSON to stdout.
• query/query.go houses the data-access and dependency-resolution code (the “core” package).
Key Insights from README
• The tool’s only external dependency at runtime is the database.
• There is no web frontend or multi-service split—everything lives in one binary.