Skip to content

Latest commit

 

History

History
78 lines (55 loc) · 2.59 KB

File metadata and controls

78 lines (55 loc) · 2.59 KB

DevKit Setup for Box Tracker

The Box Tracker repository includes a development setup script called devkit.sh which creates a convenient tmux development environment.

Prerequisites

  • tmux (terminal multiplexer)
  • Yarn package manager

What is DevKit?

DevKit is a specialized tmux session configuration that automatically sets up a multi-pane development environment for the Box Tracker application. It divides your terminal into multiple panes, each running a specific part of the development environment.

Session Layout

The DevKit creates a tmux session with the following panes:

+---------------------+---------------------+
|                     |                     |
|      Backend        |      Frontend       |
|                     |                     |
+---------------------+---------------------+
|                     |                     |
|      Watchers       |      Storybook      |
|                     |                     |
+---------------------+---------------------+
|                                           |
|                 Shell                     |
|                                           |
+-------------------------------------------+

Pane Functions

  1. Backend (Top Left): Runs the NestJS backend server using yarn backend command
  2. Frontend (Top Right): Runs the Next.js frontend server using yarn frontend command
  3. Watchers (Middle Left): Runs file watchers for automatic generation using yarn watch command
  4. Storybook (Middle Right): Runs the Storybook development server using yarn storybook command
  5. Shell (Bottom): A standard shell for running additional commands as needed

Using DevKit

To start the DevKit development environment:

./devkit.sh

or

yarn devkit

Navigating the Session

The DevKit uses standard tmux commands for navigation, assuming you have not changed the default key bindings:

  • Navigate between panes: Ctrl+b followed by arrow keys
  • Scroll within a pane: Ctrl+b then [ (use arrow keys to navigate, q to exit scroll mode)
  • Detach from session: Ctrl+b then d
  • Reattach to session: tmux attach -t devkit
  • Kill session: tmux kill-session -t devkit

I would strongly recommend enabling mouse mode in tmux for a more natural experience:

tmux set -g mouse on

This will enable mouse mode in tmux, allowing you to navigate panes and scroll with your mouse.

You can also add this to your tmux configuration file (e.g. ~/.tmux.conf):

tmux set -g mouse on