DTP Base provides a scalable and secure Node.js application development harness ready for production service.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Rob Colbert d8035352f2 major refactor of populators 12 months ago
app major refactor of populators 12 months ago
client converted to the new dtp-base 12 months ago
config converted to the new dtp-base 12 months ago
lib major refactor of populators 12 months ago
.gitignore forked to dtp-time-tracker 12 months ago
.jshintrc another large integration of [everything] from prior DTP/Base/StreamRay 1 year ago
LICENSE converted to the new dtp-base 12 months ago
README.md converted to the new dtp-base 12 months ago
deploy deployment script updates 12 months ago
dtp-base-cli.js converted to the new dtp-base 12 months ago
dtp-base.js converted to the new dtp-base 12 months ago
nodemon.json converted to the new dtp-base 12 months ago
package.json 0.1.1 12 months ago
pnpm-lock.yaml converted to the new dtp-base 12 months ago
release converted to the new dtp-base 12 months ago
restart converted to the new dtp-base 12 months ago
start-local converted to the new dtp-base 12 months ago
webpack.config.js converted to the new dtp-base 12 months ago

README.md

DTP Base

A production-ready Node.js application development framework for use in-house at DTP Technologies, LLC.

System Requirements

Make sure you've got the latest/greatest for your Ubuntu.

apt -y update && apt -y upgrade
apt -y install python3-pip build-essential ffmpeg supervisor

The Linux headers and image installs are optional. If you not using a GPU for video encoding, you won't need kernel sources to build your GPU's driver.

apt -y install linux-headers-generic linux-headers-virtual linux-image-virtual linux-virtual

The latest pnpm instructions can always be found here: pnpm installation

These are just convenience copies from that page.

corepack enable pnpm
corepack use pnpm@latest
pnpm install

Development Host Management

For convenience, it's possible to open multiple terminals in VS Code using Ctrl + Shift + ~

In one terminal, start the workers and MinIO.

./start-local

In a separate terminal, starts the dev application environment.

pnpm dev

Production Host Configuration

Configure the firewall:

ufw allow ssh
ufw allow http
ufw allow https
ufw allow from [console_ip] proto tcp to [host_ip] port 8190
ufw enable

Create the DTP admin user on the host. All production hosts require this user. Do not set a login password for this user. We will be creating SSH keys for the user to access your git repo as a deployer, but you will never log into the host using the DTP user account.

Instead, we always log in as root, and use su - dtp to become the DTP user.

adduser dtp   # just accept the defaults or enter whatever you want
su - dtp      # this will put you in the DTP home directory as the DTP user
ssh-keygen    # generate the user's SSH key to use for git deployments

# print the DTP user's SSH public key to provide to git repo as deploy key
cat ~/.ssh/id_rsa.pub

Add that SSH key to your git repo as a deploy key.

In the DTP user's home directory:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

npm install --lts

Edit .bashrc and set NODE_ENV=production

Emoji Picker

Base currently uses emoji-picker-element as the renderer of an emoji picker, and then it manages the presentation of the picker itself.