TailStack uses a monorepo structure with separate package.json files for the root, template packages, and application packages. This reference documents all package configurations.
Root Package
The root package.json manages monorepo-level dependencies and scripts.
{
"name": "tailstack",
"version": "1.0.0",
"packageManager": "[email protected]",
"scripts": {
"gitleaks-verbose": "gitleaks detect --source . --verbose",
"husky": "pnpm exec husky init"
},
"lint-staged": {
"*": [
"gitleaks protect --staged --redact"
]
},
"devDependencies": {
"@commitlint/cli": "^20.3.1",
"@commitlint/config-conventional": "^20.3.1",
"concurrently": "^9.2.1",
"gitleaks": "^1.0.0",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"nodemon": "^3.1.11"
}
}
Root Scripts
Runs gitleaks to detect secrets in the codebase with verbose output
Initializes Husky git hooks for the repository
Root Dependencies
CLI for commitlint - enforces conventional commit messages
Run multiple commands concurrently (used for dev server orchestration)
Secret detection tool to prevent committing sensitive data
Git hooks manager for running pre-commit and pre-push checks
Run linters against staged git files only
Template Packages
TailStack includes two template packages: @tailstack/core and @tailstack/node.
Core Template Package
The Core template package root configuration:
{
"name": "your-project-name",
"version": "1.0.0",
"packageManager": "[email protected]",
"scripts": {
"dev": "concurrently \"pnpm --filter ./source/frontend dev\" \"pnpm --filter ./source/Server dev\"",
"husky": "pnpm exec husky init"
},
"lint-staged": {
"*": [
"gitleaks protect --staged --redact"
]
},
"devDependencies": {
"@commitlint/cli": "^20.3.1",
"@commitlint/config-conventional": "^20.3.1",
"concurrently": "^9.2.1",
"gitleaks": "^1.0.0",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"nodemon": "^3.1.11"
}
}
Runs both frontend and backend in development mode concurrently using pnpm workspace filters
Server Package
The backend server package configuration (identical in both Core and Node templates):
{
"name": "Server",
"version": "1.0.0",
"packageManager": "[email protected]",
"scripts": {
"dev": "tsx watch src/server.ts",
"build": "tsc",
"start": "node dist/server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"axios": "^1.7.9",
"cookie-parser": "^1.4.7",
"cors": "^2.8.6",
"dotenv": "^17.2.3",
"express": "^5.2.1"
},
"devDependencies": {
"@types/cookie-parser": "^1.4.10",
"@types/dotenv": "^8.2.3",
"@types/express": "^5.0.6",
"@types/node": "^25.0.10",
"nodemon": "^3.1.11",
"ts-node": "^10.9.2",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
}
}
Server Scripts
Starts the server in watch mode using tsx for fast TypeScript execution
Compiles TypeScript to JavaScript in the dist/ directory
Runs the compiled server from dist/server.js (production mode)
Server Dependencies
Promise-based HTTP client for making API requests
Parse Cookie header and populate req.cookies
Enable CORS with various options for cross-origin requests
Load environment variables from .env file
Fast, unopinionated, minimalist web framework for Node.js (v5.2+)
TypeScript execute - fast TS/ESM execution with watch mode
Frontend Package
The React frontend package configuration:
{
"name": "frontend",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@tailwindcss/vite": "^4.1.18",
"axios": "^1.7.9",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.562.0",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"react-router-dom": "^7.12.0",
"sonner": "^2.0.7",
"tailwind-merge": "^3.4.0",
"tailwindcss": "^4.1.18"
},
"devDependencies": {
"@eslint/js": "^9.39.1",
"@types/node": "^24.10.1",
"@types/react": "^19.2.5",
"@types/react-dom": "^19.2.3",
"@vitejs/plugin-react": "^5.1.1",
"eslint": "^9.39.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.24",
"globals": "^16.5.0",
"tw-animate-css": "^1.4.0",
"typescript": "~5.9.3",
"typescript-eslint": "^8.46.4",
"vite": "^7.2.4"
}
}
Frontend Scripts
Start Vite development server with hot module replacement
Type-check with TypeScript and build production bundle with Vite
Run ESLint on the entire project
Preview the production build locally
Frontend Dependencies
Official Tailwind CSS v4 Vite plugin
CVA - utility for creating variant-based component APIs
Utility for constructing className strings conditionally
Beautiful & consistent icon library based on Lucide
React library v19 - UI component framework
Declarative routing for React applications (v7+)
Opinionated toast component for React
Merge Tailwind CSS classes without style conflicts
Official Vite plugin for React with Fast Refresh
Tailwind CSS animation utilities
Package Manager
All TailStack packages use pnpm 10.12.1 as specified in the packageManager field. This ensures consistent dependency resolution and enables workspace features.
# Install dependencies
pnpm install
# Run scripts in specific workspace
pnpm --filter ./source/frontend dev
pnpm --filter ./source/Server build
# Run scripts from root
pnpm dev
Workspace Structure
TailStack’s monorepo structure:
tailstack/
├── package.json (root)
└── packages/
├── core/
│ ├── package.json (template root)
│ └── source/
│ ├── frontend/
│ │ └── package.json
│ └── Server/
│ └── package.json
├── node/
│ ├── package.json (template root)
│ └── ... (similar structure)
└── react/
└── package.json