natterstefan / react-trello-multiboard

React-Trello-Multiboard is a single-page application built with React displaying multiple cards of several Trello® boards and lists. The cards can be filtered by preferred team members.
https://multiboardfortrello.com/
Apache License 2.0
54 stars 10 forks source link
kanban kanban-board project-management react scrum scrum-board single-page-app trello trello-board

React-Trello-Multiboard

DevDependencies Dependencies DevDependencies Coverage Status Known Vulnerabilities GitHub license

TrelloMultiBoardExample

React-Trello-Multiboard is a single-page application built with React displaying multiple cards of several Trello® boards and lists. The cards can be filtered by preferred team members.

Table of Contents

Main features

Example

TrelloMultiBoardExample

As you can see in the example, there are three Trello® boards and two members. From each board all cards of a list matching the #sprint1 pattern in the title (can be any pattern, defined in config.js) is listed below. Each member can be selected, which causes the list of cards to only show those of the selected member. Additionally, you see five sprints on the page. You can select one sprint and see the cards of the selected pattern. This allows you to plan ahead.

You can find the example in the gif above here: https://multiboardfortrello.com/example/#/

Development & Build Requirements

GitHub stars GitHub forks GitHub issues Twitter

  node v8.9.x
  npm 5.6.x

  // or
  yarn 1.3.x

Switch to the required version with nvm use. If you have not installed this node version, install it with eg. nvm install v8.9.4.

Full Example Setup with nvm

  // first install nvm (eg. with brew)
  brew install nvm

  // then install the required node version
  nvm install v8.9.4

  // and the required npm version (if you have not npm 5.6.x)
  npm install -g npm@5.6.0

  // finally use the just installed versions
  nvm use

Setup & Configuration Quickstart

Trello API Key

Log in to Trello and get your api key here: https://trello.com/app-key

Dependencies

First install all Dependencies with

  yarn // or npm install

Config.js

Once you have installed all dependencies, yarn/npm will copy ./config/config.example.js for you and rename it to ./config/config.js. You then have to customize it according to your needs and eg. enter your API key and other settings into the config.js.

module.exports = {
  app_title: 'Multiboard for Trello®',
  api_key: 'your_api_key',
  google_analytics_property: 'UA-12345678-9',
  company_member: 'exampleusername'
  preferred_members: /exampleusername|anotheruser/,
  lists: [/#sprint1/, /#sprint2/, /#sprint3/],
  boards: [
    {
      shortcut: 'hw',
      name: 'hello-world',
      id: 'board-1',
      estimates_with_round_brackets: true,
      estimates_with_square_brackets: true,
    },
  ],
}

The main config properties look like this:

The list of boards should contain board objects like this:

With the id property you can add boards, which are public and the user is not part of when accessing your TrelloMultiBoard App.

How to get the id of your board?

Let's assume the url of your board looks like this: https://trello.com/b/123asdf/hello-world. You can get the id of the board now by changing the url to: https://trello.com/b/123asdf/hello-world.json. Wait for some time (depends on the number of lists and card of the board) and you should see a result similar to

 { "id": "IGVA5wQ67w2mBbkctLxi", "name": "hello-world", "desc":"", ... }

The id at the beginning of the JSON is the id of the board.

Estimations Configuration

Additionally you can calculate and get the estimations from the cards, if their name looks similar to: "Setup server (3)[1]". Now you can turn the feature on by adding one of the following boolean flags to the board' config.

Each of the values will be summed up by their type.

Example:

Would result in the following total estimation for the board: Example-Board (6)[1]

Google Analytics & Privacy Page

It is possible to integrate Google Analytics with pageviews by simply adding google_analytics_property to the config.js. This will add https://www.google-analytics.com/analytics.js to the app and track pageviews. By default doNotTrack browser settings are respected.

At the same time a privacy page (eg. http://localhost:2222/#/privacy) is created and a CookieNotice presented to new users. The content can be defined in src/pages-content by adding a privacy.md file.

By default gaOptout is available to set a disable Google Analytics cookie in the user's browser.

One can use it like this in the privacy.md file:

Or you deactivate it with a DoNotTrack Cookie: <a href="https://github.com/natterstefan/react-trello-multiboard/blob/master/javascript:gaOptout();">Deactive Google Analytics</a>.

URL Shortcuts & Bookmarks

Certain url links can be used to eg. customize the inital lists and selected member:

How to start the App locally

Now, when you have set up the config.js start the app with: yarn start. The webpack-dev-server will start the app and open: http://localhost:2222/#/.

You can now interact with the board, filter members or show all cards again.

How to build the App for Production

yarn start will build and run a development version of the app, but you should create a stable and production ready build with yarn build before you upload the files onto your server.

The output will be available in the dist folder.

How to develop and contribute

Clone the repository, commit your changes and create a PR for new features, bugfixes or other ideas.

List of npm scripts and git hooks

The following scripts are available (also work with npm run):

Pre-Commit Hooks

When attempting to commit and push changes, some taks will automatically run:

Pre-Push Hooks

Runs all tests with Jest.

How to Test your Changes

Jest was selected as the test framework for this app. Simply run it with one of the test commands listed above. A cheatsheet for some of the most important features can be found here.

Troubleshooting

If you run into problems building the App or working with the source code, create an issue please.

Licence

Apache License 2.0

We are not affiliated, associated, authorized, endorsed by or in any way officially connected to Trello®, Inc. (www.trello.com).

More Examples

I would be very happy if you tell me more about your project and if your TrelloMultiBoard is public I can list it here if you want.

Maintainers


Stefan Natter