create-githat-app 1.3.0 → 1.4.1

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.
Files changed (156) hide show
  1. package/README.md +48 -18
  2. package/dist/cli.js +1161 -114
  3. package/package.json +34 -9
  4. package/templates/agent/app/(auth)/sign-in/page.tsx.hbs +9 -0
  5. package/templates/agent/app/(auth)/sign-up/page.tsx.hbs +9 -0
  6. package/templates/agent/app/admin/agent/page.tsx.hbs +127 -0
  7. package/templates/agent/app/globals.css.hbs +87 -0
  8. package/templates/agent/app/layout.tsx.hbs +41 -0
  9. package/templates/agent/app/page.tsx.hbs +100 -0
  10. package/templates/agent/next.config.ts.hbs +9 -0
  11. package/templates/agent/postcss.config.mjs.hbs +14 -0
  12. package/templates/agent/proxy.ts.hbs +10 -0
  13. package/templates/agent/tsconfig.json.hbs +21 -0
  14. package/templates/base/.env.example.hbs +2 -2
  15. package/templates/base/.env.local.example.hbs +20 -0
  16. package/templates/base/.env.local.hbs +13 -2
  17. package/templates/base/.github/CODEOWNERS.hbs +1 -0
  18. package/templates/base/.github/SECURITY.md +10 -0
  19. package/templates/base/.github/dependabot.yml +19 -0
  20. package/templates/base/.github/workflows/ci.yml.hbs +77 -0
  21. package/templates/base/.github/workflows/githat-policy.yml +51 -0
  22. package/templates/base/.gitignore.hbs +17 -2
  23. package/templates/base/README.md.hbs +31 -52
  24. package/templates/classroom/app/(auth)/sign-in/page.tsx.hbs +9 -0
  25. package/templates/classroom/app/(auth)/sign-up/page.tsx.hbs +9 -0
  26. package/templates/classroom/app/globals.css.hbs +87 -0
  27. package/templates/classroom/app/layout.tsx.hbs +41 -0
  28. package/templates/classroom/app/page.tsx.hbs +103 -0
  29. package/templates/classroom/app/projects/[id]/feedback/page.tsx.hbs +159 -0
  30. package/templates/classroom/app/projects/[id]/present/page.tsx.hbs +113 -0
  31. package/templates/classroom/next.config.ts.hbs +9 -0
  32. package/templates/classroom/postcss.config.mjs.hbs +14 -0
  33. package/templates/classroom/proxy.ts.hbs +10 -0
  34. package/templates/classroom/tsconfig.json.hbs +21 -0
  35. package/templates/content/app/(auth)/sign-in/page.tsx.hbs +9 -0
  36. package/templates/content/app/(auth)/sign-up/page.tsx.hbs +9 -0
  37. package/templates/content/app/globals.css.hbs +87 -0
  38. package/templates/content/app/layout.tsx.hbs +41 -0
  39. package/templates/content/app/newsletter/page.tsx.hbs +90 -0
  40. package/templates/content/app/page.tsx.hbs +105 -0
  41. package/templates/content/app/posts/[slug]/page.tsx.hbs +119 -0
  42. package/templates/content/next.config.ts.hbs +9 -0
  43. package/templates/content/postcss.config.mjs.hbs +14 -0
  44. package/templates/content/proxy.ts.hbs +10 -0
  45. package/templates/content/tsconfig.json.hbs +21 -0
  46. package/templates/dashboard/app/(auth)/sign-in/page.tsx.hbs +9 -0
  47. package/templates/dashboard/app/(auth)/sign-up/page.tsx.hbs +9 -0
  48. package/templates/dashboard/app/admin/data/[entity]/page.tsx.hbs +68 -0
  49. package/templates/dashboard/app/admin/page.tsx.hbs +59 -0
  50. package/templates/dashboard/app/globals.css.hbs +87 -0
  51. package/templates/dashboard/app/layout.tsx.hbs +41 -0
  52. package/templates/dashboard/app/page.tsx.hbs +57 -0
  53. package/templates/dashboard/next.config.ts.hbs +9 -0
  54. package/templates/dashboard/postcss.config.mjs.hbs +14 -0
  55. package/templates/dashboard/proxy.ts.hbs +10 -0
  56. package/templates/dashboard/src/lib/db.ts.hbs +39 -0
  57. package/templates/dashboard/tsconfig.json.hbs +21 -0
  58. package/templates/fullstack/apps-api-express/.env.example.hbs +6 -0
  59. package/templates/fullstack/apps-api-express/.env.local.hbs +6 -0
  60. package/templates/fullstack/apps-api-express/package.json.hbs +24 -0
  61. package/templates/fullstack/apps-api-express/src/index.ts.hbs +41 -0
  62. package/templates/fullstack/apps-api-express/src/routes/health.ts.hbs +11 -0
  63. package/templates/fullstack/apps-api-express/src/routes/users.ts.hbs +43 -0
  64. package/templates/fullstack/apps-api-express/tsconfig.json.hbs +16 -0
  65. package/templates/fullstack/apps-api-fastify/.env.example.hbs +6 -0
  66. package/templates/fullstack/apps-api-fastify/.env.local.hbs +6 -0
  67. package/templates/fullstack/apps-api-fastify/package.json.hbs +22 -0
  68. package/templates/fullstack/apps-api-fastify/src/index.ts.hbs +28 -0
  69. package/templates/fullstack/apps-api-fastify/src/routes/health.ts.hbs +11 -0
  70. package/templates/fullstack/apps-api-fastify/src/routes/users.ts.hbs +43 -0
  71. package/templates/fullstack/apps-api-fastify/tsconfig.json.hbs +16 -0
  72. package/templates/fullstack/apps-api-hono/.env.example.hbs +6 -0
  73. package/templates/fullstack/apps-api-hono/.env.local.hbs +6 -0
  74. package/templates/fullstack/apps-api-hono/package.json.hbs +22 -0
  75. package/templates/fullstack/apps-api-hono/src/index.ts.hbs +35 -0
  76. package/templates/fullstack/apps-api-hono/src/routes/health.ts.hbs +11 -0
  77. package/templates/fullstack/apps-api-hono/src/routes/users.ts.hbs +43 -0
  78. package/templates/fullstack/apps-api-hono/tsconfig.json.hbs +16 -0
  79. package/templates/fullstack/apps-web-nextjs/.env.example.hbs +5 -0
  80. package/templates/fullstack/apps-web-nextjs/.env.local.hbs +5 -0
  81. package/templates/fullstack/apps-web-nextjs/app/(auth)/forgot-password/page.tsx.hbs +11 -0
  82. package/templates/fullstack/apps-web-nextjs/app/(auth)/reset-password/page.tsx.hbs +39 -0
  83. package/templates/fullstack/apps-web-nextjs/app/(auth)/sign-in/page.tsx.hbs +9 -0
  84. package/templates/fullstack/apps-web-nextjs/app/(auth)/sign-up/page.tsx.hbs +9 -0
  85. package/templates/fullstack/apps-web-nextjs/app/(auth)/verify-email/page.tsx.hbs +11 -0
  86. package/templates/fullstack/apps-web-nextjs/app/dashboard/layout.tsx.hbs +15 -0
  87. package/templates/fullstack/apps-web-nextjs/app/dashboard/page.tsx.hbs +27 -0
  88. package/templates/fullstack/apps-web-nextjs/app/globals.css.hbs +21 -0
  89. package/templates/fullstack/apps-web-nextjs/app/layout.tsx.hbs +30 -0
  90. package/templates/fullstack/apps-web-nextjs/app/page.tsx.hbs +17 -0
  91. package/templates/fullstack/apps-web-nextjs/next.config.ts.hbs +17 -0
  92. package/templates/fullstack/apps-web-nextjs/package.json.hbs +34 -0
  93. package/templates/fullstack/apps-web-nextjs/postcss.config.mjs.hbs +9 -0
  94. package/templates/fullstack/apps-web-nextjs/tsconfig.json.hbs +21 -0
  95. package/templates/fullstack/root/.gitignore.hbs +42 -0
  96. package/templates/fullstack/root/githat.yaml.hbs +17 -0
  97. package/templates/fullstack/root/package.json.hbs +15 -0
  98. package/templates/fullstack/root/turbo.json.hbs +20 -0
  99. package/templates/marketplace/CULTURE.md +74 -0
  100. package/templates/marketplace/app/(auth)/sign-in/page.tsx.hbs +9 -0
  101. package/templates/marketplace/app/(auth)/sign-up/page.tsx.hbs +9 -0
  102. package/templates/marketplace/app/(shop)/[slug]/p/[productId]/page.tsx.hbs +99 -0
  103. package/templates/marketplace/app/(shop)/[slug]/page.tsx.hbs +90 -0
  104. package/templates/marketplace/app/admin/page.tsx.hbs +95 -0
  105. package/templates/marketplace/app/cart/page.tsx.hbs +157 -0
  106. package/templates/marketplace/app/globals.css.hbs +87 -0
  107. package/templates/marketplace/app/layout.tsx.hbs +77 -0
  108. package/templates/marketplace/app/page.tsx.hbs +178 -0
  109. package/templates/marketplace/app/sell/page.tsx.hbs +78 -0
  110. package/templates/marketplace/next.config.ts.hbs +9 -0
  111. package/templates/marketplace/postcss.config.mjs.hbs +14 -0
  112. package/templates/marketplace/proxy.ts.hbs +10 -0
  113. package/templates/marketplace/src/lib/anon-session.ts.hbs +117 -0
  114. package/templates/marketplace/src/lib/categories.ts.hbs +35 -0
  115. package/templates/marketplace/tsconfig.json.hbs +21 -0
  116. package/templates/nextjs/.github/workflows/deploy.yml.hbs +107 -0
  117. package/templates/nextjs/app/(auth)/reset-password/page.tsx.hbs +106 -0
  118. package/templates/nextjs/app/globals.css.hbs +4 -3
  119. package/templates/nextjs/app/layout.tsx.hbs +5 -1
  120. package/templates/nextjs/app/page.tsx.hbs +3 -6
  121. package/templates/nextjs/next.config.ts.hbs +7 -3
  122. package/templates/nextjs/proxy.ts.hbs +1 -1
  123. package/templates/plain/app/(auth)/sign-in/page.tsx.hbs +9 -0
  124. package/templates/plain/app/(auth)/sign-up/page.tsx.hbs +9 -0
  125. package/templates/plain/app/globals.css.hbs +87 -0
  126. package/templates/plain/app/layout.tsx.hbs +41 -0
  127. package/templates/plain/app/page.tsx.hbs +123 -0
  128. package/templates/plain/next.config.ts.hbs +9 -0
  129. package/templates/plain/postcss.config.mjs.hbs +14 -0
  130. package/templates/plain/proxy.ts.hbs +10 -0
  131. package/templates/plain/tsconfig.json.hbs +21 -0
  132. package/templates/portfolio/app/(auth)/sign-in/page.tsx.hbs +9 -0
  133. package/templates/portfolio/app/(auth)/sign-up/page.tsx.hbs +9 -0
  134. package/templates/portfolio/app/globals.css.hbs +87 -0
  135. package/templates/portfolio/app/layout.tsx.hbs +41 -0
  136. package/templates/portfolio/app/page.tsx.hbs +86 -0
  137. package/templates/portfolio/next.config.ts.hbs +9 -0
  138. package/templates/portfolio/postcss.config.mjs.hbs +14 -0
  139. package/templates/portfolio/proxy.ts.hbs +10 -0
  140. package/templates/portfolio/tsconfig.json.hbs +21 -0
  141. package/templates/react-vite/src/App.tsx.hbs +11 -9
  142. package/templates/react-vite/src/index.css.hbs +4 -3
  143. package/templates/react-vite/src/pages/Home.tsx.hbs +3 -6
  144. package/templates/saas/app/(auth)/sign-in/page.tsx.hbs +9 -0
  145. package/templates/saas/app/(auth)/sign-up/page.tsx.hbs +9 -0
  146. package/templates/saas/app/admin/billing/page.tsx.hbs +145 -0
  147. package/templates/saas/app/admin/page.tsx.hbs +106 -0
  148. package/templates/saas/app/admin/team/page.tsx.hbs +134 -0
  149. package/templates/saas/app/globals.css.hbs +87 -0
  150. package/templates/saas/app/layout.tsx.hbs +41 -0
  151. package/templates/saas/app/page.tsx.hbs +108 -0
  152. package/templates/saas/app/pricing/page.tsx.hbs +131 -0
  153. package/templates/saas/next.config.ts.hbs +9 -0
  154. package/templates/saas/postcss.config.mjs.hbs +14 -0
  155. package/templates/saas/proxy.ts.hbs +10 -0
  156. package/templates/saas/tsconfig.json.hbs +21 -0
