/microplan

Plan your project from command line

Primary LanguageJavaScriptMIT LicenseMIT


microplan

Plan your projects from the command line

Build Status npm version npm license Gitter PRs Welcome

Inspiration

"I am a strong believer that great software comes from great people. If you worry only about the technology side of the equation, you're missing way more than half of the picture"

-- Sam Newman ( "Evolutionary Architect", Building Microservices)

We want to solve the "Planning" side of the equation. And we want our tool to be handy. Talking of handy tools, the terminal comes to mind. So why not use that as our playground?

Installation

Microplan requires Node.js 0.12 or greater along with npm

$ npm install -g microplan

Planning Tools

The following issue trackers/messaging tools are supported by microplan.

Tool Status
Github AVAILABLE
Gitlab AVAILABLE
Gitter AVAILABLE

Getting Started

Let's say you want to create a user registration form in your app. Your workflow might look something like this:

  • Ping the UX team on Slack/Gitter to ask how the UI should look like
  • Open an issue in the front-end repo (on GitHub) to add a page and notify about it (on Gitter)
  • Open another issue in the back-end repo (on GitLab ) to add an API endpoint

Wait. This seems all over the place! :O

What if you had a consolidated solution baked right into your terminal?

This is where microplan comes into the picture! Let's get started and publish this plan to the specified tools from the cozy comfort of your command line.

Login

Use the login command to store your credentials in the .microplan file in your HOME folder

  • Generate your GitHub token here
  • Generate your GitLab token here
  • Gitter uses a custom integration URL specified in the planning file (details to follow below)
$ microplan login

anim

Initialize

init creates a file to help you get started with the planning flow

$ microplan init [filename].yml

$ microplan init --help

  Usage: microplan-init [options]

  Options:

    -t, --template <location>   specify input template location
    -d, --directory <location>  specify plan output directory
    -h, --help                  output usage information

Yep, that's it! Open filename.yml to configure.

anim

Configuration

Configurations lie at the heart of microplan and help you specify the platforms you want to publish to (eg. which repository to create an issue in or which room to plan the discussion in)

feature: Create user registration form
description: "To persist user preferences ..."

configuration:
  uxGitterChat:
    type: gitter
    url: "https://webhooks.gitter.im/e/xxxxxxxxxxxxxxxxxxx"

  frontendRepo:
    type: github
    slug: "microplan-xyz/www"

  backendRepo:
    type: gitlab
    slug: "microplan-xyz/api"

Plans

The plans object is part of the same yml file and helps you express each step of your plan.

plans:
  # Send a message to the UX team asking about the feature
  - title: "How should the User Registration Page look like?"
    description: "Should it have a dark or light theme? And would you suggest a specific font we should use?"
    in: uxGitterChat

  # Create an issue in the front-end GitHub repository
  # And notify the UX team on Gitter
  - title: "Choose frontend css framework for user registration page"
    description: "Should we go with Bootstrap or Spectre? Please let us know about the benchmark. Prototype PRs can be sent here."
    assignee: scriptnull
    in:
      - frontendRepo
      - uxGitterChat

  # Create an issue with a lengthy description in the GitLab repository
  - title: "Support new user registration"
    in: backendRepo
    assignee: scriptnull
    description: >
      Add the `user-routes.js` file and use the Express router

      ```javascript
      var express = require('express')
      var router = express.Router()

      // GET /user
      router.get('/user', function (req, res) {
        // fetch from DB
      })

      router.post('/user', function (req, res) {
        // save in DB
      })

      module.exports = router
      ```

Publishing

Once you have written the plan, use the publish command to create the issues and send messages to specified rooms

$ microplan publish [filename]

$ microplan publish -h
  Usage: microplan publish [options]

  Options:

    -h, --help      output usage information
    -s, --serial    Publish plans serially
    -p, --parallel  Publish plans parallely

publish

¡Eso es todo!

  • Your UX team will receive a Gitter notification

image

  • the front-end issue will be created on GitHub

image

  • the back-end issue will be created on GitLab

image

Input Formats

The configuration file can be written in various formats.

Format Status
YAML AVAILABLE
JSON AVAILABLE

Contributors

Authored and maintained by @scriptnull and @argonlaser with help from contributors.

Attributions

Thanks to these awesome npm packages without which the project would not have been possible.

Security

Please report any security vulnerabilities of this project to keybase.io/scriptnull

$ curl https://keybase.io/scriptnull/pgp_keys.asc | gpg --import