Skip to content

Commit 456e327

Browse files
committed
feat: add prototype framework
1 parent b84a3d7 commit 456e327

30 files changed

Lines changed: 1869 additions & 1307 deletions

apps/prototypes/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vercel
2+
.env*.local

apps/prototypes/AGENTS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AGENTS.md
2+
3+
## Purpose
4+
5+
`apps/prototypes` is an opt-in workspace app for Kilo Code full-page and product-flow UI prototypes. Keep experiments out of the production web router while reusing production web theme tokens and UI primitives.
6+
7+
## Commands
8+
9+
Run prototype checks explicitly:
10+
11+
```bash
12+
pnpm --filter @kilocode/prototypes dev
13+
pnpm --filter @kilocode/prototypes build
14+
pnpm --filter @kilocode/prototypes typecheck
15+
```
16+
17+
Do not wire this app into root `build`, root `validate`, or default CI unless a future task explicitly changes that policy.
18+
19+
## Import boundaries
20+
21+
- `@/*` resolves to `apps/prototypes/src/*` for prototype-local code.
22+
- `@web/*` resolves to `apps/web/src/*` for production web theme, primitives, and product UI.
23+
24+
Prefer prototype-local code for catalog/discovery and review-shell utilities. Keep domain-specific prototype data and preview components colocated with the route that owns them.
25+
26+
## Folder conventions
27+
28+
- Add prototype routes as `src/app/<prototype-slug>/page.tsx`.
29+
- Add optional route metadata beside the page when catalog copy/tags are needed.
30+
- Keep fixtures, client wrappers, and preview components inside the route folder unless another prototype proves the abstraction reusable.
31+
- Shared prototype-kit primitives belong in `src/` outside app route folders.
32+
33+
## Storybook boundary
34+
35+
Storybook is for individual component states. This app is for full-page prototypes, page-flow reviews, and product-context explorations.

apps/prototypes/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Kilo Code Prototypes
2+
3+
`apps/prototypes` is an opt-in Next.js app for full-page and product-flow UI explorations. It lets design-review prototypes live outside the production web router while reusing the production web theme and UI primitives.
4+
5+
Storybook remains the home for individual component states. Use this app when a prototype needs page chrome, multiple sections, route-level behavior, navigation experiments, or a product-flow review surface.
6+
7+
## Commands
8+
9+
Run commands explicitly; the root `build`, `validate`, and default CI flows do not include this app.
10+
11+
```bash
12+
pnpm --filter @kilocode/prototypes dev
13+
pnpm --filter @kilocode/prototypes build
14+
pnpm --filter @kilocode/prototypes typecheck
15+
```
16+
17+
## Import aliases
18+
19+
- `@/*` points to prototype-local source in `apps/prototypes/src/*`.
20+
- `@web/*` points to production web source in `apps/web/src/*`.
21+
22+
Use `@/*` for prototype host code, discovery, catalog, and shared prototype-kit utilities. Use `@web/*` only when importing production web theme, primitives, or existing product UI needed to keep a prototype faithful.
23+
24+
## Folder conventions
25+
26+
- Prototype routes live under `src/app/<prototype-slug>/`.
27+
- Keep prototype-specific fixtures, role logic, preview components, and metadata colocated with that route.
28+
- Shared prototype-host utilities live under `src/` outside route folders.
29+
- Do not introduce a central manifest until multiple durable prototypes prove the need.
30+
31+
## Storybook boundary
32+
33+
Use Storybook for isolated component variants and visual states. Use `apps/prototypes` for app-like flows, full pages, route sequences, and design reviews that need surrounding product context.

apps/prototypes/next.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { resolve } from 'path';
2+
3+
const monorepoRoot = resolve(import.meta.dirname, '../..');
4+
5+
/** @type {import('next').NextConfig} */
6+
const nextConfig = {
7+
reactStrictMode: true,
8+
poweredByHeader: false,
9+
outputFileTracingRoot: monorepoRoot,
10+
turbopack: {
11+
root: monorepoRoot,
12+
},
13+
};
14+
15+
export default nextConfig;

apps/prototypes/package.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "@kilocode/prototypes",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"typecheck": "tsgo --noEmit"
9+
},
10+
"dependencies": {
11+
"@radix-ui/react-dialog": "^1.1.15",
12+
"@radix-ui/react-select": "^2.2.6",
13+
"@radix-ui/react-slot": "^1.2.4",
14+
"@radix-ui/react-switch": "^1.2.6",
15+
"@radix-ui/react-tabs": "^1.1.13",
16+
"@tailwindcss/postcss": "^4.2.1",
17+
"@types/node": ">=24 <25",
18+
"@types/react": "^19.2.14",
19+
"@types/react-dom": "^19.2.3",
20+
"babel-plugin-react-compiler": "^1.0.0",
21+
"class-variance-authority": "^0.7.1",
22+
"clsx": "^2.1.1",
23+
"lucide-react": "^0.552.0",
24+
"next": "^16.1.6",
25+
"react": "^19.2.4",
26+
"react-dom": "^19.2.4",
27+
"tailwind-merge": "^3.5.0",
28+
"tailwindcss": "^4.2.1",
29+
"tw-animate-css": "^1.4.0",
30+
"typescript": "catalog:"
31+
},
32+
"devDependencies": {
33+
"@typescript/native-preview": "catalog:"
34+
}
35+
}
Lines changed: 39 additions & 0 deletions
Loading

apps/web/src/app/prototype/org-kc-billing/components.tsx renamed to apps/prototypes/src/app/kiloclaw-org-billing/components.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,29 @@ import {
3434
Users,
3535
} from 'lucide-react';
3636
import { cn } from '@/lib/utils';
37-
import { Button } from '@/components/ui/button';
38-
import { Badge } from '@/components/ui/badge';
39-
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
37+
import { Button } from '@web/components/ui/button';
38+
import { Badge } from '@web/components/ui/badge';
39+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@web/components/ui/card';
4040
import {
4141
Table,
4242
TableBody,
4343
TableCell,
4444
TableHead,
4545
TableHeader,
4646
TableRow,
47-
} from '@/components/ui/table';
48-
import { Banner } from '@/components/shared/Banner';
49-
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
50-
import { Switch } from '@/components/ui/switch';
47+
} from '@web/components/ui/table';
48+
import { Banner } from '@web/components/shared/Banner';
49+
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@web/components/ui/tabs';
50+
import { Switch } from '@web/components/ui/switch';
5151
import {
5252
Dialog,
5353
DialogContent,
5454
DialogDescription,
5555
DialogFooter,
5656
DialogHeader,
5757
DialogTitle,
58-
} from '@/components/ui/dialog';
59-
import KiloCrabIcon from '@/components/KiloCrabIcon';
58+
} from '@web/components/ui/dialog';
59+
import KiloCrabIcon from '@web/components/KiloCrabIcon';
6060
import {
6161
type AdminBillingStatus,
6262
type AssociatedUser,

apps/web/src/app/prototype/org-kc-billing/mock-data.ts renamed to apps/prototypes/src/app/kiloclaw-org-billing/mock-data.ts

File renamed without changes.

apps/web/src/app/prototype/org-kc-billing/opt-out-client.tsx renamed to apps/prototypes/src/app/kiloclaw-org-billing/opt-out-client.tsx

File renamed without changes.

0 commit comments

Comments
 (0)