Find a file
Ajax Davis 25e83a1809 docs(registry-execute): recommend wrapper pattern for API keys
Replace system prompt approach with cleaner tool wrapper pattern
that auto-injects pre-configured API keys
2025-12-12 11:39:45 +10:00
.changeset fix(lint): configure Biome to properly ignore build directories 2025-11-26 22:49:45 +10:00
.claude/commands feat(claude): add database slash commands for common operations 2025-11-28 02:24:28 +10:00
.github/workflows fix: use variable for multi-line commit message 2025-12-04 17:47:03 +10:00
.vscode feat: add complete monorepo structure and all packages 2025-11-25 21:59:40 +10:00
apps docs(sdk): improve diagram tooltips and fix GitHub button labels 2025-12-12 10:04:46 +10:00
docs fix(sdk): update code example to use AI SDK v6 streamText API 2025-12-12 09:12:20 +10:00
packages docs(registry-execute): recommend wrapper pattern for API keys 2025-12-12 11:39:45 +10:00
scripts feat: add GitHub Action for daily health check cron and backfill script 2025-12-04 16:36:55 +10:00
services/sandbox-executor feat: add Railway-based sandbox executor microservice 2025-11-30 01:07:24 +10:00
supabase feat(sync): implement Phase 3 Sync Workers with Vercel Cron integration 2025-11-28 02:57:54 +10:00
.dependency-cruiser.js fix(ci): resolve lint and architecture errors blocking Vercel deploy 2025-12-11 09:46:27 +10:00
.env.vercel.production fix(api): remove conflicting [id] route causing build error 2025-11-29 19:59:21 +10:00
.gitignore feat(web): add comprehensive tool detail pages and API routes 2025-11-28 04:45:35 +10:00
.npmrc feat: add complete monorepo structure and all packages 2025-11-25 21:59:40 +10:00
.nvmrc feat: add quality gate tools and Node 22 setup 2025-11-26 17:33:45 +10:00
2025-BEST-PRACTICES.md feat: add quality gate tools and Node 22 setup 2025-11-26 17:33:45 +10:00
ai-sdk-v6.md feat: add dynamic tool loading system with Railway executor 2025-12-04 08:25:53 +10:00
API_ROUTES_TIMEOUT_INVESTIGATION.md fix(ci): skip lefthook install when .git directory missing 2025-11-29 13:51:05 +10:00
biome.json fix(lint): configure Biome to properly ignore build directories 2025-11-26 22:49:45 +10:00
broken-tools.md docs(broken-tools): update resolution status after health check fix 2025-12-12 04:58:07 +10:00
CLAUDE.md docs: add comprehensive NPM package sync documentation and GitHub Actions workflow 2025-11-30 20:46:57 +10:00
convert-label-tests.py refactor(ui): convert all remaining components from createElement to JSX syntax 2025-11-26 03:14:34 +10:00
DENO_NODE_PACKAGE_ISSUE.md feat: add reusable ToolHealthBadge and ToolHealthBanner components 2025-12-04 19:12:07 +10:00
DEPLOYMENT.md feat: configure Vercel to wait for CI before deploying 2025-11-26 17:42:23 +10:00
DYNAMIC_IMPORT_ISSUE.md feat: add dynamic tool loading system with Railway executor 2025-12-04 08:25:53 +10:00
DYNAMIC_TOOL_LOADING_PRD.md feat: add dynamic tool loading system with Railway executor 2025-12-04 08:25:53 +10:00
ENV_VAR_TRANSPORT_ISSUE.md fix: use function body in DefaultChatTransport to send latest env vars 2025-12-04 14:25:59 +10:00
HOW_TO_PUBLISH_A_TOOL.md refactor: remove links, tags, and status fields from TPMJS spec 2025-12-01 05:53:48 +10:00
IMPLEMENTATION_CHECKLIST.md docs: update implementation checklist to use Neon instead of Supabase 2025-11-28 02:00:51 +10:00
IMPLEMENTATION_STATUS.md feat: add dynamic tool loading system with Railway executor 2025-12-04 08:25:53 +10:00
knip.json fix(lint): configure Biome to properly ignore build directories 2025-11-26 22:49:45 +10:00
lefthook.yml perf: only type-check changed packages in pre-commit hook 2025-12-04 17:16:42 +10:00
manual-tools.ts fix: use Dockerfile instead of Nixpacks for Railway deployment 2025-12-04 08:35:50 +10:00
MANUAL_TOOLS.md feat: implement multi-tool package architecture with manual tool registry 2025-12-04 06:39:58 +10:00
NPM_MIRROR.md feat(sync): implement Phase 3 Sync Workers with Vercel Cron integration 2025-11-28 02:57:54 +10:00
OPENAI_SCHEMA_ERROR.md feat: implement playground app with AI SDK v6 tool execution 2025-12-04 02:51:02 +10:00
package.json feat: add automated Vercel AI registry sync with OpenAI 2025-12-04 17:43:17 +10:00
pnpm-lock.yaml fix(createblogpost): convert to proper AI SDK tool 2025-12-12 10:38:46 +10:00
pnpm-workspace.yaml feat(tools): create @tpmjs/createblogpost test tool package 2025-11-28 03:10:31 +10:00
QUALITY-GATES.md feat: add quality gate tools and Node 22 setup 2025-11-26 17:33:45 +10:00
RAILWAY_DEPLOYMENT_NOTE.md feat: add dynamic tool loading system with Railway executor 2025-12-04 08:25:53 +10:00
RAILWAY_DYNAMIC_TOOL_LOADER.md feat: add dynamic tool loading system with Railway executor 2025-12-04 08:25:53 +10:00
README.md feat: configure Vercel to wait for CI before deploying 2025-11-26 17:42:23 +10:00
reset.d.ts fix(lint): configure Biome to properly ignore build directories 2025-11-26 22:49:45 +10:00
STREAMING_EMPTY_RESPONSE.md feat: implement playground app with AI SDK v6 tool execution 2025-12-04 02:51:02 +10:00
sync-hello.ts feat: implement multi-tool package architecture with manual tool registry 2025-12-04 06:39:58 +10:00
sync-manual-tools.ts feat: add reusable ToolHealthBadge and ToolHealthBanner components 2025-12-04 19:12:07 +10:00
sync-vercel-registry.ts fix: use eval instead of regex for TypeScript parsing 2025-12-04 17:50:26 +10:00
test-db.mjs fix(ci): skip lefthook install when .git directory missing 2025-11-29 13:51:05 +10:00
test-schema.ts feat: implement multi-tool package architecture with manual tool registry 2025-12-04 06:39:58 +10:00
tsconfig.json feat: add complete monorepo structure and all packages 2025-11-25 21:59:40 +10:00
turbo.json fix(ci): ensure type-check runs after build to generate Prisma client 2025-11-28 04:09:07 +10:00
USECHAT_INPUT_UNDEFINED.md feat: implement playground app with AI SDK v6 tool execution 2025-12-04 02:51:02 +10:00
vercel.json feat: add GitHub Action for daily health check cron and backfill script 2025-12-04 16:36:55 +10:00
VERCEL_FIX_CHECKLIST.md fix(ci): skip lefthook install when .git directory missing 2025-11-29 13:51:05 +10:00
ZOD_SCHEMA_SERIALIZATION_PROBLEM.md docs: document Zod schema serialization problem for external consultation 2025-12-04 08:53:26 +10:00

