create-githat-app 1.8.1 → 1.8.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/dist/cli.js CHANGED
@@ -21,7 +21,7 @@ var DEPS = {
21
21
  next: "^16.0.0",
22
22
  react: "^19.0.0",
23
23
  "react-dom": "^19.0.0",
24
- "@githat/nextjs": "^0.12.0",
24
+ "@githat/nextjs": "^0.13.0",
25
25
  "@githat/ui": "^1.0.0"
26
26
  },
27
27
  devDependencies: {
@@ -36,7 +36,7 @@ var DEPS = {
36
36
  react: "^19.0.0",
37
37
  "react-dom": "^19.0.0",
38
38
  "react-router-dom": "^7.0.0",
39
- "@githat/nextjs": "^0.12.0",
39
+ "@githat/nextjs": "^0.13.0",
40
40
  "@githat/ui": "^1.0.0"
41
41
  },
42
42
  devDependencies: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-githat-app",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "GitHat CLI — scaffold apps and manage the skills marketplace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -66,9 +66,54 @@ After that, every `git push origin main` triggers a build + rsync + restart. The
66
66
  {{/if}}{{#if includeOrgManagement}}- `/dashboard/members` — Invite members, manage roles
67
67
  {{/if}}
68
68
 
69
+ ## Branded auth emails (recommended)
70
+
71
+ Out of the box, password-reset and verification emails are sent from
72
+ `auth@githat.io` with the **From name** set to your app's brand
73
+ ("{{businessName}}"). Most email clients show the brand prominently and
74
+ hide the address — but for the most polished experience, verify your
75
+ own domain so emails come from `auth@{{domain}}` instead:
76
+
77
+ ```bash
78
+ # 1. Register your domain in SES via the GitHat API
79
+ curl -X POST https://api.githat.io/apps/$APP_ID/email/domains \
80
+ -H "Authorization: Bearer $ACCESS_TOKEN" \
81
+ -H "Content-Type: application/json" \
82
+ -d '{"hostname": "{{domain}}"}'
83
+ ```
84
+
85
+ The response includes 3 DKIM CNAMEs. Add them to your DNS registrar
86
+ (Route 53, Cloudflare, Namecheap, etc.). SES auto-verifies within
87
+ ~5 minutes, after which every auth email ships from `auth@{{domain}}`
88
+ with your brand throughout — subject, body, and reset link.
89
+
90
+ You can also verify domains via the SDK's `useEmailDomains()` hook:
91
+
92
+ ```{{#if typescript}}tsx{{else}}jsx{{/if}}
93
+ import { useEmailDomains } from '@githat/nextjs';
94
+
95
+ const { add, list, status } = useEmailDomains();
96
+ await add('{{domain}}'); // returns { dkimRecords }
97
+ const domains = await list(); // includes verificationStatus
98
+ ```
99
+
100
+ Once verified, links in emails point to `https://{{domain}}/reset-password?token=…`
101
+ — users never see githat.io.
102
+
103
+ ## Two-factor authentication
104
+
105
+ Users can enable TOTP-based 2FA at `/account/security` (the page is
106
+ scaffolded for you). After enrollment, sign-in flows automatically
107
+ gate behind a 6-digit code from any authenticator app (1Password,
108
+ Authy, Google Authenticator, etc.). Recovery codes are generated
109
+ once at enrollment for account recovery.
110
+
111
+ `<SignInForm/>` and `<MfaChallenge/>` from `@githat/nextjs` handle
112
+ the entire flow end-to-end — no integration code needed.
113
+
69
114
  ## Learn More
70
115
 
71
116
  - [GitHat Documentation](https://githat.io/docs)
117
+ - [Branded Auth Emails Guide](https://githat.io/docs/email-domains)
72
118
  - [SDK Reference](https://www.npmjs.com/package/@githat/nextjs)
73
119
  - [API Reference](https://githat.io/docs/api)
74
- tps://githat.io/docs/api)
@@ -24,6 +24,7 @@ const navItems = [
24
24
  {{#if includeAgentModule}}
25
25
  { label: 'AI Agents', href: '/dashboard/agents' },
26
26
  {{/if}}
27
+ { label: 'Security', href: '/account/security' },
27
28
  ];
28
29
 
29
30
  export function DashboardLayout({ children }{{#if typescript}}: { children: React.ReactNode }{{/if}}) {
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -49,9 +49,10 @@ export default function AdminPage() {
49
49
  gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))',
50
50
  gap: 'var(--space-3)',
51
51
  }}>
52
- <AdminLink href="/admin/team" title="Team" hint="Invite members, set roles" />
53
- <AdminLink href="/admin/billing" title="Billing" hint="Subscription, invoices, payment method" />
54
- <AdminLink href="/admin/settings" title="Settings" hint="Org name, custom domain, branding" />
52
+ <AdminLink href="/admin/team" title="Team" hint="Invite members, set roles" />
53
+ <AdminLink href="/admin/billing" title="Billing" hint="Subscription, invoices, payment method" />
54
+ <AdminLink href="/admin/settings" title="Settings" hint="Org name, custom domain, branding" />
55
+ <AdminLink href="/account/security" title="Security" hint="Two-factor auth, recovery codes" />
55
56
  </nav>
56
57
  </div>
57
58
  </div>