Coder Social home page Coder Social logo

dedalusj / cloudgram Goto Github PK

View Code? Open in Web Editor NEW
91.0 4.0 5.0 3.34 MB

Generate diagrams for your cloud architecture using code

Home Page: https://cloudgram.dedalusone.com

License: Apache License 2.0

JavaScript 67.53% HTML 29.29% Shell 0.17% SCSS 2.45% Nunjucks 0.56%
cloud diagram diagram-generator diagrams-as-code architecture

cloudgram's Introduction

CloudGram

License Test

CloudGram lets you generate diagrams for your cloud architecture directly in your browser using code in a syntax similar to the DOT language and familiar to GraphViz users.

To start using CloudGram navigate to https://cloudgram.dedalusone.com and follow the examples and online editor to experiment visualizing your architecture.

Development

Pre-requisites

Bootstrap

Upon cloning the project install the dependencies with yarn install. Beside install the project dependencies this will also install git hooks that will run tests and linting on every commit.

Running

Use the yarn run dev command to launch a dev server that will also watch for files changes and recompile if necessary. The app will be accessible at http://localhost:1234/.

Deployment

Use yarn run build to build the minified production assets and build.

The infra directory contains an example CloudFormation template to set up an S3 bucket, and a CloudFront distribution to serve CloudGram via CDN.

Regenerating service icons

The command yarn run assets can be used to automatically regenerate the SVG and JS files for the service icons for the supported providers. The command runs the scripts/assets,js node script. Currently, the script will always regenerate the icons for all providers hence no command line options are supported.

Regenerating grammar diagram

To regenerate the grammar diagram HTML, the src/grammar_diagram.html file, use the yarn run diagram command. This command is also run automatically at commit time via git hooks.

Related projects

CloudGram is inspired by the diagrams project.

cloudgram's People

Contributors

dedalusj avatar dependabot[bot] 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  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  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

cloudgram's Issues

Add generic icons

Add icons for basic components like Postgres, MySQL, Kafka, Redis, Cassandra etc to enable building diagrams outside of cloud environments.

Better favicon

The current favicon was put together quickly and it's fairly meh.

Preserve position of dragged node

The graph is re-drawn from scratch on every change or on page load when pasting a link with a diagram in the query parameters.

This means that the position of nodes is recomputed from scratch and any change made by users by dragging node is lost.

Avoid edges to overlap nodes

The layout of the nodes by dagre does not prevent edges overlapping nodes see:

graph

generated by:

diagram "image processing" [direction=lr] {
  generic.user user [label="User"];
  aws.appsync appsync [label="AWS AppSync"];
  aws.s3 bucket [label="AWS S3 Bucket"];
  aws.cognito cognito [label="AWS Cognito"];
  aws.lambdaFunction workflow [label="Start workflow"];
  generic.component resolver [label="Resolver"];
  
  group backend [label="Backend",style=solid,opacity=0,stroke=red,width=4] {
    aws.stepFunctions stepFunction [label="AWS Step Function"];
    
    aws.lambdaFunction extraction [label="Extract metadata"];
    aws.lambdaFunction detection [label="Object/Scena detection"];
    aws.lambdaFunction thumbnailing [label="Create thumbnail"];
    aws.lambdaFunction persistence [label="Persist metadata"];
    
    aws.dynamodb dynamo [label="AWS DynamoDB"];
    aws.rekognition rekognition [label="AWS Rekognition"];
    
    stepFunction -> extraction;
    stepFunction -> detection;
    stepFunction -> thumbnailing;
    stepFunction -> persistence;
    
    persistence -> dynamo;
    detection -> rekognition;
  }
  
  user -> cognito;
  user -> appsync;
  user -> bucket;
  bucket -> workflow;
  workflow -> appsync;
  appsync -> resolver;
  
  resolver -> stepFunction;
  resolver -> dynamo;
}

iFrame rendering

Currently the rendering of the diagrams happens on the main page alongside the editor. Allow embedding CloudGram into an iFrame which would not load the editor and instead grab the document from query parameter and draw it.

This would allow easy embedding of CloudGram in other sites by simple URL.

Reduce bundle size

Currently the bundle size clocks at ~1.4MB. Explore methods to reduce it as much as possible.

Add many more examples

CloudGram ships with a very basic example. Create a new page with example richer architectures to showcase the features.

Make rendering available via HTTP request

Currently CloudGram rely bin the browser to run its code and layout the diagram however it would be nice to have the option to render in the backend so that diagrams could be rendered via an http request.

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.