package/package.json CHANGED
@@ -1,36 +1,58 @@
1
1
  {
2
2
  "name": "create-githat-app",
3
- "version": "1.3.0",
4
- "description": "Scaffold enterprise-grade apps with GitHat identityfor humans, AI agents, and MCP servers",
3
+ "version": "1.4.1",
4
+ "description": "GitHat CLIscaffold apps and manage the skills marketplace",
5
5
  "type": "module",
6
6
  "bin": {
7
- "create-githat-app": "./bin/index.js"
7
+ "create-githat-app": "./bin/index.js",
8
+ "githat": "./bin/index.js"
8
9
  },
9
- "files": ["bin", "dist", "templates"],
10
+ "files": [
11
+ "bin",
12
+ "dist",
13
+ "templates"
14
+ ],
10
15
  "scripts": {
11
16
  "build": "tsup",
12
17
  "dev": "tsup --watch",
13
18
  "test": "node bin/index.js --help"
14
19
  },
15
20
  "dependencies": {
16
- "@clack/prompts": "^0.9.1",
21
+ "@clack/prompts": "^1.0.1",
17
22
  "chalk": "^5.4.1",
18
- "commander": "^13.1.0",
23
+ "commander": "^14.0.3",
19
24
  "figlet": "^1.8.0",
20
25
  "fs-extra": "^11.2.0",
21
26
  "gradient-string": "^3.0.0",
22
27
  "handlebars": "^4.7.8",
23
- "ora": "^8.1.1"
28
+ "ora": "^9.3.0",
29
+ "unzipper": "^0.12.3"
24
30
  },
25
31
  "devDependencies": {
26
32
  "@types/figlet": "^1.7.0",
27
33
  "@types/fs-extra": "^11.0.4",
28
34
  "@types/gradient-string": "^1.1.6",
35
+ "@types/unzipper": "^0.10.10",
29
36
  "tsup": "^8.4.0",
30
37
  "typescript": "^5.9.0"
31
38
  },
32
- "keywords": ["githat", "nextjs", "react", "vite", "create-app", "cli", "auth", "identity", "mcp", "ai-agents"],
33
- "license": "SEE LICENSE IN LICENSE",
39
+ "keywords": [
40
+ "githat",
41
+ "nextjs",
42
+ "react",
43
+ "vite",
44
+ "create-app",
45
+ "cli",
46
+ "auth",
47
+ "identity",
48
+ "mcp",
49
+ "ai-agents"
50
+ ],
51
+ "license": "Proprietary",
52
+ "homepage": "https://githat.io",
53
+ "bugs": {
54
+ "url": "https://github.com/GitHat-IO/create-githat-app/issues"
55
+ },
34
56
  "publishConfig": {
35
57
  "access": "public",
36
58
  "registry": "https://registry.npmjs.org/"
@@ -38,5 +60,8 @@
38
60
  "repository": {
39
61
  "type": "git",
40
62
  "url": "git+https://github.com/GitHat-IO/create-githat-app.git"
63
+ },
64
+ "engines": {
65
+ "node": ">=20.10"
41
66
  }
42
67
  }
@@ -0,0 +1,9 @@
1
+ import { SignInForm } from '@githat/nextjs';
2
+
3
+ export default function SignInPage() {
4
+ return (
5
+ <main {{#if useTailwind}}className="flex items-center justify-center min-h-screen bg-[#09090b]"{{else}}style=\{{ display: 'flex', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', background: '#09090b' }}{{/if}}>
6
+ <SignInForm signUpUrl="/sign-up" {{#if includeForgotPassword}}forgotPasswordUrl="/forgot-password"{{/if}} />
7
+ </main>
8
+ );
9
+ }
@@ -0,0 +1,9 @@
1
+ import { SignUpForm } from '@githat/nextjs';
2
+
3
+ export default function SignUpPage() {
4
+ return (
5
+ <main {{#if useTailwind}}className="flex items-center justify-center min-h-screen bg-[#09090b]"{{else}}style=\{{ display: 'flex', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', background: '#09090b' }}{{/if}}>
6
+ <SignUpForm signInUrl="/sign-in" />
7
+ </main>
8
+ );
9
+ }
@@ -0,0 +1,127 @@
1
+ 'use client';
2
+
3
+ import Link from 'next/link';
4
+ import { useAuth } from '@githat/nextjs';
5
+
6
+ /**
7
+ * Agent operator dashboard — control the agent you registered.
8
+ *
9
+ * Three core actions an operator does:
10
+ * 1. See live status (active / paused / revoked)
11
+ * 2. Adjust capabilities (which tools the agent can call)
12
+ * 3. Hit the kill switch
13
+ *
14
+ * Real apps fetch the agent record from GitHat's
15
+ * GET /agent/{walletAddress}. Stub below shows the data shape.
16
+ */
17
+ export default function AgentAdminPage() {
18
+ const { isSignedIn, isLoading } = useAuth();
19
+
20
+ if (isLoading) return <div style=\{{ padding: 'var(--space-8)', color: 'var(--fg-muted)' }}>Loading…</div>;
21
+ if (!isSignedIn) {
22
+ return (
23
+ <div style=\{{ padding: 'var(--space-8)', textAlign: 'center' }}>
24
+ <Link href="/sign-in" style=\{{ color: 'var(--primary)' }}>Sign in →</Link>
25
+ </div>
26
+ );
27
+ }
28
+
29
+ const agent = {
30
+ name: 'My research agent',
31
+ wallet: '0xAB12…CDEf',
32
+ status: 'active' as 'active' | 'paused' | 'revoked',
33
+ capabilities: ['web.search', 'web.fetch', 'arxiv.read'],
34
+ actionsLast24h: 47,
35
+ verifyUrl: 'https://githat.io/verify/agent/0xAB12...CDEf',
36
+ };
37
+
38
+ return (
39
+ <div style=\{{ padding: 'var(--space-8) var(--space-4)', maxWidth: '48rem', margin: '0 auto' }}>
40
+ <h1 style=\{{ fontFamily: 'var(--font-wordmark)', fontSize: '2rem', marginBottom: 'var(--space-2)' }}>
41
+ {agent.name}
42
+ </h1>
43
+ <p style=\{{ color: 'var(--fg-muted)', fontSize: '0.875rem', marginBottom: 'var(--space-6)' }}>
44
+ Wallet: <code>{agent.wallet}</code>
45
+ </p>
46
+
47
+ <section style=\{{
48
+ padding: 'var(--space-5)',
49
+ borderRadius: 'var(--radius-md, 0.5rem)',
50
+ border: '1px solid var(--border)',
51
+ background: 'var(--surface)',
52
+ marginBottom: 'var(--space-6)',
53
+ }}>
54
+ <div style=\{{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 'var(--space-3)' }}>
55
+ <span style=\{{ fontSize: '0.875rem', color: 'var(--fg-muted)' }}>Status</span>
56
+ <span style=\{{
57
+ padding: 'var(--space-1) var(--space-3)',
58
+ borderRadius: 'var(--radius-full, 9999px)',
59
+ background: agent.status === 'active' ? 'var(--success)' : agent.status === 'paused' ? 'var(--warn)' : 'var(--danger)',
60
+ color: 'var(--bg)',
61
+ fontSize: '0.75rem',
62
+ fontWeight: 700,
63
+ }}>
64
+ {agent.status.toUpperCase()}
65
+ </span>
66
+ </div>
67
+ <div style=\{{ fontSize: '2rem', fontWeight: 600, marginBottom: 'var(--space-1)' }}>
68
+ {agent.actionsLast24h}
69
+ </div>
70
+ <div style=\{{ fontSize: '0.75rem', color: 'var(--fg-subtle)' }}>actions in the last 24 hours</div>
71
+ </section>
72
+
73
+ <section style=\{{ marginBottom: 'var(--space-6)' }}>
74
+ <h2 style=\{{ fontSize: '1.125rem', marginBottom: 'var(--space-3)' }}>Capabilities</h2>
75
+ <ul style=\{{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexWrap: 'wrap', gap: 'var(--space-2)' }}>
76
+ {agent.capabilities.map((cap) => (
77
+ <li key={cap} style=\{{
78
+ padding: 'var(--space-2) var(--space-3)',
79
+ borderRadius: 'var(--radius-md, 0.5rem)',
80
+ border: '1px solid var(--border)',
81
+ background: 'var(--surface)',
82
+ fontSize: '0.875rem',
83
+ fontFamily: 'var(--font-mono, monospace)',
84
+ }}>
85
+ {cap}
86
+ </li>
87
+ ))}
88
+ </ul>
89
+ </section>
90
+
91
+ <section style=\{{ display: 'flex', gap: 'var(--space-3)', flexWrap: 'wrap' }}>
92
+ <a href={agent.verifyUrl} target="_blank" rel="noopener noreferrer" style=\{{
93
+ padding: 'var(--space-3) var(--space-4)',
94
+ borderRadius: 'var(--radius-md, 0.5rem)',
95
+ border: '1px solid var(--border)',
96
+ color: 'var(--fg)',
97
+ textDecoration: 'none',
98
+ }}>
99
+ Public verify URL ↗
100
+ </a>
101
+ <Link href="/admin/mcp" style=\{{
102
+ padding: 'var(--space-3) var(--space-4)',
103
+ borderRadius: 'var(--radius-md, 0.5rem)',
104
+ border: '1px solid var(--border)',
105
+ color: 'var(--fg)',
106
+ textDecoration: 'none',
107
+ }}>
108
+ MCP servers
109
+ </Link>
110
+ <button
111
+ onClick={() => { /* TODO: POST /api/agent/kill */ }}
112
+ style=\{{
113
+ padding: 'var(--space-3) var(--space-4)',
114
+ borderRadius: 'var(--radius-md, 0.5rem)',
115
+ border: '1px solid var(--danger)',
116
+ background: 'transparent',
117
+ color: 'var(--danger)',
118
+ fontWeight: 600,
119
+ cursor: 'pointer',
120
+ }}
121
+ >
122
+ Kill switch
123
+ </button>
124
+ </section>
125
+ </div>
126
+ );
127
+ }
@@ -0,0 +1,87 @@
1
+ /*
2
+ * Tailwind v4 — required because @githat/nextjs/styles is processed
3
+ * through @tailwindcss/postcss. Plain doesn't ship utility classes,
4
+ * but the import is needed for the auth pages to render styled.
5
+ */
6
+ @import "tailwindcss";
7
+
8
+ /*
9
+ * Plain template — self-contained globals.
10
+ *
11
+ * Defines the minimum CSS variables a GitHat app uses for layout and
12
+ * the auth-page styling that ships with @githat/nextjs/styles.
13
+ * Override these in your own files when you want a real theme.
14
+ *
15
+ * Light theme by default; flip --bg/--fg for dark.
16
+ */
17
+
18
+ :root {
19
+ /* Surface */
20
+ --bg: #ffffff;
21
+ --surface: #fafafa;
22
+ --surface-sub: #f4f4f5;
23
+
24
+ /* Borders */
25
+ --border: #e5e7eb;
26
+
27
+ /* Foreground */
28
+ --fg: #0a0a0a;
29
+ --fg-muted: #525252;
30
+ --fg-subtle: #737373;
31
+
32
+ /* Brand — change these two to re-skin the whole auth flow */
33
+ --primary: #6366f1;
34
+ --accent: #f59e0b;
35
+
36
+ /* Semantic */
37
+ --success: #16a34a;
38
+ --warn: #d97706;
39
+ --danger: #dc2626;
40
+
41
+ /* Spacing — used by @githat/nextjs/styles */
42
+ --space-1: 0.25rem;
43
+ --space-2: 0.5rem;
44
+ --space-3: 0.75rem;
45
+ --space-4: 1rem;
46
+ --space-6: 1.5rem;
47
+ --space-8: 2rem;
48
+
49
+ /* Radius */
50
+ --radius: 0.5rem;
51
+ --radius-md: 0.5rem;
52
+ --radius-lg: 0.75rem;
53
+
54
+ /* Fonts */
55
+ --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
56
+ --font-wordmark: 'Instrument Serif', Georgia, serif;
57
+ }
58
+
59
+ @media (prefers-color-scheme: dark) {
60
+ :root {
61
+ --bg: #0a0a0a;
62
+ --surface: #18181b;
63
+ --surface-sub: #27272a;
64
+ --border: #3f3f46;
65
+ --fg: #fafafa;
66
+ --fg-muted: #a1a1aa;
67
+ --fg-subtle: #71717a;
68
+ }
69
+ }
70
+
71
+ * {
72
+ box-sizing: border-box;
73
+ margin: 0;
74
+ padding: 0;
75
+ }
76
+
77
+ body {
78
+ font-family: var(--font-sans);
79
+ background: var(--bg);
80
+ color: var(--fg);
81
+ line-height: 1.5;
82
+ }
83
+
84
+ a {
85
+ color: inherit;
86
+ text-decoration: none;
87
+ }
@@ -0,0 +1,41 @@
1
+ import { GitHatProvider } from '@githat/nextjs';
2
+ import '@githat/nextjs/styles';
3
+ import './globals.css';
4
+
5
+ export const metadata = {
6
+ title: '{{businessName}}',
7
+ description: '{{description}}',
8
+ };
9
+
10
+ export default function RootLayout({ children }{{#if typescript}}: { children: React.ReactNode }{{/if}}) {
11
+ return (
12
+ <html lang="en">
13
+ <body>
14
+ {/*
15
+ Plain template: no @githat/ui dep, no Wordmark. The
16
+ full-kit (`nextjs`) template uses @githat/ui for the
17
+ shared design system; the plain scaffold is the smallest
18
+ working app, so we avoid extra deps.
19
+ */}
20
+ <GitHatProvider config=\{{
21
+ publishableKey: process.env.NEXT_PUBLIC_GITHAT_PUBLISHABLE_KEY || '',
22
+ signInUrl: '/sign-in',
23
+ signUpUrl: '/sign-up',
24
+ afterSignInUrl: '/',
25
+ afterSignOutUrl: '/',
26
+ }}>
27
+ <header style=\{{
28
+ padding: '1rem 1.5rem',
29
+ borderBottom: '1px solid var(--border, #e5e7eb)',
30
+ fontFamily: 'system-ui, -apple-system, sans-serif',
31
+ }}>
32
+ <a href="/" style=\{{ textDecoration: 'none', color: 'inherit', fontWeight: 600 }}>
33
+ {{businessName}}
34
+ </a>
35
+ </header>
36
+ <main>{children}</main>
37
+ </GitHatProvider>
38
+ </body>
39
+ </html>
40
+ );
41
+ }
@@ -0,0 +1,100 @@
1
+ 'use client';
2
+
3
+ import Link from 'next/link';
4
+ import { useAuth } from '@githat/nextjs';
5
+
6
+ /**
7
+ * AI Agent template — Web4 identity, MCP, public verification.
8
+ *
9
+ * The pitch: every other auth platform stops at humans. GitHat
10
+ * extends identity to autonomous agents — wallet-bound (Ethereum
11
+ * sigs), capability-scoped, kill-switchable, audit-logged. Anyone
12
+ * can verify an agent at /verify/agent/<wallet>.
13
+ *
14
+ * This template is the agent operator's dashboard, plus the public
15
+ * /verify endpoint anyone can hit to check an agent's status.
16
+ */
17
+ export default function Home() {
18
+ const { isSignedIn } = useAuth();
19
+
20
+ return (
21
+ <div style=\{{ background: 'var(--bg)', color: 'var(--fg)', minHeight: 'calc(100vh - 64px)' }}>
22
+ <section style=\{{
23
+ padding: 'var(--space-12) var(--space-4)',
24
+ textAlign: 'center',
25
+ maxWidth: '40rem',
26
+ margin: '0 auto',
27
+ }}>
28
+ <h1 style=\{{
29
+ fontFamily: 'var(--font-wordmark, Georgia, serif)',
30
+ fontSize: 'clamp(2rem, 5vw, 3rem)',
31
+ lineHeight: 1.1,
32
+ marginBottom: 'var(--space-3)',
33
+ }}>
34
+ {{businessName}}
35
+ </h1>
36
+ <p style=\{{ color: 'var(--fg-muted)', fontSize: '1.125rem', marginBottom: 'var(--space-6)' }}>
37
+ Wallet-bound identity for autonomous AI agents. Capability
38
+ scoping, kill switch, audit trail — and a public /verify
39
+ endpoint anyone can hit.
40
+ </p>
41
+ {!isSignedIn ? (
42
+ <Link href="/sign-up" style=\{{
43
+ display: 'inline-block',
44
+ padding: 'var(--space-3) var(--space-6)',
45
+ borderRadius: 'var(--radius-md, 0.5rem)',
46
+ background: 'var(--primary)',
47
+ color: 'var(--bg)',
48
+ fontWeight: 600,
49
+ textDecoration: 'none',
50
+ }}>
51
+ Register an agent →
52
+ </Link>
53
+ ) : (
54
+ <Link href="/admin/agent" style=\{{
55
+ display: 'inline-block',
56
+ padding: 'var(--space-3) var(--space-6)',
57
+ borderRadius: 'var(--radius-md, 0.5rem)',
58
+ background: 'var(--primary)',
59
+ color: 'var(--bg)',
60
+ fontWeight: 600,
61
+ textDecoration: 'none',
62
+ }}>
63
+ Open agent dashboard →
64
+ </Link>
65
+ )}
66
+ </section>
67
+
68
+ <section style=\{{ padding: 'var(--space-8) var(--space-4)', background: 'var(--surface-sub)' }}>
69
+ <div style=\{{ maxWidth: '48rem', margin: '0 auto' }}>
70
+ <h2 style=\{{ fontSize: '1.5rem', marginBottom: 'var(--space-4)' }}>What you get</h2>
71
+ <ul style=\{{ listStyle: 'none', padding: 0, margin: 0, display: 'flex', flexDirection: 'column', gap: 'var(--space-3)' }}>
72
+ <Item emoji="🪪" title="Wallet-bound identity" body="Ethereum-style key pair. The agent signs requests; clients verify the signature. No shared secrets to leak." />
73
+ <Item emoji="🎚" title="Capability scopes" body="Each agent can only call the tools you explicitly granted. Add or revoke at any time." />
74
+ <Item emoji="🛑" title="Kill switch" body="One click and the agent is revoked everywhere. Existing tokens stop working immediately." />
75
+ <Item emoji="📜" title="Audit log" body="Every action is logged with timestamp, capability used, and signature. Prove what happened." />
76
+ <Item emoji="🔍" title="Public verification" body="Anyone can hit githat.io/verify/agent/<wallet> and see the agent's status, capabilities, and recent actions." />
77
+ </ul>
78
+ </div>
79
+ </section>
80
+ </div>
81
+ );
82
+ }
83
+
84
+ function Item({ emoji, title, body }: { emoji: string; title: string; body: string }) {
85
+ return (
86
+ <li style=\{{
87
+ display: 'flex',
88
+ gap: 'var(--space-4)',
89
+ padding: 'var(--space-4)',
90
+ borderRadius: 'var(--radius-md, 0.5rem)',
91
+ background: 'var(--surface)',
92
+ }}>
93
+ <span style=\{{ fontSize: '1.5rem' }} aria-hidden>{emoji}</span>
94
+ <div>
95
+ <div style=\{{ fontWeight: 600, marginBottom: 'var(--space-1)' }}>{title}</div>
96
+ <div style=\{{ fontSize: '0.875rem', color: 'var(--fg-muted)' }}>{body}</div>
97
+ </div>
98
+ </li>
99
+ );
100
+ }
@@ -0,0 +1,9 @@
1
+ {{#if typescript}}import type { NextConfig } from 'next';
2
+ {{/if}}import { withGitHat } from '@githat/nextjs/server';
3
+
4
+ {{#if typescript}}const nextConfig: NextConfig = {
5
+ {{else}}const nextConfig = {
6
+ {{/if}} output: 'standalone',
7
+ };
8
+
9
+ export default withGitHat(nextConfig);
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Plain template — Tailwind v4 PostCSS plugin is required even though
3
+ * the plain scaffold doesn't use Tailwind utility classes. The auth
4
+ * page CSS shipped by `@githat/nextjs/styles` is processed through
5
+ * @tailwindcss/postcss at build time. Drop this config and the
6
+ * auth pages render unstyled.
7
+ */
8
+ const config = {
9
+ plugins: {
10
+ '@tailwindcss/postcss': {},
11
+ },
12
+ };
13
+
14
+ export default config;
@@ -0,0 +1,10 @@
1
+ import { authProxy } from '@githat/nextjs/proxy';
2
+
3
+ export const proxy = authProxy({
4
+ publicRoutes: ['/', '/sign-in', '/sign-up'{{#if includeForgotPassword}}, '/forgot-password', '/reset-password'{{/if}}{{#if includeEmailVerification}}, '/verify-email'{{/if}}],
5
+ signInUrl: '/sign-in',
6
+ });
7
+
8
+ export const config = {
9
+ matcher: ['/((?!_next|api|.*\\..*).*)'],
10
+ };
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2017",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "esnext",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "jsx": "preserve",
15
+ "incremental": true,
16
+ "plugins": [{ "name": "next" }],
17
+ "paths": { "@/*": ["./*"] }
18
+ },
19
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
20
+ "exclude": ["node_modules"]
21
+ }
@@ -1,11 +1,11 @@
1
1
  # GitHat Identity
2
- {{#ifEquals framework "nextjs"}}
2
+ {{#ifNext framework}}
3
3
  NEXT_PUBLIC_GITHAT_PUBLISHABLE_KEY=pk_test_your_key_here
4
4
  NEXT_PUBLIC_GITHAT_API_URL={{apiUrl}}
5
5
  {{else}}
6
6
  VITE_GITHAT_PUBLISHABLE_KEY=pk_test_your_key_here
7
7
  VITE_GITHAT_API_URL={{apiUrl}}
8
- {{/ifEquals}}
8
+ {{/ifNext}}
9
9
  {{#if useDatabase}}
10
10
 
11
11
  # Database
@@ -0,0 +1,20 @@
1
+ {{#ifNext framework}}
2
+ # GitHat — publishable key for this app.
3
+ # Get yours at https://githat.io/dashboard/apps
4
+ NEXT_PUBLIC_GITHAT_PUBLISHABLE_KEY=pk_live_your_key_here
5
+
6
+ # GitHat API base URL (leave as-is unless using a self-hosted deployment)
7
+ NEXT_PUBLIC_GITHAT_API_URL={{apiUrl}}
8
+ {{else}}
9
+ # GitHat — publishable key for this app.
10
+ # Get yours at https://githat.io/dashboard/apps
11
+ VITE_GITHAT_PUBLISHABLE_KEY=pk_live_your_key_here
12
+
13
+ # GitHat API base URL (leave as-is unless using a self-hosted deployment)
14
+ VITE_GITHAT_API_URL={{apiUrl}}
15
+ {{/ifNext}}
16
+ {{#if useDatabase}}
17
+
18
+ # Database
19
+ DATABASE_URL="postgresql://user:password@localhost:5432/{{projectName}}"
20
+ {{/if}}
@@ -1,10 +1,21 @@
1
- {{#ifEquals framework "nextjs"}}
1
+ {{#ifNext framework}}
2
+ # ─── GitHat publishable key ──────────────────────────────────────────────
3
+ # Paste your key from https://githat.io/dashboard/apps below.
4
+ # This file is gitignored — your key never gets committed by accident.
5
+ # (Don't put real keys on the command line. Shell history is forever.)
2
6
  NEXT_PUBLIC_GITHAT_PUBLISHABLE_KEY={{publishableKey}}
3
7
  NEXT_PUBLIC_GITHAT_API_URL={{apiUrl}}
4
8
  {{else}}
9
+ # ─── GitHat publishable key ──────────────────────────────────────────────
10
+ # Paste your key from https://githat.io/dashboard/apps below.
11
+ # This file is gitignored — your key never gets committed by accident.
12
+ # (Don't put real keys on the command line. Shell history is forever.)
5
13
  VITE_GITHAT_PUBLISHABLE_KEY={{publishableKey}}
6
14
  VITE_GITHAT_API_URL={{apiUrl}}
7
- {{/ifEquals}}
15
+ {{/ifNext}}
8
16
  {{#if useDatabase}}
17
+
18
+ # ─── Database ────────────────────────────────────────────────────────────
19
+ # Replace with your real connection string.
9
20
  DATABASE_URL="postgresql://user:password@localhost:5432/{{projectName}}"
10
21
  {{/if}}
@@ -0,0 +1 @@
1
+ * @{{githubUsername}}
@@ -0,0 +1,10 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ Please **do not** open a public GitHub issue for security vulnerabilities.
6
+
7
+ Email: security@githat.io
8
+
9
+ Include a description of the issue, steps to reproduce, and the potential impact.
10
+ We aim to respond within 48 hours and will keep you updated as we work on a fix.
@@ -0,0 +1,19 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "npm"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 5
8
+ labels: ["dependencies"]
9
+ groups:
10
+ dev-dependencies:
11
+ dependency-type: "development"
12
+ githat:
13
+ patterns: ["@githat/*"]
14
+ - package-ecosystem: "github-actions"
15
+ directory: "/"
16
+ schedule:
17
+ interval: "weekly"
18
+ open-pull-requests-limit: 3
19
+ labels: ["dependencies", "github-actions"]