Home

Awesome

Station Desktop Application

Table of Contents

Installation

Requirements

$ git clone https://github.com/getstation/desktop-app.git
$ cd desktop-app
$ yarn

MacOS

No additional requirements.

Windows

Install node-gyp dependencies

$ npm --add-python-to-path install --global --production windows-build-tools

Ubuntu

$ sudo apt install graphicsmagick icnsutils libxtst-dev libx11-dev libxrender-dev libxkbfile-dev libgconf-2-4

CentOS or Amazon Linux 2

CentOS 9 is required.

$ sudo yum install clang dbus-devel gtk3-devel libnotify-devel xorg-x11-server-utils libcap-devel \
                   cups-devel libXtst-devel alsa-lib-devel libXrandr-devel nss-devel

See dotenv for further configuration.

Run

yarn run dev

Natives modules errors

If for any reason you have some error with binding module you could run npm run rebuild-all-native to check if you still have the problem

DevTools

Toggle Chrome DevTools

See electron-debug for more information.

Library DevTools

Redux Devtools

In order to see redux transactions and state, install Redux DevTools (or the browser extension) and click on Open Remote DevTools. Make sure Use (custom) local server on localhost:8000 is activated in the settings.

Main proces debugging

To inspect the main process, connect Chrome by visiting chrome://inspect and selecting to inspect the launched Electron app.

Useful env variables for dev

Migrations

Databases migrations are using umzug and umzug-cli.

To test migrations manually:

// Apply migrations
$ yarn run database migrations up
// Revert last applied migration
$ yarn run database migrations down

Inspect DB

Install TablePlus and create a new SQLite connection with the database file located at ~/Library/Application\ Support/Station\ Dev/db/station.db

Manual Packaging

To package apps for the local platform:

$ yarn run build

Code signing

The application will be automatically signed by the CI on the release branch

Development tools

Here is a list of tools used during the development process. Consider adding the corresponding plugins to your IDE.

WebStorm and VSCode should be correctly configured by default.

Workspace management (TODO)

This repository should be used as a proper monorepo. Packages that should be impacted:

Releases

  1. Draft a new release tagged with the desired version
  2. Apply your changes on release branch
  3. On release branch, bump the version with yarn version to the corresponding version number
  4. Let the CI build artifacts for each platform
  5. Publish the draft

Note: you can remove artifacts and push changes over the same draft

Documentations