TPMJS Monorepo

CI

Tool Package Manager for AI Agents - A Turborepo monorepo with strict TypeScript, Next.js 16, and best practices.

Structure

apps/
  web/          - Next.js 16 App Router application
packages/
  config/       - Shared configurations (Biome, ESLint, Tailwind, TypeScript)
  ui/           - React component library (.ts-only, no barrels)
  utils/        - Utility functions
  types/        - Shared TypeScript types
  env/          - Zod environment schema loader
  test/         - Vitest shared configuration
  mocks/        - MSW mock server
  storybook/    - Storybook documentation

Getting Started

Prerequisites

  • Node.js >= 22 (LTS)
  • pnpm >= 8
  • nvm (recommended for Node version management)

Installation

pnpm install

Development

# Run all apps in development mode
pnpm dev

# Run specific app
pnpm --filter @tpmjs/web dev
pnpm --filter @tpmjs/storybook dev

Building

# Build all packages and apps
pnpm build

# Build specific package
pnpm --filter @tpmjs/ui build

Testing

# Run all tests
pnpm test

# Run tests in watch mode with UI
pnpm test:ui

Linting & Formatting

# Lint all packages
pnpm lint

# Format all files
pnpm format

# Check formatting
pnpm format:check

Quality Gates

# Check architecture/dependency rules
pnpm check-architecture

# Find unused code and dependencies
pnpm find-deadcode

# Check type coverage
pnpm type-coverage

See QUALITY-GATES.md for details.

Component Usage

Components are imported directly without barrel exports:

import { Button } from '@tpmjs/ui/Button/Button';
import { Card, CardHeader } from '@tpmjs/ui/Card/Card';

Important: All UI components use .ts extension (not .tsx) and use createElement instead of JSX.

Publishing Workflow

1. Create Changesets

After making changes to publishable packages:

pnpm changeset

Follow the prompts to describe your changes and select which packages are affected.

2. Version Packages

When ready to release:

pnpm changeset:version

This updates package versions and generates CHANGELOGs.

3. Publish to npm

pnpm changeset:publish

This builds and publishes all packages with changesets to npm.

4. Push to GitHub

git push --follow-tags

Published Packages

  • @tpmjs/ui - React component library
  • @tpmjs/utils - Utility functions
  • @tpmjs/types - TypeScript types
  • @tpmjs/env - Environment schema loader

Deployment

The project is configured to only deploy to Vercel when all CI checks pass. This ensures production always has high-quality, tested code.

CI Checks:

  • Linting & formatting
  • Type checking
  • Tests
  • Production build
  • Architecture validation
  • Dead code detection

See DEPLOYMENT.md for full configuration details.

Module Boundaries

ESLint enforces module boundaries:

  • Apps can import from published packages only
  • Packages cannot import from apps
  • No barrel exports (index.ts) allowed
  • Direct imports required: @tpmjs/ui/Button/Button

Architecture Decisions

Why .ts-only Components?

Using .ts instead of .tsx for React components:

  • Enforces explicit createElement calls
  • Makes React's runtime nature more visible
  • Prevents JSX spreading anti-patterns
  • Better for code generation and tooling

Why No Barrel Exports?

  • Clearer dependency graphs
  • Better tree-shaking
  • Explicit imports show what's actually used
  • Prevents circular dependencies

Why Biome + ESLint?

  • Biome: Fast formatting and basic linting
  • ESLint: Semantic rules (module boundaries, TypeScript strictness)
  • Each tool focuses on what it does best

Scripts Reference

  • dev - Start development servers
  • build - Build all packages
  • test - Run tests
  • test:ui - Run tests with UI
  • lint - Lint code
  • format - Format code with Biome
  • format:check - Check formatting
  • type-check - TypeScript type checking
  • type-coverage - Check type coverage (no implicit any)
  • check-architecture - Validate dependency rules
  • find-deadcode - Find unused code/dependencies
  • clean - Remove build artifacts
  • changeset - Create a changeset
  • changeset:version - Version packages
  • changeset:publish - Publish to npm

License

MIT