# For Devs

# Requirements

The TS3 Manager is written in NodeJS (opens new window). The latest LTS version of NodeJS including NPM needs to be installed.

# Project Structure

The project is split into two directories. The frontend is handling everything what the user sees. Even the routing is handled by the frontend. The backend communicates with the TeamSpeak ServerQuery and sends the responses back to the frontend. Frontend and backend are talking to each other over websockets.

# Dataflow

Communication Diagram

# Frontend

The frontend is written in Vue.js with the Vue CLI.

# Project setup

cd /to/project/folder/frontend/
npm install

# Compiles and hot-reloads for development

npm run serve

# Compiles and minifies for production

npm run build

# Lints and fixes files

npm run lint

# Get started

# Websocket connection

At first the backend needs to be started. The URL to the backend can be modified in the env.development file, e.g. if your are using a different port.

# UI Framework

Vuetify is used as material design UI library. Right now the version 2.3.10 is used. For more informations go to https://vuetifyjs.com/en/ (opens new window).

# Adding a new page

If you want to add a new page, you have to create a new Vue file inside the /src/components/ directory and add the route inside /src/router/routes.js.

# Send data to the ServerQuery

In every component you have access to the $TeamSpeak object by using this.$TeamSpeak. The object is using the same syntax like the TS3-NodeJS-Library (opens new window) for ease of use.

this.$TeamSpeak.execute(command = String, parameters = Object, options = Array)

You have to use Async/Await or Promises to get the data.

# Examples
// get serverlist
async getServers() {
  try {
    let servers = await this.$TeamSpeak.execute('serverlist')
  } catch(err) {
// get clientlist
async getClients() {
  try {
    let clients = await this.$TeamSpeak.execute('clientlist', {}, ['-uid', '-away'])
  } catch(err) {
// find client
async findClient() {
  try {
    let client = await this.$TeamSpeak.execute('clientdbfind', {
      pattern: 'FPMPSC6MXqXq751dX7BKV0JniSo='
    }, ['-uid'])
  } catch(err) {
// send text message
async sendMessage() {
  try {
    await this.$TeamSpeak.execute('sendtextmessage', {
      targetmode: 2,
      target: 2,
      msg: 'Hello buddy'
  } catch(err) {

# Backend

The backend uses the express framework for the webserver. Every HTTP-Request is send directly to the frontend. There is no routing in the backend. For the websocket connection socket.io is used. The communtication to the ServerQuery is handled by the TS3-NodeJS-Library (opens new window). The logs are created by winston.

# Project setup

cd /to/project/folder/backend/
npm install

# Hot-reload for development

npm install nodemon -g

# Start server

npm run dev

# Generate executables

The package pkg from vercel is used for creating 3 executables (Mac, Windows and Linux). In the package.json file are the npm build scripts for that.

It uses the bin and pkg properties inside the package.json to create the executables. When you are creating the packages on a windows system, the generated executables for mac and linux are not working. The executables for linux and mac need to be created on a mac or linux machine.