A couple of weeks ago I was asked to write an article about Slackroot, a new Slack-like web service that aims to be a fully-featured, natively hosted version of the popular and much-loved Slack client.
Today I’d like to show you how Slackroot works, how you can get started with it, and some of the important design considerations you’ll need to take into account when developing for Slack.
Let’s begin with the basics.
Slackroot uses an open source, community-maintained version of Laravel.
The team behind the project, Slackroot-developers, has released a Github repository called Slackroot 2.0 that contains a new version that has been optimized for the newer Laravel version, but you can install the older Slackroot version from GitHub too.
This means that if you’re not using Laravel 5.5.1 or later, you can still install Slackroot from the Slackroot GitHub repository.
This is a great choice for users who have installed Slackroot but are still running the older version.
The only thing that needs to be done to run Slackroot on a new installation is install the new Slackroot dependencies.
The Slackroot package manager can be used to install the Slack root package.
Open up your package manager and type in:Package Manager for Slackroot2.0.
In the package manager, right-click on the package you want to install and select New Package.
Enter the following command:The package manager will create a new directory named Slackroot in your project’s directory structure and prompt you to choose a name for it.
The package name is used to identify the package and indicates where the package can be installed.
For this example, I’m going to choose Slackroot.
The first line contains the SlackRoot package name, which is Slackroot (Laravel’s official name for Slack).
Next, enter the Slack-specific details you’d like it to include.
For our purposes, I’d add the following line to the end of the Slack configuration file, and then I’d change the value of the following variable to the name of the slack-specific package.
Slackroot will now install the package using the package managers command-line interface.
The command-Line Interface (CLI) is a popular way to install software on computers and is particularly useful for testing new software or creating applications that use a new feature.
If you’ve ever used the command-prompt command, it’s easy to see how to use it.
Open a terminal window and type:The command-Prompt window will open, and you can use it to install Slack-related packages from the command line.
To install a Slack-level package, you simply run the command Slackroot –install to list all installed packages.
Slack will list all available Slackroot packages and then you can either install or uninstall a package using one of two methods.
You can either uninstall the package by pressing Ctrl+D or you can run the Slack install command to install a new package into Slackroot’s installation directory.
The install command is usually called slack-install and it installs the Slackware-specific Slackroot dependency into Slackroots installation directory and installs the installed Slackware dependencies into the Slack directory.
The slack-config package allows you to modify Slackroot config files.
For example, you could change the Slack Root user and group configuration file to use the Slackuser or Slackgroup configuration files, and so on.
To edit the Slackconfig file, open up the Slack config file in the Slack Config editor.
To change the default Slackroot user and/or group, simply add the SlackUser or SlackGroup configuration file lines to SlackrootConfig.php.
For more information on the SlackConfig file, see Slackconfig.php .
If you want Slackroot to use a custom Slackroot installation directory, you may need to edit the config.php file as well.
For example, if you want the Slack User and Group configuration files to be used by Slackroot itself, you’ll want to modify the SlackUsers.php configuration file as follows:The configuration file for the Slack group is a bit different.
You’ll need a different Slackconfig configuration file than you would for the actual Slackroot project, but for the purposes of this article, we’ll assume you have the same Slackroot configuration file that you would in a real Slackroot application.
Open the SlackGroupConfig.json file and modify the following lines:The Slackgroup config file has a few more important settings that are typically not included in Slackconfig files.
First, the Slackgroup has a SlackrootGroupName property that is used by the Slackservice to identify a Slackgroup in your Slack-based applications.
The name of this Slackgroup is SlackRootGroupName.
This value is used in the slack service to uniquely identify the Slack service.
You should set the Slack Service group