Giter Site home page Giter Site logo

marxo's People

Contributors

dependabot[bot] avatar masonwan avatar yyfearth avatar

Watchers

 avatar  avatar  avatar  avatar

marxo's Issues

Build GUI prototype

The first GUI prototype needs to have page layout, showing the structure and page transition.

Facebook Session Limitation

I just found out that FB doesn't allow any access token being alive for longer than 60 days. It seems that the limitation begins at Dec 2012.

The finding will result the following expectations:

  1. The background analytics engine could run no longer than 60 days.
  2. When the user logout from his Facebook, the access token stored in the server will expire.

I will check whether forcing the posts public and letting our Marxo Facebook app to monitor those posts will work or not.

Start a task action

This action will create a task on calendar.
And it has delay and wait properties.

  • delay is the task how long it should be, a dynamic start and end may generated
  • wait is to define that whether the following actions/conditions need to be wait until the task ended

The task can be skipped, delay might be modified while running.

It can replace the delay condition on link.

File Upload API (draft)

Upload

Method URL
POST /files(?optional_params)

Optional Params:

  • filename=...: provide/overwrite filename, e.g. xxxxx.png
  • mime=....: provide/overwrite mime type, e.g. image/png
  • type=image: only accept image, return 400 otherwise

Rules:

  • Support form upload (multipart/form-data) (required)
  • Support raw data upload if want to try (optional)
  • Support base64 data uri upload if interested in (optional)
  • Auth required, save upload user info
  • Return 201 with file record json (id, filename, mime, size, dates, user info, etc.) and url in Location header for success
  • Has size limit
  • Add project/submission binding info after it used for submission (in future, files without binding to project will be GC after a short time)

Download

Method URL
GET /files/{id} (with proper mime)
GET /files/{id}/download (force download by overwrite mime)
  • Auth currently not required in this version
  • Should include mime, size and filename in headers (see)

Get File Info (Optional)

Method URL
GET /files/{id}/info
  • Auth required
  • Return the file record json

Return nodes and links data with workflow by default

Since the API should be designed according to use cases, and other APIs have the same behavior, it would be great if we do so too.

  • Return w/ nodes/links data when return single entity
  • Return w/o them when return array

Front-end Roadmap (Web Console)

Web Console

Layout

  • Console Layout

User

  • Sign-in
  • User Profile

Notification

  • Notification List
  • Notification Manager
  • Notification Viewer

Home Screen

  • Project Overview

Project

  • Project Manager
  • Project Editor
  • Project Viewer

Workflow

  • Workflow Editor
  • Workflow Manager

Event

  • Event Calendar
  • Event Editor
  • Event Manager

Content

  • Content Editor
  • Content Manager

Report

  • Report Manager
  • Results
  • Charts

Config

  • Tenant Profile
  • Facebook Service Connector
  • Twitter Service Connector
  • Email Service Connector
  • User Manager
  • User Editor

GDoc

Implement analyzer

The responsibility of the analyzer is to parse the data from different connectors.

Page API (draft)

Get

Method URL
GET /pages/{id}
  • No auth required (it will be better to hide sections if not auth)
  • Return the content which type is page type, 404 if it is not
  • Always hide records will be return, but do include visit count and submission count
  • Hide submissions if status is not finished, and include them after finished
  • It will be better to include event end date so it can show a deadline on page
  • Auto-increase the page visit count, do not care about caching issue

Search

Method URL
GET /pages?tenant_id=&project_id=
  • No auth required
  • Return list of contents which type is page
  • Apply all rules for Get method as well

Get Own Submission

Method URL
GET /pages/{id}/submissions/mine (with auth)
  • Return a list of submissions by the current user (from auth)

Submit

Method URL
POST /pages/{id}/submissions (with auth)
  • Update submission is not allowed in this version

JSON structure and RESTful API

Workflow

JSON

{
  id: '50447afb4728cb2036cf9ca1',
  name: 'test_wf',
  title: 'Test Workflow',
  desc: 'The test workflow',
  node_ids: ['507f81413d070321728fde10', '507f81413d070321728fde11', ...],
  link_ids: ['507f81413d070321728fde20', '507f81413d070321728fde21', ...],
  created_at: new Date(1363879373649),
  updated_at: new Date(1363879373649),
  created_by: '50447afb4728cb2136cf9ca2'
}

Workflow with nodes and links

