# The User Story Map If you don't know the method of User Story Mapping yet, I recommend that you read [Jeff Pattons publications](https://www.jpattonassociates.com/user-story-mapping/) before continuing. To get started with _usm.io_ you only need to now the following: User Story Maps consist of _Acitivties_ (the green cards in the example) that are broken down into _Steps_ (blue). Each Step consists of _User Stories_ (yellow) that are grouped into _Releases_ (separated by horizontal lines). Think of the cards as sticky notes on steroids. They can do a lot, but you decide how much info you want to put on them. Each card can just have a title, but you can also create a full package that renders out as a little website. This brings us to the two main features of _usm.io_: 1. it can render the User Story Map into a webpage (as shown in the image above) 2. it can render Cards into websites, which will automatically be linked from within the map ## Structuring the map The json file that represents the User Story Map (we refer to it as `usm.json` in the documentation), has to be structured as follows: ```js { "releases": [ { "key": "mvp", "title": "MVP" }, <...> ], "activities": [ { "title": "Getting inspiration", "description": "Getting inspiration", "steps": [ { "title": "Getting the idea", "description": "Getting the idea to watch a movie", "stories": [ { "title": "Receive message from FilmFinder", "description": "Receive a message from FilmFinder about a movie on my watch list available to see", "inRelease": "mvp" }, <...> ] }, <...> ] }, <...> ] } ``` First you define the releases. Their order in the list defines their order in the map. Below that you define Activities, Steps and Stories. Each with an title and/or description, which will be rendered as the card. Activities and Steps also have a list of their siblings, while Stories can be assigned to a specific release. Cards without a defined release will be put into the yet-to-be-defined future which is the bottom of the map. ### Writing cards Simple cards can be described in `usm.json`. For more elaborate cards you can put them into a package that is linked in `usm.json`. #### Simple Card Descriptions A card can described directly in `usm.json`. This is the quickest way to begin with a map. ```js { "title": "foo", "description": "bar", "stories": [ { "title": "My first Story", "description": "This is my first Story. \o/ <( Yay! )" }, <...> ] } ``` If you do it this way, a Card can only have meta information like _title_ and _desciption_ but no further content. #### Card Packages If you want to create elaborate cards that are backed by some content, you can create card packages. Those are located in `input-dir/cards`. For each card you need to create a sub-folder that holds at least the following two files: - `card.json` - `index.[md|html]` This card can be linked from `usm.json` via the `package` field. ```js { "title": "foo", "description": "bar", "stories": [ { "package": "my-first-story" }, <...> ] } ``` The Card description now has to be done in `card.json` in the respective package. This is how `card.json` in the package `my-first-story` will look like: ```js { "title": "My first Story", "description": "This is my first Story. \o/ <( Yay! )" } ``` The advantage of this approach: You can now place content in this package that will be rendered into a small website that is linked from within the card. This helps you with keeping notes or add conceptual work to the card. The entrypoint for this webiste is the `index` file which, depending on the markup language you are going to use, needs to have the appropriate file name extension. #### Acceptance Criteria Cards can have Acceptance Criteria (AC). AC are given as a list in the field _acceptanceCriteria_ and will be rendered as an unordered list below the description. ```javascript { "title": "Bake apple pie for Jenny's party", "description": "AS Jenny who has invited you to her party I WANT you TO bring your famous apple pie SO THAT my guests can enjoy dessert", "acceptanceCriteria": [ "Pie serves at least 4 people", "Pie does not contain raisins", "Pie is served on a platter", "Pie comes with a knife to cut it" ] } ``` #### Tagging Cards can be tagged. Tags are given as a list in the field _tags_ and will be rendered as classes into the card's container. ```javascript { "title": "Another Story", "description": "Just another Story", "tags": ["needs-refinement", "stakeholder-x"] } ``` This will render the card container as: ```html