Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

arkit

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arkit

Visualises JavaScript, TypeScript and Flow codebases as meaningful and committable architecture diagrams

  • 1.2.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.5K
decreased by-39.76%
Maintainers
1
Weekly downloads
 
Created
Source

arkit 🇸🇪arkitektur

Visualises JavaScript, TypeScript and Flow codebases as meaningful and committable architecture diagrams

npm npm Travis Test coverage Technical debt npm type definitions

  • Supports JavaScript, Node.js, TypeScript and Flow code
  • Identifies, connects and groups configured architectural components
  • Visualises all components or some segments of the architecture
  • Exports codebase visualisation as SVG, PNG or Plant UML diagram
  • Integrates into development flow, so your CI, VCS, README and PRs are happy

Usage

Add arkit to your project using NPM or Yarn and try it out:

npm install arkit --save-dev
yarn add arkit --dev
# Run arkit against your source folder and save result as SVG
npx arkit -o arkit.svg src/

# Also you can specify output format and source files to start from
npx arkit -o puml -f src/main.js

# And get some more with debugging and file exclusions
LEVEL=info npx arkit -o puml -e "node_modules/,test,dist,coverage"

First results might look messy since it's better to generate diagrams per feature, architectural layer, etc. As you satisfied with results, add arkit command to your build script, so it will keep your architecture diagrams up-to-date.


Configuration

Arkit can be configured using basic CLI arguments or advanced JSON, JS module or package.json configuration.

Basic CLI arguments
user@machine:~$ npx arkit --help
arkit [directory]

Options:
  -o, --output     Output file paths or type, e.g. arkit.svg or puml
  -f, --first      First component file patterns, e.g. src/index.js
  -e, --exclude    File patterns to exclude, e.g. "node_modules"
  -d, --directory  Working directory                              [default: "."]
  -h, --help       Show help                                           [boolean]
  -v, --version    Show version number                                 [boolean]
Advanced arkit.json with JSON schema
{
  "$schema": "https://raw.githubusercontent.com/dyatko/arkit/master/schema.json",
  "components": [
    {
        "type": "Component",
        "patterns": ["**/*.ts", "**/*.tsx"]
    }
  ],
  "excludePatterns": ["node_modules/**", "test/**", "tests/**", "**/*.test.*", "**/*.spec.*"],
  "output": {
    "path": "arkit.svg"
  }
}

See more possible JSON configuration options in the examples below


Real-world examples

Express.js using npx arkit

Express architecture diagram

Arkit itself using arkit -o dist/arkit.png -f dist/arkit.js dist/

Arkit architecture diagram

ReactDOM using npx arkit and JSON config

ReactDOM architecture diagram

Keywords

FAQs

Package last updated on 05 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc