Skip to main content

Tech Stack

DevDaily is built with modern TypeScript and Node.js tooling:

Language

TypeScript 5.7 with strict mode enabled

Runtime

Node.js 18+ with ESM (ECMAScript Modules)

CLI Framework

Commander.js 12 for command parsing

Build Tool

tsup for fast bundling

Core Dependencies

CategoryTechnologyPurpose
Git Operationssimple-gitGit history analysis and operations
AI GenerationGitHub Copilot CLIAI-powered text generation
Terminal UIchalk, boxen, ora, inquirerRich CLI interface
ValidationZodSchema validation and config parsing
TestingVitestFast unit testing
LintingESLint + PrettierCode quality and formatting
Commit HooksHusky + commitlintConventional commits enforcement

Project Structure

The codebase follows a clean separation of concerns:
devdaily/
├── src/
│   ├── commands/          # CLI command handlers
│   ├── core/              # Business logic
│   ├── config/            # Configuration management
│   ├── ui/                # Terminal UI components
│   ├── utils/             # Shared utilities
│   ├── types/             # TypeScript definitions
│   └── index.ts           # CLI entry point
├── tests/                 # Vitest test suites
├── schemas/               # JSON Schema for autocomplete
├── examples/              # Example outputs
└── docs/                  # Additional documentation

Commands Layer

CLI command handlers that orchestrate business logic. Commands should be thin - they parse arguments, call core modules, and handle output.Files:
  • standup.ts - Standup generation
  • pr.ts - PR description generation
  • week.ts - Weekly summary
  • context.ts - Context recovery
  • recall.ts - Work history search
  • snapshot.ts - Manual snapshot capture
  • init.ts - Setup wizard
  • config.ts - Configuration management
  • doctor.ts - System diagnostics
  • connect.ts - PM tool connection
  • dash.ts - Interactive dashboard

Core Layer

Business logic and domain models. This is where the main functionality lives.Key Modules:
  • git-analyzer.ts - Git operations using simple-git
  • copilot.ts - GitHub Copilot CLI integration
  • standup-context.ts - Rich context builder for standups
  • context-analyzer.ts - Work pattern analysis
  • snapshot-builder.ts - Snapshot creation
  • work-journal.ts - Persistent local storage
  • auto-snapshot.ts - Side-effect & hook snapshots
  • notifications.ts - Slack/Discord webhooks
  • project-management.ts - Jira/Linear/GitHub Issues
  • pr-template.ts - PR template detection
  • pr-prompt.ts - Custom prompt file loader
  • github.ts - GitHub API helpers
  • github-repo.ts - Repo metadata extraction

Configuration Layer

Configuration loading and validation using Zod schemas.Features:
  • Hierarchical config (local overrides global)
  • Separate secrets management
  • JSON Schema generation for IDE autocomplete
  • Type-safe configuration access

UI Layer

Terminal UI components for rich CLI output.Components:
  • colors.ts - Color scheme and styling
  • renderer.ts - Output formatting
  • help.ts - Help screens
  • ascii.ts - ASCII art and banners
  • dashboard.ts - Interactive dashboard
  • keyboard.ts - Keyboard input handling

Utilities Layer

Shared helper functions and utilities.Utilities:
  • formatter.ts - Text and markdown formatting
  • helpers.ts - General helper functions
  • commitlint.ts - Conventional commit parsing
  • ui.ts - UI helper functions

Architecture Patterns

Dependency Flow

1

CLI Entry Point

src/index.ts initializes Commander.js and registers all commands
2

Command Handlers

Commands in src/commands/ parse arguments and orchestrate logic
3

Core Logic

Business logic in src/core/ executes the actual work
4

UI & Output

Results are formatted and displayed via src/ui/ components
Design Principle: Commands should be thin orchestrators. Keep business logic in the core/ layer for better testability and reusability.

File Organization

// src/core/copilot.ts
export async function generateWithCopilot(prompt: string): Promise<string> {
  // Implementation
}

Configuration Hierarchy

DevDaily supports multiple configuration layers:
ScopePathPriority
DefaultHardcodedLowest
Global~/.config/devdaily/config.jsonLow
Local.devdaily.jsonHigh
RuntimeCLI flags (e.g., --format)Highest
Secrets should always be stored separately in .devdaily.secrets.json or ~/.config/devdaily/secrets.json and never committed to version control.

Data Flow

Standup Generation Flow

Work Journal System

The journal system provides persistent memory across commands:
1

Snapshot Capture

Triggered automatically after commands or manually via devdaily snapshot
2

Local Storage

Snapshots stored in ~/.config/devdaily/journal/ as JSON files
3

Indexing

Snapshots indexed by date, project, branch, and tags
4

Retrieval

Searched via devdaily recall or aggregated for weekly summaries

TypeScript Configuration

The project uses strict mode with comprehensive checks:
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true
  }
}
The #!/usr/bin/env node shebang is added by tsup to make the output executable as a CLI tool.

Build Process

Development Build

npm run dev  # Watch mode with tsx
  • Uses tsx for fast TypeScript execution
  • Auto-rebuilds on file changes
  • No bundling required

Production Build

npm run build  # tsup bundler
  • Bundles to single ESM file in dist/
  • Generates type declarations (.d.ts)
  • Includes source maps
  • Adds shebang for CLI execution

Next Steps

Setup Guide

Set up your development environment

Testing

Learn about the testing approach

Contributing

Submit your first contribution