feat: add complete monorepo structure and all packages

This completes the initial monorepo setup with all packages and configuration.

Packages added:
- @tpmjs/ui - React component library with .ts-only components
- @tpmjs/utils - Utility functions (cn, format)
- @tpmjs/types - TypeScript types and Zod schemas
- @tpmjs/env - Environment variable validation
- @tpmjs/test - Shared Vitest configuration
- @tpmjs/mocks - MSW mock server
- @tpmjs/config - Shared configurations (Biome, ESLint, Tailwind, TypeScript)

Applications added:
- @tpmjs/web - Next.js 16 App Router

Infrastructure:
- Turborepo configuration with build pipeline
- pnpm workspace setup
- GitHub Actions CI/CD
- Changesets for versioning
- Lefthook pre-commit hooks
- VSCode workspace settings
- Comprehensive documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ajax Davis 2025-11-25 21:59:40 +10:00
parent bc2f4a01cf
commit 78e6b9f4b5
67 changed files with 9889 additions and 0 deletions

View file

@ -0,0 +1,3 @@
import reactConfig from '@tpmjs/eslint-config/react.js';
export default reactConfig;

8
apps/web/next.config.ts Normal file
View file

@ -0,0 +1,8 @@
import type { NextConfig } from 'next';
const nextConfig: NextConfig = {
transpilePackages: ['@tpmjs/ui', '@tpmjs/utils'],
reactStrictMode: true,
};
export default nextConfig;

36
apps/web/package.json Normal file
View file

@ -0,0 +1,36 @@
{
"name": "@tpmjs/web",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"type-check": "tsc --noEmit",
"clean": "rm -rf .next .turbo"
},
"dependencies": {
"@tpmjs/env": "workspace:*",
"@tpmjs/types": "workspace:*",
"@tpmjs/ui": "workspace:*",
"@tpmjs/utils": "workspace:*",
"next": "^16.0.4",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"zod": "^3.24.1"
},
"devDependencies": {
"@tpmjs/eslint-config": "workspace:*",
"@tpmjs/tailwind-config": "workspace:*",
"@tpmjs/tsconfig": "workspace:*",
"@types/node": "^22.10.2",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"autoprefixer": "^10.4.20",
"eslint-config-next": "^16.0.4",
"postcss": "^8.5.1",
"tailwindcss": "^3.4.17",
"typescript": "^5.9.3"
}
}

View file

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};

View file

@ -0,0 +1,30 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
:root {
--background: 0 0% 100%;
--foreground: 222.2 84% 4.9%;
--card: 0 0% 100%;
--card-foreground: 222.2 84% 4.9%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--muted: 210 40% 96.1%;
--muted-foreground: 215.4 16.3% 46.9%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--destructive: 0 84.2% 60.2%;
--destructive-foreground: 210 40% 98%;
--border: 214.3 31.8% 91.4%;
--input: 214.3 31.8% 91.4%;
--ring: 222.2 84% 4.9%;
--radius: 0.5rem;
}
}
body {
@apply bg-background text-foreground;
}

View file

@ -0,0 +1,19 @@
import type { Metadata } from 'next';
import './globals.css';
export const metadata: Metadata = {
title: 'TPMJS - Tool Package Manager for AI Agents',
description: 'The registry for AI tools. Discover, share, and integrate tools that give your agents superpowers.',
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}): React.ReactElement {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}

38
apps/web/src/app/page.tsx Normal file
View file

@ -0,0 +1,38 @@
import { Button } from '@tpmjs/ui/Button/Button';
import { Card, CardHeader, CardTitle, CardContent } from '@tpmjs/ui/Card/Card';
import { createElement } from 'react';
export default function HomePage(): React.ReactElement {
return (
<main className="flex min-h-screen flex-col items-center justify-center p-24">
<div className="space-y-8 max-w-2xl">
<h1 className="text-4xl font-bold text-center">TPMJS</h1>
<p className="text-xl text-center text-muted-foreground">
Tool Package Manager for AI Agents
</p>
{createElement(
Card,
{},
createElement(
CardHeader,
{},
createElement(CardTitle, {}, 'Welcome to TPMJS')
),
createElement(
CardContent,
{ className: 'space-y-4' },
createElement('p', {},
'The registry for AI tools. Discover, share, and integrate tools that give your agents superpowers.'
),
createElement(
Button,
{ className: 'w-full' },
'Get Started'
)
)
)}
</div>
</main>
);
}

7
apps/web/src/env.ts Normal file
View file

@ -0,0 +1,7 @@
import { createEnv } from '@tpmjs/env';
import { z } from 'zod';
export const env = createEnv({
NODE_ENV: z.enum(['development', 'production', 'test']).default('development'),
NEXT_PUBLIC_API_URL: z.string().url().optional(),
});

View file

@ -0,0 +1,11 @@
import type { Config } from 'tailwindcss';
import baseConfig from '@tpmjs/tailwind-config/base';
export default {
...baseConfig,
content: [
'./src/app/**/*.{ts,tsx}',
'./src/components/**/*.{ts,tsx}',
'../../packages/ui/src/**/*.ts',
],
} satisfies Config;

16
apps/web/tsconfig.json Normal file
View file

@ -0,0 +1,16 @@
{
"extends": "@tpmjs/tsconfig/nextjs.json",
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}