MCPcopy
hub / github.com/rodrigo-brito/gocity

github.com/rodrigo-brito/gocity @v1.0.6 sqlite

repository ↗ · DeepWiki ↗ · release v1.0.6 ↗
422 symbols 1,539 edges 29 files 13 documented · 3%
README

GoCity

Actions Status codecov Go Report Card GoDoc License MIT


Available here: https://go-city.github.io

Research Paper: 26th International Conference on Software Analysis, Evolution and Reengineering (SANER)

PDF Version: ASERG Page

GoCity is an implementation of the Code City metaphor for visualizing source code. GoCity represents a Go program as a city, as follows:

  • Folders are districts
  • Files are buildings
  • Structs are represented as buildings on the top of their files.

Structures Characteristics

  • The Number of Lines of Source Code (LOC) represents the build color (high values makes the building dark)
  • The Number of Variables (NOV) correlates to the building's base size.
  • The Number of methods (NOM) correlates to the building height.

Installation

  • go install github.com/rodrigo-brito/gocity@latest
  • Or just head to the releases page and download the latest version for you platform.

Usage:

  • Online: https://go-city.github.io
  • Commands
    • gocity server - Start server
    • gocity open <GITHUB_IMPORT> - Open a specific Github project from github
    • gocity open ./my-project - Open a local directory

UI / Front-end

The UI is built with React and uses babylon.js to plot 3D structures. The front-end source code is available in the front-end branch.

Related Works

This tool makes part of a scientific research developed at Federal University of Minas Gerais (UFMG)

Student: Rodrigo Brito

Advisor: Marco Tulio Valente

Extension points exported contracts — how you extend this code

Analyzer (Interface)
(no doc) [2 implementers]
analyzer/analyzer.go
Cache (Interface)
(no doc) [2 implementers]
lib/cache.go
Fetcher (Interface)
(no doc) [2 implementers]
lib/fetch.go
Middleware (FuncType)
(no doc)
handle/middlewares/headers.go
Option (FuncType)
(no doc)
analyzer/analyzer.go

Core symbols most depended-on inside this repo

Get
called by 31
lib/cache.go
NextPosition
called by 5
model/position.go
GetSet
called by 4
lib/cache.go
GetIdentifier
called by 4
lib/file.go
Set
called by 3
lib/cache.go
NewCache
called by 3
lib/cache.go
GetGithubBaseURL
called by 3
lib/file.go
Fetch
called by 3
lib/fetch.go

Shape

Function 364
Method 34
Struct 16
Interface 3
TypeAlias 3
FuncType 2

Languages

TypeScript78%
Go22%

Modules by API surface

handle/assets/static/js/main.min.js331 symbols
analyzer/analyzer.go10 symbols
lib/cache.go9 symbols
model/node.go7 symbols
model/position.go5 symbols
lib/file_test.go5 symbols
lib/file.go5 symbols
lib/fetch.go5 symbols
testdata/mocks/Storage.go4 symbols
testdata/mocks/Cache.go4 symbols
testdata/example/person.go4 symbols
model/sort.go4 symbols

Dependencies from manifests, versioned

github.com/Microsoft/go-winiov0.5.2 · 1×
github.com/cpuguy83/go-md2man/v2v2.0.2 · 1×
github.com/creack/ptyv1.1.18 · 1×
github.com/davecgh/go-spewv1.1.1 · 1×
github.com/go-chi/corsv1.2.1 · 1×
github.com/jbenet/go-contextv0.0.0-2015071100451 · 1×
github.com/karlseguin/ccachev2.0.3+incompatible · 1×
github.com/karlseguin/expectv1.0.8 · 1×
github.com/kevinburke/ssh_configv1.2.0 · 1×
github.com/mitchellh/go-homedirv1.1.0 · 1×

For agents

$ claude mcp add gocity \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact