Mattermost Logo
Edit on GitHub

Web App Workflow

If you haven’t set up your developer environment, please do so before continuing with this section.

Workflow 

Here’s a general workflow a Mattermost developer working on the mattermost-webapp repository:

  1. Review the repository structure to familiarize yourself with the project
    • ./components/ holds all the React UI components and views
    • ./actions/ holds all Flux actions where the majority of the logic of the webapp takes place
    • ./stores/ holds the stores responsible for storing and providing the views with data
    • ./i18n/ holds the localization files for the client
    • ./utils/ holds all widely-used utilities
    • ./tests/ holds all the client unit tests
  2. On your fork, create a branch MM-#### where #### is the ticket number if it is a Jira ticket, or GH-#### if it is a GitHub Issue without a Jira ticket.
  3. Make the code changes required to complete your ticket, making sure to write or modify unit tests where appropriate. Use make test to run the unit tests.
  4. To test your changes, run make run from the root directory of the server respository. This will start up the server and a watcher process that will build any changes to the client as you make them. To get changes to the server it must be restarted with make restart-server. Your server will be running at http://localhost:8065.
  5. Once everything works to meet the ticket requirements, stop Mattermost by running make stop in the server repository, then run make check-style to check your syntax and make test to run the tests.
  6. Commit your changes, push your branch and create a pull request.
  7. Respond to feedback on your pull request and make changes as necessary by commiting to your branch and pushing it. You might need to rebase your changes if another pull request creates conflicts.
  8. That’s it! Rejoice that you’ve helped make Mattermost better.

Useful mattermost commands 

During development you may want to reset the database and generate random data for testing your changes. For this purpose, Mattermost has the following commands in the mattermost CLI:

Install the server with go install ./cmd/mattermost in the server repository.

You can reset your database to the initial state using:

mattermost reset

After that, you can generate random data to populate the Mattermost database using:

mattermost sampledata