A comprehensive TypeScript project template designed for modern development workflows with integrated Task Master AI and Augment Code support. This template provides the foundation, configurations, and guidelines needed to leverage AI-powered project management and intelligent development assistance effectively.
- π€ Task Master AI Ready - Pre-configured for Task Master AI integration with setup guides and best practices
- π§ Augment Code Optimized - Project structure and patterns designed to work effectively with AI development tools
- β‘ Streamlined Workflow - Configurations that support seamless integration between AI project management and coding assistance
- π― Quality-First Approach - Comprehensive linting, testing, and formatting with AI-friendly code patterns
- β Input Validation - Zod schemas for type-safe runtime validation with detailed error reporting
- π Professional Logging - Winston logging system with structured output and configurable levels
- βοΈ Configuration Management - Type-safe configuration loading with validation and feature flags
- π Documentation Tools - VitePress and TypeDoc setup for automated API documentation generation
- π Security Best Practices - Built-in security guidelines and dependency management workflows
- βοΈ Modern TypeScript Foundation - TypeScript 5.5+, ESLint 9, Jest, and comprehensive development tooling
# Clone the template
git clone https://github.com/almai/typescript-augment-setup.git my-project
cd my-project
# Install dependencies
npm install
# Start development
npm run dev:tsx
# Run quality checks
npm run check
# Optional: Set up Task Master AI (requires separate installation)
task-master init --name="My Project" --description="TypeScript application"
task-master models --setup
# Optional: Generate tasks from requirements
task-master parse-prd --input=docs/requirements.md --num-tasks=10npm run dev:tsx- Run TypeScript directly with tsx (fastest)npm run dev:watch- Run with auto-restart on file changesnpm run dev- Build and run (traditional approach)
npm run check- Run all quality checks (lint + format + test)npm run fix- Auto-fix linting and formatting issuesnpm run lint- Run ESLintnpm run lint:fix- Fix auto-fixable ESLint issuesnpm run format- Format code with Prettiernpm run format:check- Check if code is properly formatted
npm test- Run Jest testsnpm run test:watch- Run tests in watch modenpm run test:coverage- Run tests with coverage reportnpm run test:ci- Run tests for CI/CD
npm run build- Build for productionnpm run clean- Clean build artifactsnpm start- Run built application
npm run docs:dev- Start VitePress development server with AI-generated contentnpm run docs:build- Build documentation for production with automated API docsnpm run docs:preview- Preview built documentation locallynpm run docs:api- Generate TypeDoc API documentation with AI-enhanced descriptions
npm run deps:check- Check for dependency updatesnpm run deps:update- Update dependencies
βββ src/ # Source code
β βββ index.ts # Main entry point with validation and logging examples
β βββ validation.ts # Zod schemas and validation functions
β βββ logger.ts # Winston logging configuration and utilities
β βββ config.ts # Configuration management with validation
β βββ utils.ts # Utility functions
βββ __tests__/ # Test files
β βββ index.test.ts # Main application tests
β βββ validation.test.ts # Validation schema tests
β βββ logger.test.ts # Logging functionality tests
β βββ config.test.ts # Configuration management tests
βββ dist/ # Build output (generated)
βββ docs/ # VitePress documentation source
β βββ validation/ # Validation system documentation
β βββ logging/ # Logging system documentation
β βββ configuration/ # Configuration management docs
β βββ ... # Other documentation sections
βββ build/ # VitePress build output (generated)
βββ coverage/ # Test coverage reports (generated)
βββ tsconfig.json # TypeScript config for development
βββ tsconfig.build.json # TypeScript config for production builds
βββ eslint.config.js # ESLint configuration (flat config)
βββ jest.config.js # Jest configuration
βββ jest.setup.js # Jest setup file
βββ .prettierrc.json # Prettier configuration
βββ package.json # Project configuration
- Development:
tsconfig.jsonwithnoEmit: truefor IDE support - Production:
tsconfig.build.jsonfor actual compilation - Target: ES2022 for modern Node.js environments
- Modules: ES modules with bundler resolution
- Version: ESLint 9 with flat configuration
- TypeScript: Full TypeScript integration with type checking
- Prettier: Integrated for consistent formatting
- Jest: Special rules for test files
- Import organization: Automatic import sorting and grouping
- TypeScript: Full ES modules support with ts-jest
- Coverage: 80% threshold for all metrics
- Timeout: 30 seconds for async operations
- Mocking: Global test utilities and console mocking
- Style: Single quotes, no trailing commas, 2-space indentation
- Line width: 100 characters
- Integration: Works seamlessly with ESLint
- Project Setup: Standard TypeScript development with
npm run dev:tsx - Quality Checks:
npm run checkfor comprehensive linting, testing, and formatting - Optional AI Integration: Set up Task Master AI with
task-master initfor project management - Task Management: Use
task-master parse-prdandtask-master nextfor intelligent task breakdown - AI-Assisted Development: Leverage Augment Code for context-aware coding assistance
- Progress Tracking: Update task status with
task-master set-statusas you work - Documentation:
npm run docs:buildfor automated API documentation generation
This TypeScript template is designed to work seamlessly with Task Master AI and Augment Code, providing the optimal project structure, configurations, and guidelines to leverage AI-powered development tools effectively. The template includes everything needed to get started with intelligent project management and AI-assisted coding.
This template is optimized for Augment Code, an AI development platform featuring:
- Advanced context engine: Retrieval and embedding capabilities for understanding code snippets across your codebase
- Real-time codebase indexing: Maintains current understanding of project structure, dependencies, and code patterns
- Multi-language support: Code assistance across TypeScript, JavaScript, and related technologies
- Intelligent code generation: AI assistance that understands your project's architecture and coding standards
The template includes a comprehensive .augment-guidelines file that serves as the definitive guide for AI agents working on TypeScript/Node.js projects. This file provides:
- Project awareness requirements: Guidelines for understanding codebase context and existing patterns
- Code quality standards: ESLint, Prettier, and testing requirements with specific thresholds
- Development workflow practices: Task management, git workflow, and quality gates
- Security guidelines: Input validation, dependency management, and secure coding practices
- TypeScript best practices: Modern patterns, error handling, and performance optimization
- AI behavior rules: Communication patterns, error recovery, and tool coordination
The guidelines ensure consistent, high-quality code generation while maintaining project standards and architectural integrity.
This template includes setup guides and configurations for Task Master AI, an AI-powered project management tool that enhances how you plan, track, and execute development projects.
Task Master is installed globally and provides comprehensive project management capabilities:
# Verify installation
task-master --help
# Check version
task-master --version-
Initialize Task Master in your project:
task-master init --name="My Project" --description="Project description"
-
Configure AI models:
task-master models --setup
-
Generate tasks from a PRD (Product Requirements Document):
task-master parse-prd --input=docs/prd.txt --num-tasks=10
-
View and manage tasks:
# List all tasks task-master list # Show next task to work on task-master next # View specific task details task-master show <task-id> # Update task status task-master set-status --id=<task-id> --status=done
- AI-powered task generation from PRD documents
- Intelligent task breakdown and subtask management
- Dependency tracking and workflow optimization
- Progress tracking with multiple status types
- Complexity analysis and expansion recommendations
- Integration with AI models (Claude, GPT, etc.)
# Task Creation & Management
task-master add-task --prompt="Add user authentication"
task-master update-task --id=1 --prompt="Updated requirements"
task-master remove-task --id=1
# Subtask Management
task-master add-subtask --parent=1 --title="Create login form"
task-master expand --id=1 --num=5 # Break task into subtasks
# Dependencies
task-master add-dependency --id=2 --depends-on=1
task-master validate-dependencies
# Analysis & Reporting
task-master analyze-complexity --threshold=5
task-master complexity-reportTask Master uses these configuration files:
.taskmaster/config.json- AI model configuration.taskmaster/tasks/tasks.json- Task data.env- API keys (ANTHROPIC_API_KEY, etc.)
The combination of Augment Code and Task Master AI creates an enhanced development experience:
# Initialize Task Master for project management (requires separate installation)
task-master init --name="My Project" --description="TypeScript application"
# Configure AI models for task generation
task-master models --setup
# Generate initial tasks from requirements
task-master parse-prd --input=docs/requirements.md --num-tasks=15- Augment Code provides intelligent code assistance with codebase context
- Task Master breaks down complex features into manageable, trackable tasks
- Template guidelines ensure consistent quality and architectural patterns
- Quality gates maintain code standards throughout development
# Check next task to work on
task-master next
# Develop with AI assistance (Augment Code provides context-aware suggestions)
# Quality checks are enforced via template configurations
# Update task progress
task-master set-status --id=<task-id> --status=done
# Generate documentation and maintain project structure
npm run docs:api && npm run docs:build- Automated testing with comprehensive coverage requirements
- Security validation with dependency auditing and input validation
- Performance optimization following template best practices
- Documentation generation with TypeDoc and VitePress integration
This template enables:
- π Accelerated Development: Integration with AI-powered code generation and task management tools
- π― Consistent Quality: Automated enforcement of coding standards and best practices
- π§ Intelligent Context: Project structure optimized for AI tools to understand your codebase
- π Project Visibility: Support for comprehensive task tracking and progress monitoring
- π Security-First: Built-in security guidelines and vulnerability management workflows
- π Documentation-Ready: Automated documentation generation and maintenance tools
For detailed information:
- Task Master AI: GitHub Repository
- Augment Code: Platform Documentation
- Template Guidelines: See
.augment-guidelinesfile in project root
The template includes a comprehensive validation system using Zod for runtime type safety and detailed error reporting.
- Type-safe validation with automatic TypeScript type inference
- Detailed error messages with field-level validation feedback
- Custom ValidationError class with structured error information
- Pre-built schemas for common use cases (user input, configuration, server setup)
- Result-type patterns for consistent error handling
import { validateUserInput } from './validation.js';
const result = validateUserInput({
name: 'John Doe',
email: '[email protected]',
age: 30
});
if (result.success) {
// TypeScript knows the exact type
const user = result.data;
console.log(`Welcome, ${user.name}!`);
} else {
// Handle validation errors
console.error('Validation failed:', result.error);
}- AppConfigSchema - Application configuration validation
- UserInputSchema - User input validation with email, age, preferences
- ServerConfigSchema - Server configuration with intelligent defaults
- Validation Overview - Complete validation system guide
- Schema Reference - Detailed schema documentation
- Usage Examples - Practical implementation examples
- Error Handling - Error handling patterns
- Custom Schemas - Creating your own schemas
The template includes a structured logging system using Winston for professional application logging.
- Structured logging with JSON output for production
- Multiple log levels (error, warn, info, debug) with filtering
- Configurable outputs (console with colors, file with JSON)
- Logger utility functions for common logging patterns
- Environment-aware configuration (development vs production)
import { logger, loggerUtils } from './logger.js';
// Structured logging
logger.info('User action performed', {
userId: 123,
action: 'login',
timestamp: new Date().toISOString()
});
// Utility functions for common patterns
loggerUtils.logValidationSuccess(logger, 'Data validated', userData);
loggerUtils.logSectionHeader(logger, 'Processing Phase');
loggerUtils.logCompletion(logger, 'Operation completed successfully');import { createLogger } from './logger.js';
// Environment-specific configuration
const logger = createLogger({
level: 'info', // Log level
outputFile: 'logs/app.log', // File output (null for console only)
includeTimestamp: true, // Include timestamps
useColors: false // Colored output (console only)
});- Logging Overview - Complete logging system guide
- Configuration - Logger setup and options
- Utilities - Utility functions and patterns
- Best Practices - Professional logging guidelines
- Migration Guide - Migrating from console.log
Type-safe configuration loading and validation with the ConfigManager class.
- Type-safe configuration with Zod validation
- Environment-specific configs (development, production, test)
- Feature flags for conditional functionality
- Error handling for missing or invalid configuration files
- Hot-reloadable configuration for runtime adjustments
import { ConfigManager } from './config.js';
const configManager = new ConfigManager();
const result = configManager.loadConfig();
if (result.success) {
const serverConfig = configManager.getServerConfig();
const logger = createLoggerFromConfig(configManager.getLoggingConfig());
// Check feature flags
if (configManager.isFeatureEnabled('enableMetrics')) {
setupMetrics();
}
}- ConfigManager Guide - Complete configuration management
- Validation - Configuration validation patterns
- TSDoc documentation: Write comprehensive comments for all exported functions to help AI understand intent
- Import organization: Follow established patterns (builtin β external β internal) for better AI code analysis
- Test coverage: Maintain above 80% coverage with comprehensive test suites for AI validation
- Commit messages: Use descriptive gitmoji-style messages for AI-powered project analysis
- Quality gates: Run
npm run checkbefore committing to ensure AI-generated code meets standards
- Context awareness: Use Augment Code's codebase retrieval to understand existing patterns before making changes
- Task-driven development: Break complex features into manageable tasks using Task Master
- Iterative improvement: Use AI feedback loops to continuously improve code quality and architecture
- Documentation-driven: Maintain up-to-date documentation to provide better context for AI assistance
- Testing integration: Write comprehensive tests that AI can understand and extend
- Modular architecture: Design deep modules with simple interfaces for better AI comprehension
- Clear dependencies: Maintain explicit dependency relationships for AI-powered task management
- Configuration management: Keep AI model configurations and guidelines up to date in
.augment-guidelines - Security-first approach: Use input validation and dependency auditing as guided by AI security standards
- winston: Professional logging library with structured output and multiple transports
- zod: TypeScript-first schema validation library for runtime type safety
- TypeScript: Language and compiler (
typescript) - ESLint: Linting with TypeScript support (
eslint+ plugins)@eslint/js: Core ESLint JavaScript rules@typescript-eslint/eslint-plugin: TypeScript-specific linting rules@typescript-eslint/parser: TypeScript parser for ESLinteslint-config-prettier: Disables ESLint rules that conflict with Prettiereslint-import-resolver-typescript: TypeScript import resolution for ESLinteslint-plugin-import: Import/export syntax lintingeslint-plugin-jest: Jest-specific linting ruleseslint-plugin-prettier: Runs Prettier as an ESLint rule
- Prettier: Code formatting (
prettier) - Jest: Testing framework (
jest+ supporting packages)@jest/globals: Jest global functions and types@types/jest: TypeScript definitions for Jestts-jest: TypeScript preprocessor for Jest
- TypeScript Support: Type definitions and tooling
@types/node: Node.js type definitions
- Development Utilities
tsx: Fast TypeScript execution for developmentnpm-check-updates: Dependency update management
- Documentation
vitepress: Modern documentation website generationtypedoc: TypeScript API documentation generatortypedoc-plugin-markdown: Markdown output plugin for TypeDoc
This template is optimized for use with:
- Task Master AI: AI-powered task management system (requires separate installation via
npm install -g task-master-ai) - Augment Code: AI development platform with advanced context engine
- Development Guidelines: Comprehensive development standards defined in
.augment-guidelines
# Check validation schema definitions
npm run dev:tsx # Run application to see validation in action
# Test specific validation
node -e "
const { validateUserInput } = require('./dist/validation.js');
console.log(validateUserInput({ name: 'test', email: 'invalid' }));
"# Check logger configuration
npm run dev:tsx # Verify logging output format
# Test different log levels
LOG_LEVEL=debug npm run dev:tsx# Validate configuration file
node -e "
const { ConfigManager } = require('./dist/config.js');
const result = ConfigManager.validateConfigFile('./config.json');
console.log(result);
"
# Check configuration loading
npm run dev:tsx # Application will show config validation results# Clear build cache
rm -rf dist/
npm run build
# Check TypeScript configuration
npx tsc --showConfig# Run specific test suites
npm test -- validation.test.ts
npm test -- logger.test.ts
npm test -- config.test.ts
# Clear Jest cache
npm test -- --clearCache- Use
npm run dev:tsxfor fastest development iteration - Run
npm run checkbefore committing to catch issues early - Use structured logging instead of console.log for better performance
- Validate input data early to prevent runtime errors
- Configure appropriate log levels for different environments
This TypeScript template is provided as-is for creating modern TypeScript projects with AI development tool integration capabilities.