{
  id: '50447afb4728cb2036cf9ca1',
  name: 'test_wf',
  ...
  nodes: [{
    id: '507f81413d070321728fde10',
    name: 'post_idea',
    title: 'Post Idea',
    desc: 'Post software project ideas',
    ...
  }, {
    id: '507f81413d070321728fde11',
    name: 'post_cancel',
    title: 'Post Cancel',
    desc: 'Post cancel notification',
    ...
  }],
  links: [{
    id: '507f81413d070321728fde22',
    name: 'post_req_to_submit_design',
    ...
  }, {
    id: '507f81413d070321728fde24',
    name: 'pass_to_post',
    desc: 'Post & e-mail to everyone if pass rate > 50%',
    ...
  }]
}

JSON structure and RESTful API

Workflow

All URL can ended with an optional type .json, but only support JSON.

RESTful API

Get

Request

Method URL
GET /workflows/{id}

Response

Status Body Condition
200 (OK) Workflow JSON with nodes and links Successful
404 (Not Found) Error JSON with message Not Found

Save

Request

Method URL Body
POST /workflows Workflow JSON (ignore nodes and links)
PUT /workflows/{id} Workflow JSON (ignore nodes and links)

Response

Status Body Condition
200 (OK) Workflow with nodes and links Successful Updated
201 (Created) Workflow with nodes and links Successful Created
400 (Bad Request) Error with message Invalid JSON or Workflow
  • When use POST, it should contain a Location Header in response

Delete

Request

Method URL
DELETE /workflows/{id}

Response

Status Body Condition
200 (OK) OK JSON Successful
404 (Not Found) Error JSON with message Not Found

Search

Request

Method URL
GET /workflows?param=…&param=…

Response

Status Body Condition
200 (OK) Workflow JSON Array w/o nodes and links Successful
404 (Not Found) Error JSON with message Not Found

JSON

Workflow

{
    "id": "50447afb4728cb2036cf9ca1",
    "name": "test_wf",
    "title": "Test Workflow",
    "desc": "The test workflow",
    "tenant_id": "507f81413d070321729fdeff", // null for public shared
    "template_id": "50447afb4728cb2036cf9ca1", // default null
    "node_ids": [ // String[], default []
        "507f81413d070321728fde10",
        "507f81413d070321728fde11"
    ],
    "link_ids": [ // String[], default []
        "507f81413d070321728fde20",
        "507f81413d070321728fde21"
    ],
    "created_at": "2013-03-21T15:22:53.649Z",
    "updated_at": "2013-03-21T15:22:53.649Z",
    "created_by": "50447afb4728cb2136cf9ca2"
}

Workflow with nodes and links

{
    "id": "50447afb4728cb2036cf9ca1",
    "name": "test_wf",
    ...
    "nodes": [ // Node[], default null
        {
            "id": "507f81413d070321728fde10",
            "name": "post_idea",
            "title": "Post Idea",
            "desc": "Post software project ideas",
            ...
        },
        {
            "id": "507f81413d070321728fde11",
            "name": "post_cancel",
            "title": "Post Cancel",
            "desc": "Post cancel notification",
            ...
        }
    ],
    "links": [ // Link[], default null
        {
            "id": "507f81413d070321728fde22",
            "name": "post_req_to_submit_design",
            ...
        },
        {
            "id": "507f81413d070321728fde24",
            "name": "pass_to_post",
            "desc": "Post & e-mail to everyone if pass rate > 50%",
            ...            
        }
    ]
}

Node

{
    "id": "507f81413d070321728fde10",
    "name": "post_idea",
    "title": "Post Idea",
    "desc": "Post software project ideas",
    "workflow_id": "50447afb4728cb2036cf9ca1",
    "tenant_id": "507f81413d070321729fdeff",
    "actions": [ // Action[], default []
        { // Action, embedded
            "id": "507f81413d070322728fce01",
            "type": "post_to_multi_social_media"
            "content": "……"
        }
    ],
    "created_at": "2013-03-21T15:22:53.649Z",
    "updated_at": "2013-03-21T15:22:53.649Z"
}

Link

{
    "id": "507f81413d070321729fde21",
    "name": "to_cancel",
    "title": "Like Count < 300",
    "desc": "Cancel if like count < 300",
    "workflow_id": "507f81413d070321729fde06",
    "tenant_id": "507f81413d070321729fdeff",
    "condition": { // Condition, embedded
        "left_operand": "like.account",
        "left_operand_type": "data.number",
        "right_operand": "300",
        "right_operand_type": "number",
        "operator": "<"
    },
    "prev_node_id": "507f81413d070321729fde10",
    "next_node_id": "507f81413d070321729fde11",
    "created_at": "2013-06-16T04:35:06.807Z",
    "updated_at": "2013-06-16T04:35:06.807Z"
}

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.