@cogito.ai/cli 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -22
- package/dist/index.js +9 -15
- package/dist/templates/web-nextjs/.github/copilot-instructions.md +5 -6
- package/dist/templates/web-nextjs/README.md +25 -24
- package/dist/templates/web-nextjs/apps/docs/.source/browser.ts +18 -8
- package/dist/templates/web-nextjs/apps/docs/.source/dynamic.ts +11 -5
- package/dist/templates/web-nextjs/apps/docs/.source/server.ts +37 -17
- package/dist/templates/web-nextjs/apps/docs/app/docs/[[...slug]]/page.tsx +1 -6
- package/dist/templates/web-nextjs/apps/docs/app/docs/layout.tsx +1 -4
- package/dist/templates/web-nextjs/apps/docs/app/llms-full.txt/route.ts +3 -1
- package/dist/templates/web-nextjs/apps/docs/next-env.d.ts +1 -1
- package/dist/templates/web-nextjs/apps/web/.github/copilot-instructions.md +53 -6
- package/dist/templates/web-nextjs/apps/web/.github/skills/impeccable/SKILL.md +55 -0
- package/dist/templates/web-nextjs/apps/web/DESIGN.md +65 -0
- package/dist/templates/web-nextjs/apps/web/messages/en.json +127 -1
- package/dist/templates/web-nextjs/apps/web/messages/zh.json +127 -1
- package/dist/templates/web-nextjs/apps/web/next-env.d.ts +1 -1
- package/dist/templates/web-nextjs/apps/web/next.config.ts +3 -3
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/forgot-password/page.tsx +265 -0
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/login/page.tsx +20 -4
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/reset-password/page.tsx +115 -0
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(auth)/signup/page.tsx +18 -17
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/dashboard/page.tsx +1 -5
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/settings/layout.tsx +5 -0
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/settings/page.tsx +9 -0
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/(protected)/settings/profile/page.tsx +91 -0
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/about/page.tsx +22 -0
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/globals.css +17 -5
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/help/page.tsx +21 -0
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/layout.tsx +10 -8
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/page.tsx +22 -6
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/privacy/page.tsx +14 -15
- package/dist/templates/web-nextjs/apps/web/src/app/[locale]/terms/page.tsx +1 -5
- package/dist/templates/web-nextjs/apps/web/src/app/auth/callback/route.ts +7 -2
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/app-sidebar.tsx +37 -137
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/chart-area-interactive.tsx +122 -146
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/data-table.tsx +84 -149
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-documents.tsx +7 -16
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-main.tsx +4 -4
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-secondary.tsx +4 -4
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/nav-user.tsx +17 -33
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/page.tsx +10 -13
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/section-cards.tsx +5 -9
- package/dist/templates/web-nextjs/apps/web/src/components/dashboard/site-header.tsx +6 -7
- package/dist/templates/web-nextjs/apps/web/src/components/landing/features.tsx +63 -0
- package/dist/templates/web-nextjs/apps/web/src/components/landing/footer.tsx +48 -0
- package/dist/templates/web-nextjs/apps/web/src/components/landing/header.tsx +97 -0
- package/dist/templates/web-nextjs/apps/web/src/components/landing/hero.tsx +45 -0
- package/dist/templates/web-nextjs/apps/web/src/components/landing/how-it-works.tsx +35 -0
- package/dist/templates/web-nextjs/apps/web/src/components/landing/pricing-teaser.tsx +23 -0
- package/dist/templates/web-nextjs/apps/web/src/components/profile/profile-form.tsx +66 -0
- package/dist/templates/web-nextjs/apps/web/src/components/providers/theme-provider.tsx +16 -0
- package/dist/templates/web-nextjs/apps/web/src/components/ui/alert-dialog.tsx +32 -49
- package/dist/templates/web-nextjs/apps/web/src/components/ui/alert.tsx +16 -23
- package/dist/templates/web-nextjs/apps/web/src/components/ui/avatar.tsx +25 -38
- package/dist/templates/web-nextjs/apps/web/src/components/ui/badge.tsx +16 -18
- package/dist/templates/web-nextjs/apps/web/src/components/ui/breadcrumb.tsx +19 -26
- package/dist/templates/web-nextjs/apps/web/src/components/ui/button.tsx +23 -24
- package/dist/templates/web-nextjs/apps/web/src/components/ui/card.tsx +19 -36
- package/dist/templates/web-nextjs/apps/web/src/components/ui/chart.tsx +60 -94
- package/dist/templates/web-nextjs/apps/web/src/components/ui/checkbox.tsx +8 -11
- package/dist/templates/web-nextjs/apps/web/src/components/ui/collapsible.tsx +5 -17
- package/dist/templates/web-nextjs/apps/web/src/components/ui/command.tsx +25 -48
- package/dist/templates/web-nextjs/apps/web/src/components/ui/dialog.tsx +21 -35
- package/dist/templates/web-nextjs/apps/web/src/components/ui/drawer.tsx +24 -35
- package/dist/templates/web-nextjs/apps/web/src/components/ui/dropdown-menu.tsx +26 -55
- package/dist/templates/web-nextjs/apps/web/src/components/ui/field.tsx +62 -76
- package/dist/templates/web-nextjs/apps/web/src/components/ui/form.tsx +19 -34
- package/dist/templates/web-nextjs/apps/web/src/components/ui/input-otp.tsx +13 -20
- package/dist/templates/web-nextjs/apps/web/src/components/ui/input.tsx +6 -6
- package/dist/templates/web-nextjs/apps/web/src/components/ui/label.tsx +6 -6
- package/dist/templates/web-nextjs/apps/web/src/components/ui/pagination.tsx +21 -42
- package/dist/templates/web-nextjs/apps/web/src/components/ui/popover.tsx +16 -31
- package/dist/templates/web-nextjs/apps/web/src/components/ui/progress.tsx +5 -8
- package/dist/templates/web-nextjs/apps/web/src/components/ui/radio-group.tsx +8 -8
- package/dist/templates/web-nextjs/apps/web/src/components/ui/scroll-area.tsx +10 -12
- package/dist/templates/web-nextjs/apps/web/src/components/ui/select.tsx +26 -41
- package/dist/templates/web-nextjs/apps/web/src/components/ui/separator.tsx +7 -7
- package/dist/templates/web-nextjs/apps/web/src/components/ui/sheet.tsx +29 -38
- package/dist/templates/web-nextjs/apps/web/src/components/ui/sidebar.tsx +157 -189
- package/dist/templates/web-nextjs/apps/web/src/components/ui/skeleton.tsx +3 -3
- package/dist/templates/web-nextjs/apps/web/src/components/ui/slider.tsx +10 -15
- package/dist/templates/web-nextjs/apps/web/src/components/ui/sonner.tsx +13 -7
- package/dist/templates/web-nextjs/apps/web/src/components/ui/switch.tsx +9 -9
- package/dist/templates/web-nextjs/apps/web/src/components/ui/table.tsx +24 -48
- package/dist/templates/web-nextjs/apps/web/src/components/ui/tabs.tsx +21 -31
- package/dist/templates/web-nextjs/apps/web/src/components/ui/textarea.tsx +5 -5
- package/dist/templates/web-nextjs/apps/web/src/components/ui/theme-toggle.tsx +23 -0
- package/dist/templates/web-nextjs/apps/web/src/components/ui/toggle-group.tsx +15 -16
- package/dist/templates/web-nextjs/apps/web/src/components/ui/toggle.tsx +14 -15
- package/dist/templates/web-nextjs/apps/web/src/components/ui/tooltip.tsx +8 -12
- package/dist/templates/web-nextjs/apps/web/src/core/repositories/IAuthRepository.ts +5 -0
- package/dist/templates/web-nextjs/apps/web/src/core/types/auth.ts +1 -3
- package/dist/templates/web-nextjs/apps/web/src/features/auth/__contract__.ts +6 -0
- package/dist/templates/web-nextjs/apps/web/src/features/auth/actions.ts +126 -1
- package/dist/templates/web-nextjs/apps/web/src/features/auth/index.ts +12 -1
- package/dist/templates/web-nextjs/apps/web/src/features/auth/server.ts +3 -0
- package/dist/templates/web-nextjs/apps/web/src/hooks/use-mobile.ts +4 -4
- package/dist/templates/web-nextjs/apps/web/src/i18n/config.ts +1 -1
- package/dist/templates/web-nextjs/apps/web/src/infra/db/SupabaseAuthRepository.ts +73 -4
- package/dist/templates/web-nextjs/apps/web/src/infra/db/client.ts +1 -4
- package/dist/templates/web-nextjs/apps/web/src/lib/utils.ts +2 -2
- package/dist/templates/web-nextjs/apps/web/src/lib/validations/auth.ts +34 -0
- package/dist/templates/web-nextjs/apps/web/src/styles/tokens.css +58 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,23 +41,29 @@ Scaffold a new project from a template. Auto-detects the environment:
|
|
|
41
41
|
- **TTY** → interactive prompts (human mode)
|
|
42
42
|
- **Non-TTY / `--silent` / `--json`** → headless execution (agent/CI mode)
|
|
43
43
|
|
|
44
|
-
| Flag
|
|
45
|
-
|
|
|
46
|
-
| `--name`
|
|
47
|
-
| `--template` | string
|
|
48
|
-
| `--pm`
|
|
49
|
-
| `--dir`
|
|
50
|
-
| `--json`
|
|
51
|
-
| `--silent`
|
|
44
|
+
| Flag | Type | Default | Description |
|
|
45
|
+
| ------------ | ------- | ---------- | ------------------------------------------------ |
|
|
46
|
+
| `--name` | string | required | Project name and target directory name |
|
|
47
|
+
| `--template` | string | required | Template ID (e.g. `web-nextjs`) |
|
|
48
|
+
| `--pm` | string | `pnpm` | Package manager: `pnpm` / `npm` / `yarn` / `bun` |
|
|
49
|
+
| `--dir` | string | `./<name>` | Target directory (absolute or relative to cwd) |
|
|
50
|
+
| `--json` | boolean | `false` | Output NDJSON result to stdout |
|
|
51
|
+
| `--silent` | boolean | `false` | Suppress all output |
|
|
52
52
|
|
|
53
53
|
**JSON output (success):**
|
|
54
|
+
|
|
54
55
|
```json
|
|
55
|
-
{"ok":true,"targetDir":"/path/to/my-app","name":"my-app","template":"web-nextjs"}
|
|
56
|
+
{ "ok": true, "targetDir": "/path/to/my-app", "name": "my-app", "template": "web-nextjs" }
|
|
56
57
|
```
|
|
57
58
|
|
|
58
59
|
**JSON output (failure):**
|
|
60
|
+
|
|
59
61
|
```json
|
|
60
|
-
{
|
|
62
|
+
{
|
|
63
|
+
"ok": false,
|
|
64
|
+
"error": "TARGET_DIR_EXISTS",
|
|
65
|
+
"message": "Directory already exists: /path/to/my-app"
|
|
66
|
+
}
|
|
61
67
|
```
|
|
62
68
|
|
|
63
69
|
**Error codes:** `MISSING_ARG` · `TEMPLATE_NOT_FOUND` · `TARGET_DIR_EXISTS` · `CLI_VERSION_OUTDATED` · `SCAFFOLD_FAILED`
|
|
@@ -74,12 +80,13 @@ agentdock mcp
|
|
|
74
80
|
|
|
75
81
|
**Available tools:**
|
|
76
82
|
|
|
77
|
-
| Tool
|
|
78
|
-
|
|
|
79
|
-
| `list_templates`
|
|
83
|
+
| Tool | Description |
|
|
84
|
+
| ------------------ | ------------------------------------------ |
|
|
85
|
+
| `list_templates` | List all available project templates |
|
|
80
86
|
| `scaffold_project` | Scaffold a project into a target directory |
|
|
81
87
|
|
|
82
88
|
**VS Code Copilot MCP config (`.vscode/mcp.json`):**
|
|
89
|
+
|
|
83
90
|
```json
|
|
84
91
|
{
|
|
85
92
|
"servers": {
|
|
@@ -96,8 +103,8 @@ agentdock mcp
|
|
|
96
103
|
|
|
97
104
|
## Available Templates
|
|
98
105
|
|
|
99
|
-
| Template ID
|
|
100
|
-
|
|
|
106
|
+
| Template ID | Description |
|
|
107
|
+
| ------------ | ----------------------------------------------------------------------------------------------------- |
|
|
101
108
|
| `web-nextjs` | Next.js 16 + Supabase + next-intl + Tailwind CSS v4 + Vitest + Fumadocs — full-stack monorepo starter |
|
|
102
109
|
|
|
103
110
|
---
|
|
@@ -125,13 +132,13 @@ All adapters share the same Core Executor (scaffold + registry)
|
|
|
125
132
|
|
|
126
133
|
**Tech stack:**
|
|
127
134
|
|
|
128
|
-
| Component
|
|
129
|
-
|
|
|
130
|
-
| [Bun](https://github.com/oven-sh/bun)
|
|
131
|
-
| [Citty](https://github.com/unjs/citty)
|
|
132
|
-
| [Clack](https://github.com/bombshell-dev/clack)
|
|
133
|
-
| [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) | Agent protocol: MCP Stdio server
|
|
134
|
-
| [Changesets](https://github.com/changesets/changesets)
|
|
135
|
+
| Component | Role |
|
|
136
|
+
| ---------------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
137
|
+
| [Bun](https://github.com/oven-sh/bun) | Build: single-file Node.js executable |
|
|
138
|
+
| [Citty](https://github.com/unjs/citty) | Command modeling: sub-commands, flag schema, lazy loading |
|
|
139
|
+
| [Clack](https://github.com/bombshell-dev/clack) | Human interaction: TTY prompts |
|
|
140
|
+
| [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk) | Agent protocol: MCP Stdio server |
|
|
141
|
+
| [Changesets](https://github.com/changesets/changesets) | Release governance: semantic versioning + changelog |
|
|
135
142
|
|
|
136
143
|
---
|
|
137
144
|
|
package/dist/index.js
CHANGED
|
@@ -868,7 +868,7 @@ var package_default;
|
|
|
868
868
|
var init_package = __esm(() => {
|
|
869
869
|
package_default = {
|
|
870
870
|
name: "@cogito.ai/cli",
|
|
871
|
-
version: "0.4.
|
|
871
|
+
version: "0.4.3",
|
|
872
872
|
type: "module",
|
|
873
873
|
description: "AgentDock CLI – scaffold projects for humans and AI agents",
|
|
874
874
|
publishConfig: {
|
|
@@ -913,14 +913,7 @@ var init_version = __esm(() => {
|
|
|
913
913
|
});
|
|
914
914
|
|
|
915
915
|
// src/core/scaffold.ts
|
|
916
|
-
import {
|
|
917
|
-
cpSync,
|
|
918
|
-
existsSync as existsSync2,
|
|
919
|
-
mkdirSync,
|
|
920
|
-
readdirSync,
|
|
921
|
-
readFileSync as readFileSync2,
|
|
922
|
-
writeFileSync
|
|
923
|
-
} from "fs";
|
|
916
|
+
import { cpSync, existsSync as existsSync2, mkdirSync, readdirSync, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
924
917
|
import { join as join2, dirname as dirname2 } from "path";
|
|
925
918
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
926
919
|
import { execSync } from "child_process";
|
|
@@ -16329,7 +16322,12 @@ var init_tools = __esm(() => {
|
|
|
16329
16322
|
required: ["name", "template"]
|
|
16330
16323
|
},
|
|
16331
16324
|
async handler(input) {
|
|
16332
|
-
const {
|
|
16325
|
+
const {
|
|
16326
|
+
name,
|
|
16327
|
+
template: templateId,
|
|
16328
|
+
targetDir,
|
|
16329
|
+
packageManager
|
|
16330
|
+
} = input;
|
|
16333
16331
|
const template = getTemplate(templateId);
|
|
16334
16332
|
if (!template) {
|
|
16335
16333
|
return {
|
|
@@ -16373,11 +16371,7 @@ var init_tools = __esm(() => {
|
|
|
16373
16371
|
return { ok: true, template };
|
|
16374
16372
|
}
|
|
16375
16373
|
};
|
|
16376
|
-
ALL_TOOLS = [
|
|
16377
|
-
listTemplatesTool,
|
|
16378
|
-
scaffoldProjectTool,
|
|
16379
|
-
getTemplateSchemaTool
|
|
16380
|
-
];
|
|
16374
|
+
ALL_TOOLS = [listTemplatesTool, scaffoldProjectTool, getTemplateSchemaTool];
|
|
16381
16375
|
});
|
|
16382
16376
|
|
|
16383
16377
|
// src/adapters/mcp/server.ts
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
This project is a turborepo + pnpm monorepo with two applications:
|
|
8
8
|
|
|
9
|
-
| Directory | Purpose
|
|
10
|
-
| ------------ |
|
|
11
|
-
| `apps/web/` | Main Next.js 16 application (four-layer contract, features, i18n)
|
|
12
|
-
| `apps/docs/` | Fumadocs documentation site (features, decisions, changelog, roadmap)|
|
|
13
|
-
| `packages/` | Shared tooling packages (eslint-config, tsconfig)
|
|
9
|
+
| Directory | Purpose |
|
|
10
|
+
| ------------ | --------------------------------------------------------------------- |
|
|
11
|
+
| `apps/web/` | Main Next.js 16 application (four-layer contract, features, i18n) |
|
|
12
|
+
| `apps/docs/` | Fumadocs documentation site (features, decisions, changelog, roadmap) |
|
|
13
|
+
| `packages/` | Shared tooling packages (eslint-config, tsconfig) |
|
|
14
14
|
|
|
15
15
|
Run all commands from the monorepo root: `pnpm build`, `pnpm lint`, `pnpm test`, `pnpm check-types`.
|
|
16
16
|
|
|
@@ -62,4 +62,3 @@ When adding a new feature `apps/web/src/features/<name>/`:
|
|
|
62
62
|
6. Create `apps/docs/content/docs/features/<name>.mdx` — feature documentation.
|
|
63
63
|
|
|
64
64
|
Reference implementation: `apps/web/src/features/hello/`.
|
|
65
|
-
|
|
@@ -8,18 +8,18 @@ Designed for both human developers and AI coding agents.
|
|
|
8
8
|
|
|
9
9
|
## Tech Stack
|
|
10
10
|
|
|
11
|
-
| Layer
|
|
12
|
-
|
|
13
|
-
| Framework
|
|
14
|
-
| Language
|
|
15
|
-
| Styling
|
|
16
|
-
| Database / Auth | [Supabase](https://supabase.com) (`@supabase/ssr`)
|
|
17
|
-
| i18n
|
|
18
|
-
| Testing
|
|
19
|
-
| Package manager | [pnpm](https://pnpm.io) ≥ 9
|
|
20
|
-
| Runtime
|
|
21
|
-
| Governance
|
|
22
|
-
| Monorepo
|
|
11
|
+
| Layer | Technology |
|
|
12
|
+
| --------------- | --------------------------------------------------------------------------- |
|
|
13
|
+
| Framework | [Next.js 16](https://nextjs.org) (App Router) |
|
|
14
|
+
| Language | [TypeScript 5+](https://www.typescriptlang.org) (strict mode) |
|
|
15
|
+
| Styling | [Tailwind CSS v4](https://tailwindcss.com) |
|
|
16
|
+
| Database / Auth | [Supabase](https://supabase.com) (`@supabase/ssr`) |
|
|
17
|
+
| i18n | [next-intl](https://next-intl.dev) (en / zh out of the box) |
|
|
18
|
+
| Testing | [Vitest](https://vitest.dev) |
|
|
19
|
+
| Package manager | [pnpm](https://pnpm.io) ≥ 9 |
|
|
20
|
+
| Runtime | Node.js ≥ 18 |
|
|
21
|
+
| Governance | [OpenSpec](https://github.com/fission-ai/openspec) (`@fission-ai/openspec`) |
|
|
22
|
+
| Monorepo | [Turborepo](https://turbo.build/repo) + pnpm workspaces |
|
|
23
23
|
|
|
24
24
|
## Directory Structure
|
|
25
25
|
|
|
@@ -64,12 +64,12 @@ cp .env.example .env.local
|
|
|
64
64
|
|
|
65
65
|
Open `.env.local` and fill in your values:
|
|
66
66
|
|
|
67
|
-
| Variable
|
|
68
|
-
|
|
69
|
-
| `NEXT_PUBLIC_SUPABASE_URL`
|
|
70
|
-
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase Dashboard → Project Settings → API → anon / public
|
|
71
|
-
| `SUPABASE_SERVICE_ROLE_KEY`
|
|
72
|
-
| `NEXT_PUBLIC_APP_URL`
|
|
67
|
+
| Variable | Where to find it |
|
|
68
|
+
| ------------------------------- | ------------------------------------------------------------------------ |
|
|
69
|
+
| `NEXT_PUBLIC_SUPABASE_URL` | Supabase Dashboard → Project Settings → API → Project URL |
|
|
70
|
+
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase Dashboard → Project Settings → API → anon / public |
|
|
71
|
+
| `SUPABASE_SERVICE_ROLE_KEY` | Supabase Dashboard → Project Settings → API → service_role (server only) |
|
|
72
|
+
| `NEXT_PUBLIC_APP_URL` | `http://localhost:3000` for local dev |
|
|
73
73
|
|
|
74
74
|
### 4. Set up Supabase Auth (required for login / signup)
|
|
75
75
|
|
|
@@ -129,6 +129,7 @@ apps/web/src/features/<your-feature>/
|
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
Rules:
|
|
132
|
+
|
|
132
133
|
- Features import from `apps/web/src/core/` (domain interfaces) — never from `apps/web/src/infra/` directly.
|
|
133
134
|
- Every feature directory **must** have `__contract__.ts` (ESLint enforces this).
|
|
134
135
|
- Add translations to `apps/web/messages/en.json` and `apps/web/messages/zh.json`.
|
|
@@ -193,12 +194,12 @@ See `openspec/config.yaml` for project-specific governance rules.
|
|
|
193
194
|
|
|
194
195
|
## Environment Variables Reference
|
|
195
196
|
|
|
196
|
-
| Variable
|
|
197
|
-
|
|
198
|
-
| `NEXT_PUBLIC_SUPABASE_URL`
|
|
199
|
-
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | ✅
|
|
200
|
-
| `SUPABASE_SERVICE_ROLE_KEY`
|
|
201
|
-
| `NEXT_PUBLIC_APP_URL`
|
|
197
|
+
| Variable | Required | Exposed to browser | Description |
|
|
198
|
+
| ------------------------------- | -------- | ------------------ | --------------------------------- |
|
|
199
|
+
| `NEXT_PUBLIC_SUPABASE_URL` | ✅ | ✅ | Supabase project URL |
|
|
200
|
+
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | ✅ | ✅ | Supabase anon key (RLS protected) |
|
|
201
|
+
| `SUPABASE_SERVICE_ROLE_KEY` | Optional | ❌ | Admin key, bypasses RLS |
|
|
202
|
+
| `NEXT_PUBLIC_APP_URL` | Optional | ✅ | Canonical app URL |
|
|
202
203
|
|
|
203
204
|
> Variables prefixed with `NEXT_PUBLIC_` are bundled into client-side JavaScript.
|
|
204
205
|
> Never put secrets in `NEXT_PUBLIC_*` variables.
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { browser } from 'fumadocs-mdx/runtime/browser'
|
|
3
|
-
import type * as Config from '../source.config'
|
|
2
|
+
import { browser } from 'fumadocs-mdx/runtime/browser'
|
|
3
|
+
import type * as Config from '../source.config'
|
|
4
4
|
|
|
5
|
-
const create = browser<
|
|
6
|
-
|
|
5
|
+
const create = browser<
|
|
6
|
+
typeof Config,
|
|
7
|
+
import('fumadocs-mdx/runtime/types').InternalTypeConfig & {
|
|
8
|
+
DocData: {}
|
|
7
9
|
}
|
|
8
|
-
|
|
10
|
+
>()
|
|
9
11
|
const browserCollections = {
|
|
10
|
-
docs: create.doc(
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
docs: create.doc('docs', {
|
|
13
|
+
'index.mdx': () => import('../content/docs/index.mdx?collection=docs'),
|
|
14
|
+
'changelog/index.mdx': () => import('../content/docs/changelog/index.mdx?collection=docs'),
|
|
15
|
+
'decisions/turbo-package-manager.mdx': () =>
|
|
16
|
+
import('../content/docs/decisions/turbo-package-manager.mdx?collection=docs'),
|
|
17
|
+
'features/auth.mdx': () => import('../content/docs/features/auth.mdx?collection=docs'),
|
|
18
|
+
'features/hello.mdx': () => import('../content/docs/features/hello.mdx?collection=docs'),
|
|
19
|
+
'roadmap/index.mdx': () => import('../content/docs/roadmap/index.mdx?collection=docs'),
|
|
20
|
+
}),
|
|
21
|
+
}
|
|
22
|
+
export default browserCollections
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import { dynamic } from 'fumadocs-mdx/runtime/dynamic'
|
|
3
|
-
import * as Config from '../source.config'
|
|
2
|
+
import { dynamic } from 'fumadocs-mdx/runtime/dynamic'
|
|
3
|
+
import * as Config from '../source.config'
|
|
4
4
|
|
|
5
|
-
const create = await dynamic<
|
|
6
|
-
|
|
5
|
+
const create = await dynamic<
|
|
6
|
+
typeof Config,
|
|
7
|
+
import('fumadocs-mdx/runtime/types').InternalTypeConfig & {
|
|
8
|
+
DocData: {}
|
|
7
9
|
}
|
|
8
|
-
|
|
10
|
+
>(
|
|
11
|
+
Config,
|
|
12
|
+
{ configPath: 'source.config.ts', environment: 'next', outDir: '.source' },
|
|
13
|
+
{ doc: { passthroughs: ['extractedReferences'] } },
|
|
14
|
+
)
|
|
@@ -1,21 +1,41 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import * as __fd_glob_10 from
|
|
3
|
-
import * as __fd_glob_9 from
|
|
4
|
-
import * as __fd_glob_8 from
|
|
5
|
-
import * as __fd_glob_7 from
|
|
6
|
-
import * as __fd_glob_6 from
|
|
7
|
-
import * as __fd_glob_5 from
|
|
8
|
-
import { default as __fd_glob_4 } from
|
|
9
|
-
import { default as __fd_glob_3 } from
|
|
10
|
-
import { default as __fd_glob_2 } from
|
|
11
|
-
import { default as __fd_glob_1 } from
|
|
12
|
-
import { default as __fd_glob_0 } from
|
|
13
|
-
import { server } from 'fumadocs-mdx/runtime/server'
|
|
14
|
-
import type * as Config from '../source.config'
|
|
2
|
+
import * as __fd_glob_10 from '../content/docs/roadmap/index.mdx?collection=docs'
|
|
3
|
+
import * as __fd_glob_9 from '../content/docs/features/hello.mdx?collection=docs'
|
|
4
|
+
import * as __fd_glob_8 from '../content/docs/features/auth.mdx?collection=docs'
|
|
5
|
+
import * as __fd_glob_7 from '../content/docs/decisions/turbo-package-manager.mdx?collection=docs'
|
|
6
|
+
import * as __fd_glob_6 from '../content/docs/changelog/index.mdx?collection=docs'
|
|
7
|
+
import * as __fd_glob_5 from '../content/docs/index.mdx?collection=docs'
|
|
8
|
+
import { default as __fd_glob_4 } from '../content/docs/roadmap/meta.json?collection=docs'
|
|
9
|
+
import { default as __fd_glob_3 } from '../content/docs/decisions/meta.json?collection=docs'
|
|
10
|
+
import { default as __fd_glob_2 } from '../content/docs/features/meta.json?collection=docs'
|
|
11
|
+
import { default as __fd_glob_1 } from '../content/docs/changelog/meta.json?collection=docs'
|
|
12
|
+
import { default as __fd_glob_0 } from '../content/docs/meta.json?collection=docs'
|
|
13
|
+
import { server } from 'fumadocs-mdx/runtime/server'
|
|
14
|
+
import type * as Config from '../source.config'
|
|
15
15
|
|
|
16
|
-
const create = server<
|
|
17
|
-
|
|
16
|
+
const create = server<
|
|
17
|
+
typeof Config,
|
|
18
|
+
import('fumadocs-mdx/runtime/types').InternalTypeConfig & {
|
|
19
|
+
DocData: {}
|
|
18
20
|
}
|
|
19
|
-
|
|
21
|
+
>({ doc: { passthroughs: ['extractedReferences'] } })
|
|
20
22
|
|
|
21
|
-
export const docs = await create.docs(
|
|
23
|
+
export const docs = await create.docs(
|
|
24
|
+
'docs',
|
|
25
|
+
'content/docs',
|
|
26
|
+
{
|
|
27
|
+
'meta.json': __fd_glob_0,
|
|
28
|
+
'changelog/meta.json': __fd_glob_1,
|
|
29
|
+
'features/meta.json': __fd_glob_2,
|
|
30
|
+
'decisions/meta.json': __fd_glob_3,
|
|
31
|
+
'roadmap/meta.json': __fd_glob_4,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
'index.mdx': __fd_glob_5,
|
|
35
|
+
'changelog/index.mdx': __fd_glob_6,
|
|
36
|
+
'decisions/turbo-package-manager.mdx': __fd_glob_7,
|
|
37
|
+
'features/auth.mdx': __fd_glob_8,
|
|
38
|
+
'features/hello.mdx': __fd_glob_9,
|
|
39
|
+
'roadmap/index.mdx': __fd_glob_10,
|
|
40
|
+
},
|
|
41
|
+
)
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { source } from '@/lib/source'
|
|
2
|
-
import {
|
|
3
|
-
DocsBody,
|
|
4
|
-
DocsDescription,
|
|
5
|
-
DocsPage,
|
|
6
|
-
DocsTitle,
|
|
7
|
-
} from 'fumadocs-ui/layouts/docs/page'
|
|
2
|
+
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/layouts/docs/page'
|
|
8
3
|
import { notFound } from 'next/navigation'
|
|
9
4
|
|
|
10
5
|
export default async function Page(props: { params: Promise<{ slug?: string[] }> }) {
|
|
@@ -4,10 +4,7 @@ import type { ReactNode } from 'react'
|
|
|
4
4
|
|
|
5
5
|
export default function Layout({ children }: { children: ReactNode }) {
|
|
6
6
|
return (
|
|
7
|
-
<DocsLayout
|
|
8
|
-
tree={source.getPageTree()}
|
|
9
|
-
nav={{ title: 'Docs' }}
|
|
10
|
-
>
|
|
7
|
+
<DocsLayout tree={source.getPageTree()} nav={{ title: 'Docs' }}>
|
|
11
8
|
{children}
|
|
12
9
|
</DocsLayout>
|
|
13
10
|
)
|
|
@@ -5,7 +5,9 @@ export const revalidate = false
|
|
|
5
5
|
export async function GET() {
|
|
6
6
|
const pages = source.getPages()
|
|
7
7
|
const texts = await Promise.all(
|
|
8
|
-
pages.map(
|
|
8
|
+
pages.map(
|
|
9
|
+
async (page) => `# ${page.data.title} (${page.url})\n\n${page.data.description ?? ''}`,
|
|
10
|
+
),
|
|
9
11
|
)
|
|
10
12
|
return new Response(texts.join('\n\n'))
|
|
11
13
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="next" />
|
|
2
2
|
/// <reference types="next/image-types/global" />
|
|
3
|
-
import
|
|
3
|
+
import './.next/types/routes.d.ts'
|
|
4
4
|
|
|
5
5
|
// NOTE: This file should not be edited
|
|
6
6
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
This project is a turborepo + pnpm monorepo with two applications:
|
|
8
8
|
|
|
9
|
-
| Directory | Purpose
|
|
10
|
-
| ------------ |
|
|
11
|
-
| `apps/web/` | Main Next.js 16 application (four-layer contract, features, i18n)
|
|
12
|
-
| `apps/docs/` | Fumadocs documentation site (features, decisions, changelog, roadmap)|
|
|
13
|
-
| `packages/` | Shared tooling packages (eslint-config, tsconfig)
|
|
9
|
+
| Directory | Purpose |
|
|
10
|
+
| ------------ | --------------------------------------------------------------------- |
|
|
11
|
+
| `apps/web/` | Main Next.js 16 application (four-layer contract, features, i18n) |
|
|
12
|
+
| `apps/docs/` | Fumadocs documentation site (features, decisions, changelog, roadmap) |
|
|
13
|
+
| `packages/` | Shared tooling packages (eslint-config, tsconfig) |
|
|
14
14
|
|
|
15
15
|
Run all commands from the monorepo root: `pnpm build`, `pnpm lint`, `pnpm test`, `pnpm check-types`.
|
|
16
16
|
|
|
@@ -34,6 +34,53 @@ Four rules are enforced at `error` severity in `apps/web/src/features/**`. Viola
|
|
|
34
34
|
3. **`no-cross-feature`** — Features must not directly import from sibling feature internals. Import through the feature's `index.ts` only.
|
|
35
35
|
4. **`no-core-mutation`** — `apps/web/src/core/` is read-only. Features and infra must not modify core types or interfaces in-place.
|
|
36
36
|
|
|
37
|
+
## CSS Design System
|
|
38
|
+
|
|
39
|
+
This project uses a token-based CSS design system. **Always use semantic tokens**, not arbitrary Tailwind values.
|
|
40
|
+
|
|
41
|
+
### Token Usage Rules
|
|
42
|
+
|
|
43
|
+
| Rule | Do This | Not This |
|
|
44
|
+
| --------------- | --------------------------------------- | ------------------------- |
|
|
45
|
+
| Background | `bg-surface`, `bg-surface-elevated` | `bg-gray-100`, `bg-white` |
|
|
46
|
+
| Text muted | `text-muted-foreground` | `text-gray-500` |
|
|
47
|
+
| Border | `border-border` | `border-gray-200` |
|
|
48
|
+
| Primary | `bg-primary`, `text-primary-foreground` | `bg-blue-500` |
|
|
49
|
+
| Section padding | `p-[var(--space-section)]` or `clamp()` | Hardcoded `px-16 py-24` |
|
|
50
|
+
|
|
51
|
+
### Tailwind `@theme` Registration
|
|
52
|
+
|
|
53
|
+
The following semantic tokens are registered in `globals.css` `@theme` and available as Tailwind utilities:
|
|
54
|
+
|
|
55
|
+
- `--color-surface`, `--color-surface-elevated`
|
|
56
|
+
- `--color-muted-custom`, `--color-muted-foreground-custom`
|
|
57
|
+
- `--color-border-custom`
|
|
58
|
+
- `--color-primary-custom`, `--color-primary-foreground-custom`
|
|
59
|
+
|
|
60
|
+
## Responsive Design Rules (Mobile-First)
|
|
61
|
+
|
|
62
|
+
- **DEFAULT**: Write mobile styles first (unprefixed Tailwind classes)
|
|
63
|
+
- **ENHANCEMENT**: Add desktop styles with `md:` / `lg:` prefixes
|
|
64
|
+
- **FORBIDDEN**: Never use `max-md:` / `max-lg:` downgrade patterns
|
|
65
|
+
- **Section spacing**: Use `clamp(32px, 8vw, 80px)` for section padding
|
|
66
|
+
- **Hero font**: Use `clamp(2rem, 5vw + 1rem, 4rem)` for hero titles
|
|
67
|
+
- **Touch targets**: All buttons and links must be at least `min-h-[44px] min-w-[44px]`
|
|
68
|
+
- **Container queries**: Use `@container` for component-level responsiveness (e.g., feature cards)
|
|
69
|
+
|
|
70
|
+
## UI Anti-Patterns (AI Slop)
|
|
71
|
+
|
|
72
|
+
The following patterns are **strictly forbidden**. AI must self-check before generating UI:
|
|
73
|
+
|
|
74
|
+
1. **Inter + Roboto font dominance** — Geist is the primary font.
|
|
75
|
+
2. **Purple-to-blue gradients** — `from-purple-* to-blue-*` is banned.
|
|
76
|
+
3. **Nested rounded cards** — No `rounded-xl` inside `rounded-xl`.
|
|
77
|
+
4. **Pure black / pure gray text** — All neutrals must carry subtle hue.
|
|
78
|
+
5. **Bounce / elastic easing** — No bounce or spring animations.
|
|
79
|
+
6. **Neon glowing header text** — No text-shadow glow on dark backgrounds.
|
|
80
|
+
7. **Icon tile above every heading** — No rounded square icon tiles above section headings.
|
|
81
|
+
|
|
82
|
+
Reference: `DESIGN.md` for full design system context.
|
|
83
|
+
|
|
37
84
|
## Docs Co-evolution
|
|
38
85
|
|
|
39
86
|
Documentation lives alongside the application and grows with it:
|
|
@@ -49,6 +96,7 @@ Documentation lives alongside the application and grows with it:
|
|
|
49
96
|
3. **Conventional commits** — `type(scope): summary` format required.
|
|
50
97
|
4. **pnpm only** — Do not use `npm install` or `yarn`. Always `pnpm add`.
|
|
51
98
|
5. **ESLint config** — Architecture rules come from `packages/eslint-config/features.js`.
|
|
99
|
+
6. **Design system** — Use semantic tokens from `tokens.css`. Never hardcode colors or spacing.
|
|
52
100
|
|
|
53
101
|
## Feature Development Pattern
|
|
54
102
|
|
|
@@ -62,4 +110,3 @@ When adding a new feature `apps/web/src/features/<name>/`:
|
|
|
62
110
|
6. Create `apps/docs/content/docs/features/<name>.mdx` — feature documentation.
|
|
63
111
|
|
|
64
112
|
Reference implementation: `apps/web/src/features/hello/`.
|
|
65
|
-
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Impeccable Design Skill
|
|
2
|
+
|
|
3
|
+
> Skill for enforcing high-quality UI design and catching AI Slop in AI-generated code.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Impeccable is a design quality assurance skill that helps AI Coding Agents produce refined, non-generic UI by enforcing design system constraints and catching common AI-generated anti-patterns.
|
|
8
|
+
|
|
9
|
+
## Commands
|
|
10
|
+
|
|
11
|
+
### `/impeccable init`
|
|
12
|
+
|
|
13
|
+
Initialize design context. Reads `DESIGN.md` and `PRODUCT.md` (if exists) to establish design baseline.
|
|
14
|
+
|
|
15
|
+
### `/impeccable craft <component>`
|
|
16
|
+
|
|
17
|
+
Generate a component following the design system in `DESIGN.md`. Uses semantic tokens, OKLCH colors, and mobile-first responsive patterns.
|
|
18
|
+
|
|
19
|
+
### `/impeccable critique <area>`
|
|
20
|
+
|
|
21
|
+
Review UI for design quality issues: spacing, color consistency, typography, contrast, accessibility.
|
|
22
|
+
|
|
23
|
+
### `/impeccable polish`
|
|
24
|
+
|
|
25
|
+
Apply spacing/typography/color fixes based on DESIGN.md constraints. Fixes minor inconsistencies.
|
|
26
|
+
|
|
27
|
+
### `/impeccable adapt`
|
|
28
|
+
|
|
29
|
+
Check and fix responsive behavior at 375px, 768px, and 1280px breakpoints.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx impeccable skills install
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This creates `.github/skills/impeccable/` with this SKILL.md.
|
|
38
|
+
|
|
39
|
+
## Anti-Patterns Detected
|
|
40
|
+
|
|
41
|
+
1. Inter/Roboto font dominance
|
|
42
|
+
2. Purple-to-blue gradients
|
|
43
|
+
3. Nested rounded cards
|
|
44
|
+
4. Pure black/gray text
|
|
45
|
+
5. Bounce/elastic animations
|
|
46
|
+
6. Neon glowing header text
|
|
47
|
+
7. Icon tile above every heading
|
|
48
|
+
|
|
49
|
+
## CI Integration
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npx impeccable detect src/ --fast --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Run in CI to detect AI Slop. Returns JSON report with findings.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# AgentDock Web Template — Design System
|
|
2
|
+
|
|
3
|
+
> This document serves as the design context anchor for AI Coding Agents. Every UI generation must reference this file before producing components.
|
|
4
|
+
|
|
5
|
+
## Project Type & Design Positioning
|
|
6
|
+
|
|
7
|
+
- **Type**: SaaS starter template (B2B/B2C universal)
|
|
8
|
+
- **Style**: Clean / Professional / Modern
|
|
9
|
+
- **Philosophy**: Not minimal, not flashy. Purposeful, trustworthy, and easy to extend.
|
|
10
|
+
|
|
11
|
+
## Typography System
|
|
12
|
+
|
|
13
|
+
| Token | Value | Usage |
|
|
14
|
+
| ---------------- | ------------------------- | ------------------------- |
|
|
15
|
+
| `--font-heading` | Geist Sans | Headlines, hero text, nav |
|
|
16
|
+
| `--font-body` | Geist Sans | Body text, UI labels |
|
|
17
|
+
| Fallback | `system-ui`, `sans-serif` | Geist loading failure |
|
|
18
|
+
|
|
19
|
+
- **Font scale**: `--text-xs` (0.75rem) → `--text-4xl` (2.25rem)
|
|
20
|
+
- **Hero title**: `clamp(2rem, 5vw + 1rem, 4rem)` — responsive, fluid
|
|
21
|
+
- **Body line-height**: 1.6 for readability
|
|
22
|
+
|
|
23
|
+
## Color Strategy (OKLCH)
|
|
24
|
+
|
|
25
|
+
Brand color is defined via OKLCH hue/chroma/lightness variables:
|
|
26
|
+
|
|
27
|
+
- `--color-brand-h: 262`, `--color-brand-c: 0.26`, `--color-brand-l: 0.56`
|
|
28
|
+
- Override these three variables to retheme the entire application.
|
|
29
|
+
|
|
30
|
+
### Semantic Tokens
|
|
31
|
+
|
|
32
|
+
| Token | Light | Dark | Usage |
|
|
33
|
+
| -------------------------- | ---------------- | --------------- | ---------------------- |
|
|
34
|
+
| `--color-surface` | oklch(0.985 ...) | oklch(0.13 ...) | Page backgrounds |
|
|
35
|
+
| `--color-surface-elevated` | oklch(1 ...) | oklch(0.18 ...) | Cards, modals |
|
|
36
|
+
| `--color-muted` | oklch(0.94 ...) | oklch(0.22 ...) | Secondary backgrounds |
|
|
37
|
+
| `--color-muted-foreground` | oklch(0.52 ...) | oklch(0.62 ...) | Placeholder, meta text |
|
|
38
|
+
| `--color-border` | oklch(0.88 ...) | oklch(0.28 ...) | Dividers, borders |
|
|
39
|
+
|
|
40
|
+
## Spacing System
|
|
41
|
+
|
|
42
|
+
- **Baseline**: 4px (`--space-1`)
|
|
43
|
+
- **Section spacing**: `clamp(64px, 10vw, 120px)` — never hardcode section padding
|
|
44
|
+
- **Touch targets**: Minimum `44px x 44px` for all interactive elements
|
|
45
|
+
|
|
46
|
+
## 7 AI Slop Anti-Patterns (FORBIDDEN)
|
|
47
|
+
|
|
48
|
+
When generating or reviewing UI, the following patterns are **strictly forbidden**:
|
|
49
|
+
|
|
50
|
+
1. **Inter + Roboto font dominance** — Geist is the primary font. Do not fall back to Inter as the main font.
|
|
51
|
+
2. **Purple-to-blue gradients** — `from-purple-* to-blue-*` is banned. Use `--color-primary` or solid colors.
|
|
52
|
+
3. **Nested rounded cards** — Do not place `rounded-xl` cards inside `rounded-xl` cards. One level of radius is enough.
|
|
53
|
+
4. **Pure black / pure gray text** — All grays must carry a subtle hue (our neutrals are tinted).
|
|
54
|
+
5. **Bounce / elastic easing** — No `bounce`, `elastic`, or spring animations. Use `ease-out` or `cubic-bezier(0.4, 0, 0.2, 1)`.
|
|
55
|
+
6. **Neon glowing header text on dark backgrounds** — No text-shadow glow effects. Keep it clean.
|
|
56
|
+
7. **Icon tile above every heading** — Do not place a rounded square icon tile above every section heading. Use icon + heading inline or omit.
|
|
57
|
+
|
|
58
|
+
## Impeccable Workflow
|
|
59
|
+
|
|
60
|
+
When designing new pages or sections, follow this workflow:
|
|
61
|
+
|
|
62
|
+
1. **Craft** (`/impeccable craft`) — Generate initial design based on DESIGN.md context
|
|
63
|
+
2. **Critique** (`/impeccable critique`) — Review for spacing, color, typography consistency
|
|
64
|
+
3. **Polish** (`/impeccable polish`) — Fix spacing, font sizes, color values
|
|
65
|
+
4. **Adapt** (`/impeccable adapt`) — Ensure responsive at 375px / 768px / 1280px
|