Skip to main content

Installation

TailStack is distributed as a set of standalone templates. You can scaffold a new project directly from GitHub using degit or curl, giving you a clean Git history to start from.

Prerequisites

Before installing TailStack, ensure you have the following:
  • Node.js - Version 20.x or higher (specified in .nvmrc and .node-version)
  • pnpm - Version 10.12.1 or higher (TailStack’s package manager)
Using nvm? Simply run nvm use in your project directory to automatically switch to the correct Node.js version.

Installation methods

Choose your preferred installation method: degit is the recommended way to scaffold TailStack projects. It downloads the template without the entire Git history.
1

Install the template

Run the appropriate command for your chosen template:
npx degit GitCoder052023/TailStack/packages/core my-project
cd my-project
What you get:
  • Full-stack ERN architecture
  • Express backend with Node clustering
  • React frontend with Vite and Tailwind CSS 4
  • Weather app demo
  • Shared monorepo configuration
  • Automation scripts (clean, install)
You can scaffold into the current directory by using . as the project name:
npx degit GitCoder052023/TailStack/packages/core .
2

Install dependencies

Install project dependencies using pnpm:
pnpm install
For Core template only, you can use the intelligent install script:
chmod +x scripts/install.sh
./scripts/install.sh
Smart Install Features:
  • Installs all workspace packages in parallel
  • Monitors CPU and RAM usage in real-time
  • Automatically suspends processes if load exceeds 90%
  • Resumes when load drops below 75%
  • Prevents system crashes during heavy dependency resolution
3

Configure environment (Backend templates only)

For Core and Node templates, set up environment variables:
# Core template
cp source/Server/.env.example source/Server/.env

# Node template
cp .env.example .env
Edit the .env file with your configuration:
.env
PORT=5000
NODE_ENV=development
# Add your additional environment variables here
4

Start development server

Start your project:
pnpm dev

# Starts both frontend and backend concurrently:
# Frontend: http://localhost:5173
# Backend: http://localhost:5000

Method 2: Using curl

If you don’t have Node.js installed or prefer a shell-native approach, use curl to download and extract the template:
curl -L https://github.com/GitCoder052023/TailStack/archive/refs/heads/main.tar.gz | tar -xz --strip-components=2 TailStack-main/packages/core
cd core
pnpm install
The curl method requires tar to be available on your system. On Windows, use WSL or Git Bash.

Method 3: Manual clone

For contributors or those who want to explore all templates:
1

Clone the repository

git clone https://github.com/GitCoder052023/TailStack.git
cd TailStack
2

Navigate to your template

cd packages/core  # or packages/react or packages/node
3

Install and run

pnpm install
pnpm dev

Package scripts reference

Each template comes with npm scripts for common tasks:

Core template

package.json
{
  "scripts": {
    "dev": "concurrently \"pnpm --filter ./source/frontend dev\" \"pnpm --filter ./source/Server dev\"",
    "husky": "pnpm exec husky init"
  }
}
Frontend workspace:
source/frontend/package.json
{
  "scripts": {
    "dev": "vite",
    "build": "tsc -b && vite build",
    "lint": "eslint .",
    "preview": "vite preview"
  }
}
Backend workspace:
source/Server/package.json
{
  "scripts": {
    "dev": "tsx watch src/server.ts",
    "build": "tsc",
    "start": "node dist/server.js"
  }
}

React template

package.json
{
  "scripts": {
    "dev": "vite",
    "build": "tsc -b && vite build",
    "lint": "eslint .",
    "preview": "vite preview"
  }
}

Node template

package.json
{
  "scripts": {
    "dev": "tsx watch src/server.ts",
    "build": "tsc",
    "start": "node dist/server.js"
  }
}

Automation scripts (Core template)

The Core template includes powerful automation scripts in the scripts/ directory:

Smart clean

Removes all node_modules and lock files with parallel processing:
./scripts/clean.sh
Features:
  • Two-phase parallel purge
  • Kills locking processes (Node, VS Code)
  • 3-retry verification loop for stubborn files
  • Force deletion with elevated permissions if needed

Smart install

Parallel dependency installation with load monitoring:
./scripts/install.sh
Features:
  • Installs all workspace packages concurrently
  • Real-time CPU and RAM monitoring
  • Intelligent state machine for load management
  • Automatic pause/resume to prevent system hangs

Troubleshooting

Install pnpm globally:
npm install -g pnpm
Or use corepack (Node.js 16.13+):
corepack enable
corepack prepare [email protected] --activate
TailStack requires Node.js 20.x or higher. If using nvm:
nvm install 20
nvm use 20
Or in the project directory:
nvm use
If you see EADDRINUSE errors:For frontend (port 5173):
# Kill the process using the port
lsof -ti:5173 | xargs kill -9
For backend (port 5000):
lsof -ti:5000 | xargs kill -9
Or change the port in your configuration files.
Make scripts executable:
chmod +x scripts/*.sh

Next steps

Quick start

Follow the quick start guide to build your first feature

Project structure

Understand the directory organization and file structure

Configuration

Configure environment variables, linting, and Git hooks

Development

Learn about the development workflow and best practices

Build docs developers (and LLMs) love