diff --git a/.github/workflows/dev-release.yml b/.github/workflows/dev-release.yml deleted file mode 100644 index e6fff56b8..000000000 --- a/.github/workflows/dev-release.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Dev-Release - -on: - push: - branches: [ main, release-** ] - pull_request: - branches: [ main, release-** ] - workflow_dispatch: - -env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - EXCLUDE_ENTERPRISE: true - -jobs: - - plugin: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v3 - with: - path: "focalboard" - - - name: Replace token 1 server - run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go - - - name: Replace token 1 webapp - run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/webapp/src/index.tsx - - - name: Replace token 2 server - run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go - - - name: Replace token 2 webapp - run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_DEV_KEY }},g" ${{ github.workspace }}/focalboard/webapp/src/index.tsx - - - name: npm ci - run: cd focalboard/webapp; npm ci --no-optional - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.21 - - - name: Set up Node - uses: actions/setup-node@v3 - with: - node-version: 20.11.0 - - - name: Build webapp - run: cd focalboard; make webapp - - - name: npm ci plugin dependencies - run: cd focalboard/webapp; npm ci --no-optional - - - name: Build plugin - run: cd focalboard; make dist - env: - BUILD_NUMBER: ${{ github.run_id }} - - - name: Rename plugin file - run: cd focalboard/dist; mv focalboard-*.tar.gz mattermost-plugin-focalboard.tar.gz - - - name: Upload plugin artifact - uses: actions/upload-artifact@v3 - with: - name: mattermost-plugin-focalboard.tar.gz - path: ${{ github.workspace }}/focalboard/dist/mattermost-plugin-focalboard.tar.gz diff --git a/.github/workflows/prod-release.yml b/.github/workflows/prod-release.yml deleted file mode 100644 index b46b4b6b0..000000000 --- a/.github/workflows/prod-release.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Production-Release - -on: workflow_dispatch - -env: - EXCLUDE_ENTERPRISE: true - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - -jobs: - - plugin-release: - runs-on: ubuntu-20.04 - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: "focalboard" - - - name: Replace token 1 server - run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go - - - name: Replace token 1 webapp - run: sed -i -e "s,placeholder_rudder_dataplane_url,${{ secrets.RUDDER_DATAPLANE_URL }},g" ${{ github.workspace }}/focalboard/webapp/src/index.tsx - - - name: Replace token 2 server - run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/server/services/telemetry/telemetry.go - - - name: Replace token 2 webapp - run: sed -i -e "s,placeholder_rudder_key,${{ secrets.RUDDER_PROD_KEY }},g" ${{ github.workspace }}/focalboard/webapp/src/index.tsx - - - name: npm ci - run: cd focalboard/webapp; npm ci --no-optional - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: 1.21 - - - name: Set up Node - uses: actions/setup-node@v3 - with: - node-version: 20.11.0 - - - name: Build webapp - run: cd focalboard; make webapp - - - name: npm ci plugin dependencies - run: cd focalboard/webapp && npm ci - - - name: Build plugin - run: cd focalboard; make dist - env: - BUILD_NUMBER: ${{ github.run_id }} - - - name: Rename plugin file - run: cd focalboard/dist; mv focalboard-*.tar.gz mattermost-plugin-focalboard.tar.gz - - - name: Upload plugin artifact - uses: actions/upload-artifact@v3 - with: - name: mattermost-plugin-focalboard.tar.gz - path: ${{ github.workspace }}/focalboard/dist/mattermost-plugin-focalboard.tar.gz diff --git a/.gitignore b/.gitignore index 035213fbe..d2b68ea6e 100644 --- a/.gitignore +++ b/.gitignore @@ -22,18 +22,10 @@ pids go.work go.work.sum -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - # Coverage directory used by tools like istanbul coverage .nyc_output -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release @@ -43,36 +35,21 @@ build/Release # Dependency directory # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git -node_modules +webapp/node_modules +webapp/dist +webapp/pack dist -pack package bin debug __debug_bin files -octo*.db -focalboard*.db *.boardarchive .eslintcache .vscode/settings.json # config.json is copied from app-config.json in the Makefile -mac/resources/config.json -mac/temp -mac/dist -mac/*.xcodeproj/**/xcuserdata -linux/bin -linux/dist -linux/temp -win/temp -win/dist -webapp/cypress/screenshots -webapp/cypress/videos server/swagger/clients server/vendor .idea -docker/certs -docker/data server/**/*.coverage ./dist -./vendor diff --git a/webapp/.npmrc b/.npmrc similarity index 100% rename from webapp/.npmrc rename to .npmrc diff --git a/webapp/.nvmrc b/.nvmrc similarity index 100% rename from webapp/.nvmrc rename to .nvmrc diff --git a/README.md b/README.md index 7e38a433a..fb3aefa20 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,110 @@ -# Mattermost Boards (Focalboard Plugin) +> [!WARNING] +> **Effective September 15th, 2023, Mattermost, Inc. staff are no longer reviewing or merging pull requests for either Focalboard or the Mattermost Boards plugin in this repository (`mattermost/focalboard`). We encourage the community to fork this repository for continued development and contributions.** +> +> The reason behind these changes is to focus Mattermost developer resources on improving the platform’s performance and core features to ensure Mattermost continues being resilient, stable, and best-in-breed for critical operations. +> +> ️💡 [Learn more](https://forum.mattermost.com/t/upcoming-product-changes-to-boards-and-various-plugins/16669) + +# Mattermost boards plugin + +### A self-hosted plugin for managing boards withing a Mattermost installation + +Focalboard is an open source, multilingual, self-hosted project management tool that's an alternative to Trello, Notion, and Asana. **[Mattermost Boards](https://mattermost.com/boards/)** is the Mattermost plugin version of Focalboard that combines project management tools with messaging and collaboration for teams of all sizes. To access and use **Mattermost Boards**, install or upgrade to Mattermost v6.0 or later as a [self-hosted server](https://docs.mattermost.com/guides/deployment.html?utm_source=focalboard&utm_campaign=focalboard) or [Cloud server](https://mattermost.com/get-started/?utm_source=focalboard&utm_campaign=focalboard). After logging into Mattermost, select the menu in the top left corner of Mattermost and select **Boards**. -***Mattermost Boards** is installed and enabled by default in Mattermost v6.0 and later.* +![Focalboard](website/site/static/img/hero.jpg) + +It helps define, organize, track and manage work across individuals and teams. Focalboard comes in three editions: + +* **[Focalboard plugin](https://github.com/mattermost/focalboard/releases)**: The Focalboard plugin integrates into an exsting Mattermost instance to combine project management tools with messaging and collaboration for teams of all sizes. + +* **[Personal Desktop](https://www.focalboard.com/docs/personal-edition/desktop/)**: A standalone, single-user [macOS](https://apps.apple.com/app/apple-store/id1556908618?pt=2114704&ct=website&mt=8), [Windows](https://www.microsoft.com/store/apps/9NLN2T0SX9VF?cid=website), or [Linux](https://www.focalboard.com/download/personal-edition/desktop/#linux-desktop) desktop app for your own todos and personal projects. + +* **[Personal Server](https://www.focalboard.com/download/personal-edition/ubuntu/)**: A standalone, multi-user server for development and personal use. + +## Try Focalboard + +### Mattermost Plugin + +After downloading and installing the plugin in the System Console, select the menu in the top left corner and select **Boards**. Access the latest releases of the focalboard plugin by downloading the `mattermost-plugin-focalboard.tar.gz` file from the releases in this repository: + + +### API Docs + +Boards API docs can be found over at + +### Getting started + +Our [developer guide](https://developers.mattermost.com/contribute/more-info/focalboard/mattermost-boards-setup-guide/) has detailed instructions on how to set up your development environment for the **Mattermost boards plugin**. You can also join the [~Focalboard community channel](https://community.mattermost.com/core/channels/focalboard) to connect with other developers. + +Clone [mattermost-server](https://github.com/mattermost/mattermost-server) into sibling directory. + +You also want to have the environment variable `MM_DEBUG"true"` set, otherwise the plugin +will be compiled for Linux, Windows, and Darwin ARM64 and x64 architecture every single time. Setting +the `MM_DEBUG` to `true` makes the plugin compile and build only for the OS and architecture +you are building on. + +In your Mattermost configuration file, ensure that `PluginSettings.EnableUploads` is set to `true`, and `FileSettings.MaxFileSize` is +set to a large enough value to accept the plugin bundle (eg `256000000`). + +### Building the plugin + +Run the following command in the plugin repository to prepare a compiled, distributable plugin ZIP file: + +```bash +make dist +``` + +After a successful build, a `.tar.gz` file in the `/dist` folder will be created which can be uploaded to Mattermost. To avoid having to manually install your plugin, deploy your plugin using one of the following options. + +##### Building in Dev Mode + +Set the following environment variables to true before running `make dist`- + +1. MM_DEBUG + +### Deploying with Local Mode + +If your Mattermost server is running locally, you can +enable [local mode](https://docs.mattermost.com/administration/mmctl-cli-tool.html#local-mode) to streamline deploying +your plugin. Edit your server configuration as follows: + +``` +{ + "ServiceSettings": { + ... + "EnableLocalMode": true, + "LocalModeSocketLocation": "/var/tmp/mattermost_local.socket" + } +} +``` + +and then deploy your plugin: + +```bash +make deploy +``` + +If developing a plugin with a web app, watch for changes and deploy those automatically: + +```bash +export MM_SERVICESETTINGS_SITEURL=http://localhost:8065 +make watch-plugin +``` + + + +### Unit testing + +Before checking in commits, run `make ci`, which is similar to the `.gitlab-ci.yml` workflow and includes: + +* **Server unit tests**: `make server-test` +* **Web app ESLint**: `cd webapp; npm run check` +* **Web app unit tests**: `cd webapp; npm run test` + +### Staying informed -To build your own version of Matterboard Boards and upload it to your own Mattermost server, follow the instructions [here](https://developers.mattermost.com/contribute/focalboard/mattermost-boards-setup-guide/). +* **Changes**: See the [CHANGELOG](CHANGELOG.md) for the latest updates +* **Bug Reports**: [File a bug report](https://github.com/mattermost/focalboard/issues/new?assignees=&labels=bug&template=bug_report.md&title=) +* **Chat**: Join the [~Focalboard community channel](https://community.mattermost.com/core/channels/focalboard) diff --git a/imp-files/README.md b/imp-files/README.md deleted file mode 100644 index c1bf4aa98..000000000 --- a/imp-files/README.md +++ /dev/null @@ -1,129 +0,0 @@ -> [!WARNING] -> **Effective September 15th, 2023, Mattermost, Inc. staff are no longer reviewing or merging pull requests for either Focalboard or the Mattermost Boards plugin in this repository (`mattermost/focalboard`). We encourage the community to fork this repository for continued development and contributions.** -> -> The reason behind these changes is to focus Mattermost developer resources on improving the platform’s performance and core features to ensure Mattermost continues being resilient, stable, and best-in-breed for critical operations. -> -> ️💡 [Learn more](https://forum.mattermost.com/t/upcoming-product-changes-to-boards-and-various-plugins/16669) - -# Focalboard - -![CI Status](https://github.com/mattermost/focalboard/actions/workflows/ci.yml/badge.svg) -![CodeQL](https://github.com/mattermost/focalboard/actions/workflows/codeql-analysis.yml/badge.svg) -![Dev Release](https://github.com/mattermost/focalboard/actions/workflows/dev-release.yml/badge.svg) -![Prod Release](https://github.com/mattermost/focalboard/actions/workflows/prod-release.yml/badge.svg) - -![Focalboard](website/site/static/img/hero.jpg) - -Focalboard is an open source, multilingual, self-hosted project management tool that's an alternative to Trello, Notion, and Asana. - -It helps define, organize, track and manage work across individuals and teams. Focalboard comes in three editions: - -* **[Focalboard plugin](https://github.com/mattermost/focalboard/releases)**: The Focalboard plugin integrates into an exsting Mattermost instance to combine project management tools with messaging and collaboration for teams of all sizes. - -* **[Personal Desktop](https://www.focalboard.com/docs/personal-edition/desktop/)**: A standalone, single-user [macOS](https://apps.apple.com/app/apple-store/id1556908618?pt=2114704&ct=website&mt=8), [Windows](https://www.microsoft.com/store/apps/9NLN2T0SX9VF?cid=website), or [Linux](https://www.focalboard.com/download/personal-edition/desktop/#linux-desktop) desktop app for your own todos and personal projects. - -* **[Personal Server](https://www.focalboard.com/download/personal-edition/ubuntu/)**: A standalone, multi-user server for development and personal use. - -## Try Focalboard - -### Mattermost Plugin - -After downloading and installing the plugin in the System Console, select the menu in the top left corner and select **Boards**. Access the latest releases of the focalboard plugin by downloading the `mattermost-plugin-focalboard.tar.gz` file from the releases in this repository: - -### Personal Desktop (Windows, Mac or Linux Desktop) - -* **Windows**: Download from the [Windows App Store](https://www.microsoft.com/store/productId/9NLN2T0SX9VF) or download `focalboard-win.zip` from the [latest release](https://github.com/mattermost/focalboard/releases), unpack, and run `Focalboard.exe`. -* **Mac**: Download from the [Mac App Store](https://apps.apple.com/us/app/focalboard-insiders/id1556908618?mt=12). -* **Linux Desktop**: Download `focalboard-linux.tar.gz` from the [latest release](https://github.com/mattermost/focalboard/releases), unpack, and open `focalboard-app`. - -### Personal Server - -**Ubuntu**: You can download and run the compiled Focalboard **Personal Server** on Ubuntu by following [our latest install guide](https://www.focalboard.com/download/personal-edition/ubuntu/). - -### API Docs - -Boards API docs can be found over at - -### Getting started - -Our [developer guide](https://developers.mattermost.com/contribute/focalboard/personal-server-setup-guide) has detailed instructions on how to set up your development environment for the **Personal Server**. You can also join the [~Focalboard community channel](https://community.mattermost.com/core/channels/focalboard) to connect with other developers. - -Clone [mattermost-server](https://github.com/mattermost/mattermost-server) into sibling directory. - -Create an `.env` file in the focalboard directory that contains: - -``` -EXCLUDE_ENTERPRISE="1" -``` - -To build the server: - -``` -make prebuild -make -``` - -To run the server: - -``` - ./bin/focalboard-server -``` - -Then navigate your browser to [`http://localhost:8000`](http://localhost:8000) to access your Focalboard server. The port is configured in `config.json`. - -Once the server is running, you can rebuild just the web app via `make webapp` in a separate terminal window. Reload your browser to see the changes. - -### Building and running standalone desktop apps - -You can build standalone apps that package the server to run locally against SQLite: - -* **Windows**: - * *Requires Windows 10, [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/) 10.0.19041.0, and .NET 4.8 developer pack* - * Open a `git-bash` prompt. - * Run `make prebuild` - * The above prebuild step needs to be run only when you make changes to or want to install your npm dependencies, etc. - * Once the prebuild is completed, you can keep repeating the below steps to build the app & see the changes. - * Run `make win-wpf-app` - * Run `cd win-wpf/msix && focalboard.exe` -* **Mac**: - * *Requires macOS 11.3+ and Xcode 13.2.1+* - * Run `make prebuild` - * The above prebuild step needs to be run only when you make changes to or want to install your npm dependencies, etc. - * Once the prebuild is completed, you can keep repeating the below steps to build the app & see the changes. - * Run `make mac-app` - * Run `open mac/dist/Focalboard.app` -* **Linux**: - * *Tested on Ubuntu 18.04* - * Install `webgtk` dependencies - * Run `sudo apt-get install libgtk-3-dev` - * Run `sudo apt-get install libwebkit2gtk-4.0-dev` - * Run `make prebuild` - * The above prebuild step needs to be run only when you make changes to or want to install your npm dependencies, etc. - * Once the prebuild is completed, you can keep repeating the below steps to build the app & see the changes. - * Run `make linux-app` - * Uncompress `linux/dist/focalboard-linux.tar.gz` to a directory of your choice - * Run `focalboard-app` from the directory you have chosen -* **Docker**: - * To run it locally from offical image: - * `docker run -it -p 80:8000 mattermost/focalboard` - * To build it for your current architecture: - * `docker build -f docker/Dockerfile .` - * To build it for a custom architecture (experimental): - * `docker build -f docker/Dockerfile --platform linux/arm64 .` - -Cross-compilation currently isn't fully supported, so please build on the appropriate platform. Refer to the GitHub Actions workflows (`build-mac.yml`, `build-win.yml`, `build-ubuntu.yml`) for the detailed list of steps on each platform. - -### Unit testing - -Before checking in commits, run `make ci`, which is similar to the `.gitlab-ci.yml` workflow and includes: - -* **Server unit tests**: `make server-test` -* **Web app ESLint**: `cd webapp; npm run check` -* **Web app unit tests**: `cd webapp; npm run test` -* **Web app UI tests**: `cd webapp; npm run cypress:ci` - -### Staying informed - -* **Changes**: See the [CHANGELOG](CHANGELOG.md) for the latest updates -* **Bug Reports**: [File a bug report](https://github.com/mattermost/focalboard/issues/new?assignees=&labels=bug&template=bug_report.md&title=) -* **Chat**: Join the [~Focalboard community channel](https://community.mattermost.com/core/channels/focalboard)