The Box Tracker repository includes a development setup script called devkit.sh which creates a convenient tmux development environment.
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.
The DevKit creates a tmux session with the following panes:
+---------------------+---------------------+
| | |
| Backend | Frontend |
| | |
+---------------------+---------------------+
| | |
| Watchers | Storybook |
| | |
+---------------------+---------------------+
| |
| Shell |
| |
+-------------------------------------------+
- Backend (Top Left): Runs the NestJS backend server using
yarn backendcommand - Frontend (Top Right): Runs the Next.js frontend server using
yarn frontendcommand - Watchers (Middle Left): Runs file watchers for automatic generation using
yarn watchcommand - Storybook (Middle Right): Runs the Storybook development server using
yarn storybookcommand - Shell (Bottom): A standard shell for running additional commands as needed
To start the DevKit development environment:
./devkit.shor
yarn devkitThe DevKit uses standard tmux commands for navigation, assuming you have not changed the default key bindings:
- Navigate between panes:
Ctrl+bfollowed by arrow keys - Scroll within a pane:
Ctrl+bthen[(use arrow keys to navigate,qto exit scroll mode) - Detach from session:
Ctrl+bthend - 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 onThis 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