Giter Site home page Giter Site logo

yangxin1994 / dfd_edit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seanfitzpatrick0/dfd_edit

0.0 0.0 0.0 35.74 MB

Data Flow Diagram Web Editor

Home Page: http://dfdedit.com

Python 0.17% HTML 66.30% JavaScript 22.11% CSS 0.41% C# 2.29% Java 8.65% ASP.NET 0.07%

dfd_edit's Introduction

DFD_Edit

This tool allows users to model Data Flow Diagrams of their systems.

Users can Invite others to collaborate on their DFDs and Export their DFD to an RDF representation in Turtle.

This tool was created as part of my Final Year Project at Trinity College Dublin. My project is to investigate Linked Data representations of DFDs and how they can be used for automatic compliance validation of systems.

The extension of this application for for GDPR-aware DFD Modelling can be accessed Here.

The live site can be accessed Here.

Screen Shots

Home page

Home page

Editor

Editor

Account page

Account

Run Local

Download the code and navigate to this directory.

git clone https://github.com/SeanFitz1997/DFD_Edit
cd DFD_Edit

Install dependencies

  • Requires python 3.6 (or higher)
  • Requires pipenv
pipenv install

Create a secret key

Option 1: Set a environment variable

(If using bash)
$vim ~/.bashrc
#add to bottom of the file
export DFD_EDIT=<RANDOM-VALUE>

If windows see here

Option 2: Add secret key to App/__init__.py Change this line to

app.config['SECRET_KEY'] = "<RANDOM-VALUE>"

I recommend to create your random value using

$ python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import secrets
>>> secrets.token_urlsafe(16)
'<SECRET>'

Create Database

This will create a sqlite DB in App/site.db and populate it with some demo users and demo DFDs. You can long in with to these accounts with the email: '[email protected]' (or 2, 3 for the other users) and password 'test'.

python create_db.py

Run server

python run.py

This will allow you to access the site at http://127.0.0.1:5000

Whats Here

App
|-static
|   |- img (site images)
|   |- js
|       |-editor (code for editor page)
|           |- config (key bindings for editor)
|           |- images (images used in editor)
|           |- main.js (contains main function to create editor and diagram hierarchy data structure)
|           |- editor.js (creates editor)
|           |- diagram_hierarchy.js (diagram hierarchy getters & setters and diagram switch event handlers)
|           |- validator.js (validation helper functions)
|           |- save_graph.js (functions for serializing DFD and making save and export requests)
|       |- account.js (Handles users interactions on the account page)
|   |- mxgraph-master (mxgraph library used for drag & drop diagram)
|   |- styles (Custom CSS)
|- templates
|- __init__ (App constructor)
|- models.py (Data models)
|- routes.py (Route definitions)
|- forms.py (Form definitions)
|- exporter.py (RDF export functions)
|- utils.py (Helper functions)
create_db.py (Creates tables and fill with demo data)
run.py (Runs server in debug mode)

dfd_edit's People

Contributors

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