commit 2405ca32122b9cc80fc0499461bd061eb17cd047 Author: Nayan Date: Sat Jul 25 10:50:00 2026 +0530 chore: scaffold the pnpm and turborepo workspace One workspace, one lockfile, one install. packages/* holds the editor's libraries and apps/* the two things you can run: the CLI and the site. Node is pinned at 22.13 and pnpm at 11.9 because the release lane and CI both resolve the toolchain from here rather than from a workflow file. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8fb9eb8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +# Reference projects — read-only, never tracked +reference/ + +# Dependencies +node_modules/ +.pnpm-store/ + +# Build output +dist/ +*.tsbuildinfo + +# TanStack Start / Nitro — apps/web's server build and router scratch dir. +# routeTree.gen.ts is deliberately NOT ignored: it is committed so a clean +# checkout typechecks without running `tsr generate` first. +.output/ +.nitro/ +.tanstack/ + +# Turbo +.turbo/ + +# Storybook — the built catalogue, and the cache its Vite builder keeps +storybook-static/ +.storybook-cache/ + +# Runtime / local data +.airship/ +*.log +logs/ + +# Editor / OS +.DS_Store +.idea/ +.vscode/* +!.vscode/extensions.json + +# Env +.env +.env.* +!.env.example diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..a90feca --- /dev/null +++ b/.npmrc @@ -0,0 +1,6 @@ +# Allow build scripts for known-good native/postinstall deps (pnpm 10+ blocks by default) +auto-install-peers=true +strict-peer-dependencies=false +# Hoist common dev tooling so editor/tsserver resolves them at the root +public-hoist-pattern[]=*biome* +public-hoist-pattern[]=*types* diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..408c526 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Nayan Kumar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/package.json b/package.json new file mode 100644 index 0000000..510db3e --- /dev/null +++ b/package.json @@ -0,0 +1,40 @@ +{ + "name": "airship", + "version": "0.0.0", + "private": true, + "description": "Airship — a visual editor for your running web app, driven by Claude Code, Codex or OpenCode", + "type": "module", + "scripts": { + "build": "turbo run build", + "build:web": "turbo run build --filter=@airship/web", + "clean": "turbo run clean", + "commit": "czg", + "dev": "turbo run dev", + "dev:pkgs": "turbo run dev --filter=./packages/*", + "dev:web": "turbo run dev --filter=@airship/web", + "fix": "ultracite fix", + "format": "biome format --write .", + "lint": "biome check .", + "lint:fix": "biome check --write .", + "prepare": "husky", + "test": "turbo run test", + "typecheck": "turbo run typecheck" + }, + "devDependencies": { + "@biomejs/biome": "^2.5.6", + "@commitlint/cli": "^21.1.0", + "@commitlint/config-conventional": "^21.1.0", + "@types/node": "^22.10.0", + "czg": "^1.13.1", + "husky": "^9.1.7", + "tsup": "^8.5.0", + "turbo": "^2.10.1", + "typescript": "^5.7.0", + "ultracite": "^7.10.0", + "vitest": "^4.1.10" + }, + "packageManager": "pnpm@11.9.0", + "engines": { + "node": ">=22.13.0" + } +} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..5c6fbfa --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,37 @@ +packages: + - "packages/*" + - "apps/*" +# apps/web is both airship's home page and the app `make run` points the CLI at. +# It lives inside this workspace — unlike the standalone home/ and examples/ +# trees it replaces, each of which carried its own lockfile and node_modules. +# One lockfile, one install, one lint pass; the cost is that React, Vite and +# Tailwind are now root dependencies. See README.md § The site. +allowBuilds: + esbuild: true + # wrangler's runtime. apps/web deploys to Cloudflare Workers, and both + # `make web:preview` and the deploy lane need it to have run its install step. + workerd: true +minimumReleaseAgeExclude: + - '@anthropic-ai/claude-agent-sdk-darwin-arm64@0.3.196' + - '@anthropic-ai/claude-agent-sdk-darwin-x64@0.3.196' + - '@anthropic-ai/claude-agent-sdk-linux-arm64-musl@0.3.196' + - '@anthropic-ai/claude-agent-sdk-linux-arm64@0.3.196' + - '@anthropic-ai/claude-agent-sdk-linux-x64-musl@0.3.196' + - '@anthropic-ai/claude-agent-sdk-linux-x64@0.3.196' + - '@anthropic-ai/claude-agent-sdk-win32-arm64@0.3.196' + - '@anthropic-ai/claude-agent-sdk-win32-x64@0.3.196' + - '@anthropic-ai/claude-agent-sdk@0.3.196' + - '@openai/codex-sdk@0.146.0' + # Unlike the other two SDKs this bundles no binary — the `opencode` CLI is a + # separate install, detected on PATH at runtime. See providers/opencode.ts. + - '@opencode-ai/sdk@1.18.13' + - '@openai/codex@0.146.0-darwin-arm64 || 0.146.0-darwin-x64 || 0.146.0-linux-arm64 || 0.146.0-linux-x64 || 0.146.0-win32-arm64 || 0.146.0-win32-x64 || 0.146.0' + - '@turbo/darwin-64@2.10.1' + - '@turbo/darwin-arm64@2.10.1' + - '@turbo/linux-64@2.10.1' + - '@turbo/linux-arm64@2.10.1' + - '@turbo/windows-64@2.10.1' + - '@turbo/windows-arm64@2.10.1' + - turbo@2.10.1 + - ultracite@7.10.0 + - '@opencode-ai/sdk@1.18.13' diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 0000000..5b4359d --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Bundler", + "moduleDetection": "force", + "lib": ["ES2023"], + "strict": true, + "verbatimModuleSyntax": true, + "isolatedModules": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "noEmit": true + } +} diff --git a/turbo.json b/turbo.json new file mode 100644 index 0000000..6637c14 --- /dev/null +++ b/turbo.json @@ -0,0 +1,75 @@ +{ + "$schema": "https://turborepo.com/schema.json", + "ui": "stream", + "tasks": { + "build": { + "dependsOn": ["^build"], + "outputs": ["dist/**"] + }, + "dev": { + "cache": false, + "persistent": true + }, + "typecheck": { + "dependsOn": ["^build"] + }, + "test": { + "dependsOn": ["^build"] + }, + "lint": {}, + "clean": { + "cache": false + }, + "@airshiplabs/cli#build": { + "dependsOn": [ + "^build", + "@airship/overlay#build", + "@airship/editor-tokens#build" + ], + "outputs": ["dist/**"] + }, + "@airship/web#build": { + "dependsOn": ["^build"], + "outputs": [ + ".output/**", + ".tanstack/**", + "dist/**", + "src/routeTree.gen.ts" + ] + }, + "@airship/web#dev": { + "dependsOn": ["@airship/site-tokens#build"], + "cache": false, + "persistent": true + }, + "storybook": { + "cache": false, + "persistent": true + }, + "build-storybook": { + "outputs": ["storybook-static/**"] + }, + "test:browser": {}, + "@airship/overlay#storybook": { + "dependsOn": [ + "@airship/editor-tokens#build", + "@airship/editor-icons#build" + ], + "cache": false, + "persistent": true + }, + "@airship/overlay#build-storybook": { + "dependsOn": [ + "@airship/editor-tokens#build", + "@airship/editor-icons#build" + ], + "outputs": ["storybook-static/**"] + }, + "@airship/overlay#test:browser": { + "dependsOn": [ + "@airship/editor-tokens#build", + "@airship/editor-icons#build" + ] + } + } +}