Giter Club home page Giter Club logo

go-wardley's Introduction

Go-Wardley - Wardley maps generator

Wardley Maps Generator written in Golang. The generator takes an HCL based map description and generates a map in SVG format. If viewed on a browser, the SVG will have hover over functionality to get additional details on node descriptions.

Usage

$ ./go-wardley -f examples/map.hcl
Updated file: examples/map.svg

$ ./go-wardley -f examples/map.hcl -o examples/map.svg
Updated file: examples/map.svg

# Watch for file changes and update the file automatically.
$ ./go-wardley -f examples/map.hcl --watch
Starting watcher on: examples
Updated file: examples/map.svg
Updated file: examples/map.svg

# Serve the file on a webserver in localhost:8080 by default
# Update the drawing by refreshing the page.
$ ./go-wardley -f examples/map.hcl --serve
Serving content on: http://localhost:8080
$ ./go-wardley -f examples/map.hcl --serve 6060
Serving content on: http://localhost:6060
map

Element types

Size

size {
	width     = 1280
	height    = 768
	margin    = 40
	font_size = 9
}

Node

node user {
	label       = "User"        # Required
	visibility  = 1             # Required
	evolution   = "custom"      # Required
	x           = 1             # Required
	description = "Description"
	fill        = "black"
	color       = "black"
}
evolution

genesis, custom, product or commodity.

Connector

connector {
	from  = "user"        # Required
	to    = "vcs"         # Required
	label = "Description"
	color = "black"
	type  = "normal"
}
type

normal, bold, change or change-inertia.

Example input

A more extensive example can be found in ./examples/map.hcl.

# Anchor
node user {
	label       = "User"
	visibility  = 1
	evolution   = "custom"
	x           = 1
	description = "User Description"
	fill        = "black"
}

node vcs {
	label       = "On Prem VCS"
	visibility  = node.user.visibility + 1
	evolution   = "product"
	x           = 1
	description = "On prem VCS"
	fill        = "black"
}

node code_commit {
	label       = "Code Commit Mirror"
	visibility  = node.vcs.visibility
	evolution   = "commodity"
	x           = 1
	description = "Allows Code Pipeline to access the code."
	color       = "red"
}

connector {
	from = "user"
	to   = "vcs"
}

connector {
	from = "vcs"
	to   = "code_commit"
	color = "red"
	type = "change-inertia"
}

Roadmap

  • Make the node label optional, read the node ID if not present and title case it (configurable?).

  • Add an optional leyend box indicating the types of elements used in the map.

  • Better looks overall. Cleaner code.

  • Allow specifying node, connector and grid font sizes independently.

  • Arch type connector.

License

This file is part of go-wardley.

Copyright © 2019-2020 David Gamba Rios

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

go-wardley's People

Contributors

cwarden avatar davidgamba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.