create-githat-app 1.0.10 → 1.0.13
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 +13 -18
- package/dist/cli.js +267 -180
- package/package.json +1 -1
- package/templates/base/.env.local.example.hbs +20 -0
- package/templates/base/README.md.hbs +31 -52
- package/templates/fullstack/apps-api-express/package.json.hbs +1 -1
- package/templates/fullstack/apps-api-fastify/package.json.hbs +1 -1
- package/templates/fullstack/apps-api-hono/package.json.hbs +1 -1
- package/templates/fullstack/apps-web-nextjs/app/globals.css.hbs +4 -3
- package/templates/fullstack/apps-web-nextjs/app/layout.tsx.hbs +5 -1
- package/templates/fullstack/apps-web-nextjs/app/page.tsx.hbs +2 -3
- package/templates/fullstack/apps-web-nextjs/package.json.hbs +2 -1
- package/templates/nextjs/.github/workflows/deploy.yml.hbs +107 -0
- package/templates/nextjs/app/globals.css.hbs +4 -3
- package/templates/nextjs/app/layout.tsx.hbs +5 -1
- package/templates/nextjs/app/page.tsx.hbs +3 -6
- package/templates/nextjs/next.config.ts.hbs +3 -1
- package/templates/react-vite/src/App.tsx.hbs +11 -9
- package/templates/react-vite/src/index.css.hbs +4 -3
- package/templates/react-vite/src/pages/Home.tsx.hbs +3 -6
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{{#ifEquals framework "nextjs"}}
|
|
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
|
+
{{/ifEquals}}
|
|
16
|
+
{{#if useDatabase}}
|
|
17
|
+
|
|
18
|
+
# Database
|
|
19
|
+
DATABASE_URL="postgresql://user:password@localhost:5432/{{projectName}}"
|
|
20
|
+
{{/if}}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
# {{projectName}}
|
|
2
2
|
|
|
3
|
-
Built with [GitHat](https://githat.io) —
|
|
3
|
+
Built with [GitHat](https://githat.io) — auth, teams, orgs, API keys, MCP verification, and AI agent identity are handled by GitHat's hosted platform.
|
|
4
4
|
|
|
5
5
|
## Getting Started
|
|
6
6
|
|
|
7
|
-
1.
|
|
7
|
+
1. Copy the env file and fill in your GitHat key:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
cp .env.local.example .env.local
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
2.
|
|
13
|
+
2. Install dependencies:
|
|
14
14
|
|
|
15
|
-
```
|
|
16
|
-
{{#ifEquals
|
|
15
|
+
```bash
|
|
16
|
+
{{#ifEquals packageManager "yarn"}}yarn{{else}}{{packageManager}} install{{/ifEquals}}
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Get your key at [githat.io/dashboard/apps](https://githat.io/dashboard/apps).
|
|
20
|
-
|
|
21
19
|
3. Start the dev server:
|
|
22
20
|
|
|
23
21
|
```bash
|
|
@@ -26,36 +24,11 @@ Get your key at [githat.io/dashboard/apps](https://githat.io/dashboard/apps).
|
|
|
26
24
|
|
|
27
25
|
4. Open [http://localhost:{{#ifEquals framework "nextjs"}}3000{{else}}5173{{/ifEquals}}](http://localhost:{{#ifEquals framework "nextjs"}}3000{{else}}5173{{/ifEquals}})
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
All API calls go to `api.githat.io`. Your data is stored in GitHat's database. **No backend to deploy.**
|
|
32
|
-
|
|
33
|
-
GitHat handles:
|
|
34
|
-
|
|
35
|
-
- User auth (sign-up, sign-in, email verification, password reset)
|
|
36
|
-
- Organizations (create, switch, branding)
|
|
37
|
-
- Team management (invite members, assign roles)
|
|
38
|
-
- API key management (publishable + secret keys)
|
|
39
|
-
{{#if includeMcpModule}}- MCP server registration and domain verification
|
|
40
|
-
{{/if}}{{#if includeAgentModule}}- AI agent registration and wallet verification
|
|
41
|
-
{{/if}}- Email delivery (verification, invitations, password resets)
|
|
42
|
-
|
|
43
|
-
The `githat/` folder in your project is a typed API client that talks to `api.githat.io`. You write frontend code, GitHat handles the rest.
|
|
44
|
-
|
|
45
|
-
Manage everything at [githat.io/dashboard](https://githat.io/dashboard).
|
|
46
|
-
|
|
47
|
-
## Pages
|
|
48
|
-
|
|
49
|
-
- `/sign-in` — Sign in
|
|
50
|
-
- `/sign-up` — Create account
|
|
51
|
-
{{#if includeForgotPassword}}- `/forgot-password` — Password recovery
|
|
52
|
-
{{/if}}{{#if includeDashboard}}- `/dashboard` — Protected dashboard
|
|
53
|
-
{{/if}}{{#if includeOrgManagement}}- `/dashboard/members` — Invite members, manage roles
|
|
54
|
-
{{/if}}
|
|
27
|
+
Your `NEXT_PUBLIC_GITHAT_PUBLISHABLE_KEY` is required — get it at [githat.io/dashboard/apps](https://githat.io/dashboard/apps) or re-run `create-githat-app` after running `githat login` to have it auto-registered.
|
|
55
28
|
|
|
56
29
|
## GitHat SDK
|
|
57
30
|
|
|
58
|
-
This project uses [`@githat/nextjs`](https://www.npmjs.com/package/@githat/nextjs)
|
|
31
|
+
This project uses [`@githat/nextjs`](https://www.npmjs.com/package/@githat/nextjs):
|
|
59
32
|
|
|
60
33
|
```{{#if typescript}}tsx{{else}}jsx{{/if}}
|
|
61
34
|
import { useAuth, UserButton, OrgSwitcher } from '@githat/nextjs';
|
|
@@ -63,32 +36,38 @@ import { useAuth, UserButton, OrgSwitcher } from '@githat/nextjs';
|
|
|
63
36
|
const { user, org, signIn, signUp, signOut } = useAuth();
|
|
64
37
|
```
|
|
65
38
|
|
|
66
|
-
## Deploy
|
|
39
|
+
## Deploy to EC2 via GitHub Actions
|
|
67
40
|
|
|
68
|
-
|
|
41
|
+
The scaffolded `.github/workflows/deploy.yml` deploys the Next.js standalone bundle to an EC2 instance on every push to `main`.
|
|
69
42
|
|
|
70
|
-
|
|
71
|
-
npx vercel
|
|
72
|
-
```
|
|
43
|
+
**Required GitHub repo secrets:**
|
|
73
44
|
|
|
74
|
-
|
|
75
|
-
|
|
45
|
+
| Secret | Description |
|
|
46
|
+
|--------|-------------|
|
|
47
|
+
| `SSH_PRIVATE_KEY` | Private key whose public key is in the EC2 instance's `~/.ssh/authorized_keys` |
|
|
48
|
+
| `EC2_HOST` | `ubuntu@<ec2-ip-or-hostname>` |
|
|
49
|
+
| `PROD_ENV` | Full contents of your production `.env` file (set via `gh secret set PROD_ENV < .env.local`) |
|
|
50
|
+
| `GITHAT_PUBLISHABLE_KEY` | Your GitHat publishable key (baked into the client bundle at build time) |
|
|
76
51
|
|
|
77
|
-
|
|
78
|
-
npx vercel
|
|
79
|
-
```
|
|
52
|
+
**One-time EC2 setup:**
|
|
80
53
|
|
|
81
|
-
|
|
54
|
+
1. Create a systemd service at `/etc/systemd/system/{{projectName}}.service` that runs `node /opt/{{projectName}}/server.js` with `PORT=3000`.
|
|
55
|
+
2. Create `/opt/{{projectName}}/` owned by your deploy user.
|
|
56
|
+
3. Enable the service: `sudo systemctl enable {{projectName}}`.
|
|
82
57
|
|
|
83
|
-
|
|
84
|
-
npx netlify deploy
|
|
85
|
-
```
|
|
58
|
+
After that, every `git push origin main` triggers a build + rsync + restart. The workflow smoke-tests `/api/health` before reporting success.
|
|
86
59
|
|
|
87
|
-
|
|
88
|
-
|
|
60
|
+
## Pages
|
|
61
|
+
|
|
62
|
+
- `/sign-in` — Sign in
|
|
63
|
+
- `/sign-up` — Create account
|
|
64
|
+
{{#if includeForgotPassword}}- `/forgot-password` — Password recovery
|
|
65
|
+
{{/if}}{{#if includeDashboard}}- `/dashboard` — Protected dashboard
|
|
66
|
+
{{/if}}{{#if includeOrgManagement}}- `/dashboard/members` — Invite members, manage roles
|
|
67
|
+
{{/if}}
|
|
89
68
|
|
|
90
69
|
## Learn More
|
|
91
70
|
|
|
92
71
|
- [GitHat Documentation](https://githat.io/docs)
|
|
93
72
|
- [SDK Reference](https://www.npmjs.com/package/@githat/nextjs)
|
|
94
|
-
- [API Reference
|
|
73
|
+
- [API Reference](https://githat.io/docs/api)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@import "@githat/ui/tokens.css";
|
|
1
2
|
{{#if useTailwind}}
|
|
2
3
|
@import "tailwindcss";
|
|
3
4
|
{{/if}}
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
body {
|
|
12
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
13
|
-
background: #09090b;
|
|
14
|
-
color: #fafafa;
|
|
13
|
+
font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
14
|
+
background: var(--bg, #09090b);
|
|
15
|
+
color: var(--fg, #fafafa);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
a {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GitHatProvider } from '@githat/nextjs';
|
|
2
|
+
import { Wordmark } from '@githat/ui';
|
|
2
3
|
import '@githat/nextjs/styles';
|
|
3
4
|
import './globals.css';
|
|
4
5
|
|
|
@@ -18,7 +19,10 @@ export default function RootLayout({ children }{{#if typescript}}: { children: R
|
|
|
18
19
|
afterSignInUrl: '/dashboard',
|
|
19
20
|
afterSignOutUrl: '/',
|
|
20
21
|
}}>
|
|
21
|
-
{
|
|
22
|
+
<header style=\{{ padding: 'var(--space-4, 1rem) var(--space-6, 1.5rem)', borderBottom: '1px solid var(--border, #e5e7eb)' }}>
|
|
23
|
+
<Wordmark name="{{businessName}}" size="md" href="/" />
|
|
24
|
+
</header>
|
|
25
|
+
<main>{children}</main>
|
|
22
26
|
</GitHatProvider>
|
|
23
27
|
</body>
|
|
24
28
|
</html>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { SignInButton, SignUpButton } from '@githat/nextjs';
|
|
2
|
+
import { Wordmark } from '@githat/ui';
|
|
2
3
|
|
|
3
4
|
export default function Home() {
|
|
4
5
|
return (
|
|
5
6
|
<main {{#if useTailwind}}className="flex flex-col items-center justify-center min-h-screen gap-6 bg-[#09090b] text-[#fafafa]"{{else}}style=\{{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', gap: '1.5rem', background: '#09090b', color: '#fafafa' }}{{/if}}>
|
|
6
|
-
<
|
|
7
|
-
Welcome to {{businessName}}
|
|
8
|
-
</h1>
|
|
7
|
+
<Wordmark name="{{businessName}}" size="xl" />
|
|
9
8
|
<p {{#if useTailwind}}className="text-zinc-400 max-w-lg text-center"{{else}}style=\{{ color: '#a1a1aa', maxWidth: '32rem', textAlign: 'center' }}{{/if}}>
|
|
10
9
|
{{description}}
|
|
11
10
|
</p>
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
name: Deploy to EC2
|
|
2
|
+
|
|
3
|
+
# Auto-deploy every push to main. Also supports manual runs from the
|
|
4
|
+
# Actions tab (workflow_dispatch) so you can re-ship without a dummy commit.
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
# Only one deploy at a time. Queue rather than race if a second push
|
|
11
|
+
# lands mid-deploy.
|
|
12
|
+
concurrency:
|
|
13
|
+
group: deploy-ec2
|
|
14
|
+
cancel-in-progress: false
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build-and-deploy:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
# Skip if commit message starts with "docs:" unless it includes [deploy].
|
|
20
|
+
if: $\{{ !startsWith(github.event.head_commit.message, 'docs:') || contains(github.event.head_commit.message, '[deploy]') }}
|
|
21
|
+
timeout-minutes: 12
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
|
|
26
|
+
- name: Setup Node 20
|
|
27
|
+
uses: actions/setup-node@v4
|
|
28
|
+
with:
|
|
29
|
+
node-version: "20"
|
|
30
|
+
cache: "npm"
|
|
31
|
+
|
|
32
|
+
- name: Install deps
|
|
33
|
+
run: npm ci
|
|
34
|
+
|
|
35
|
+
- name: Type-check
|
|
36
|
+
run: npx tsc --noEmit
|
|
37
|
+
|
|
38
|
+
- name: Compute BUILD_ID
|
|
39
|
+
id: build_id
|
|
40
|
+
run: |
|
|
41
|
+
BUILD_ID=$(git rev-parse --short HEAD || echo "${GITHUB_SHA:0:7}")
|
|
42
|
+
echo "BUILD_ID=$BUILD_ID" >> "$GITHUB_OUTPUT"
|
|
43
|
+
echo "Resolved BUILD_ID=$BUILD_ID"
|
|
44
|
+
|
|
45
|
+
- name: Build (Next.js standalone)
|
|
46
|
+
run: npm run build
|
|
47
|
+
env:
|
|
48
|
+
# NEXT_PUBLIC_* vars are baked into the client bundle at build time.
|
|
49
|
+
# The real value comes from the GITHAT_PUBLISHABLE_KEY repo secret.
|
|
50
|
+
NEXT_PUBLIC_GITHAT_PUBLISHABLE_KEY: $\{{ secrets.GITHAT_PUBLISHABLE_KEY }}
|
|
51
|
+
BUILD_ID: $\{{ steps.build_id.outputs.BUILD_ID }}
|
|
52
|
+
|
|
53
|
+
- name: Load SSH key
|
|
54
|
+
run: |
|
|
55
|
+
mkdir -p ~/.ssh
|
|
56
|
+
echo "$\{{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
|
|
57
|
+
chmod 600 ~/.ssh/deploy_key
|
|
58
|
+
ssh-keyscan -H "${EC2_HOST#*@}" >> ~/.ssh/known_hosts
|
|
59
|
+
env:
|
|
60
|
+
EC2_HOST: $\{{ secrets.EC2_HOST }}
|
|
61
|
+
|
|
62
|
+
- name: Sync production .env
|
|
63
|
+
env:
|
|
64
|
+
PROD_ENV: $\{{ secrets.PROD_ENV }}
|
|
65
|
+
EC2_HOST: $\{{ secrets.EC2_HOST }}
|
|
66
|
+
run: |
|
|
67
|
+
if [ -z "$PROD_ENV" ]; then
|
|
68
|
+
echo "PROD_ENV secret is empty — skipping env sync."
|
|
69
|
+
exit 0
|
|
70
|
+
fi
|
|
71
|
+
SSH_OPTS="-i ~/.ssh/deploy_key -o StrictHostKeyChecking=yes"
|
|
72
|
+
printf '%s' "$PROD_ENV" > /tmp/prod.env
|
|
73
|
+
rsync -az -e "ssh $SSH_OPTS" /tmp/prod.env "$EC2_HOST:/opt/{{projectName}}/.env"
|
|
74
|
+
shred -u /tmp/prod.env 2>/dev/null || rm -f /tmp/prod.env
|
|
75
|
+
ssh $SSH_OPTS "$EC2_HOST" \
|
|
76
|
+
"sudo chgrp {{projectName}} /opt/{{projectName}}/.env && sudo chmod 640 /opt/{{projectName}}/.env"
|
|
77
|
+
|
|
78
|
+
- name: Deploy to EC2
|
|
79
|
+
env:
|
|
80
|
+
EC2_HOST: $\{{ secrets.EC2_HOST }}
|
|
81
|
+
run: |
|
|
82
|
+
SSH_OPTS="-i ~/.ssh/deploy_key -o StrictHostKeyChecking=yes"
|
|
83
|
+
|
|
84
|
+
rsync -az --delete -e "ssh $SSH_OPTS" \
|
|
85
|
+
--exclude .env \
|
|
86
|
+
.next/standalone/ "$EC2_HOST:/opt/{{projectName}}/"
|
|
87
|
+
|
|
88
|
+
rsync -az -e "ssh $SSH_OPTS" \
|
|
89
|
+
.next/static/ "$EC2_HOST:/opt/{{projectName}}/.next/static/"
|
|
90
|
+
|
|
91
|
+
rsync -az -e "ssh $SSH_OPTS" \
|
|
92
|
+
public/ "$EC2_HOST:/opt/{{projectName}}/public/"
|
|
93
|
+
|
|
94
|
+
ssh $SSH_OPTS "$EC2_HOST" "
|
|
95
|
+
sudo systemctl restart {{projectName}}
|
|
96
|
+
sleep 5
|
|
97
|
+
sudo systemctl is-active --quiet {{projectName}} || { sudo journalctl -u {{projectName}} -n 30 --no-pager; exit 1; }
|
|
98
|
+
echo \"deployed build \$(cat /opt/{{projectName}}/.next/BUILD_ID)\"
|
|
99
|
+
"
|
|
100
|
+
|
|
101
|
+
- name: Smoke-test the deploy
|
|
102
|
+
env:
|
|
103
|
+
EC2_HOST: $\{{ secrets.EC2_HOST }}
|
|
104
|
+
run: |
|
|
105
|
+
SSH_OPTS="-i ~/.ssh/deploy_key -o StrictHostKeyChecking=yes"
|
|
106
|
+
ssh $SSH_OPTS "$EC2_HOST" \
|
|
107
|
+
"curl --fail --silent --show-error --max-time 10 http://127.0.0.1:3000/api/health > /dev/null && echo OK"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@import "@githat/ui/tokens.css";
|
|
1
2
|
{{#if useTailwind}}
|
|
2
3
|
@import "tailwindcss";
|
|
3
4
|
{{/if}}
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
body {
|
|
12
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
13
|
-
background: #09090b;
|
|
14
|
-
color: #fafafa;
|
|
13
|
+
font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
14
|
+
background: var(--bg, #09090b);
|
|
15
|
+
color: var(--fg, #fafafa);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
a {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GitHatProvider } from '@githat/nextjs';
|
|
2
|
+
import { Wordmark } from '@githat/ui';
|
|
2
3
|
import '@githat/nextjs/styles';
|
|
3
4
|
import './globals.css';
|
|
4
5
|
{{#if includeGithatFolder}}
|
|
@@ -25,7 +26,10 @@ export default function RootLayout({ children }{{#if typescript}}: { children: R
|
|
|
25
26
|
afterSignOutUrl: '/',
|
|
26
27
|
{{/if}}
|
|
27
28
|
}}>
|
|
28
|
-
{
|
|
29
|
+
<header style=\{{ padding: 'var(--space-4, 1rem) var(--space-6, 1.5rem)', borderBottom: '1px solid var(--border, #e5e7eb)' }}>
|
|
30
|
+
<Wordmark name="{{businessName}}" size="md" href="/" />
|
|
31
|
+
</header>
|
|
32
|
+
<main>{children}</main>
|
|
29
33
|
</GitHatProvider>
|
|
30
34
|
</body>
|
|
31
35
|
</html>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SignInButton, SignUpButton } from '@githat/nextjs';
|
|
2
|
+
import { Wordmark } from '@githat/ui';
|
|
2
3
|
|
|
3
4
|
const hasKey = !!process.env.NEXT_PUBLIC_GITHAT_PUBLISHABLE_KEY;
|
|
4
5
|
|
|
@@ -6,9 +7,7 @@ function SetupGuide() {
|
|
|
6
7
|
return (
|
|
7
8
|
<main {{#if useTailwind}}className="flex flex-col items-center justify-center min-h-screen gap-8 bg-[#09090b] text-[#fafafa] px-6"{{else}}style=\{{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', gap: '2rem', background: '#09090b', color: '#fafafa', padding: '0 1.5rem' }}{{/if}}>
|
|
8
9
|
<div {{#if useTailwind}}className="text-center"{{else}}style=\{{ textAlign: 'center' }}{{/if}}>
|
|
9
|
-
<
|
|
10
|
-
{{businessName}}
|
|
11
|
-
</h1>
|
|
10
|
+
<Wordmark name="{{businessName}}" size="xl" />
|
|
12
11
|
<p {{#if useTailwind}}className="text-zinc-400"{{else}}style=\{{ color: '#a1a1aa' }}{{/if}}>
|
|
13
12
|
Get started in 3 steps
|
|
14
13
|
</p>
|
|
@@ -58,9 +57,7 @@ export default function Home() {
|
|
|
58
57
|
|
|
59
58
|
return (
|
|
60
59
|
<main {{#if useTailwind}}className="flex flex-col items-center justify-center min-h-screen gap-6 bg-[#09090b] text-[#fafafa]"{{else}}style=\{{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', gap: '1.5rem', background: '#09090b', color: '#fafafa' }}{{/if}}>
|
|
61
|
-
<
|
|
62
|
-
Welcome to {{businessName}}
|
|
63
|
-
</h1>
|
|
60
|
+
<Wordmark name="{{businessName}}" size="xl" />
|
|
64
61
|
<p {{#if useTailwind}}className="text-zinc-400 max-w-lg text-center"{{else}}style=\{{ color: '#a1a1aa', maxWidth: '32rem', textAlign: 'center' }}{{/if}}>
|
|
65
62
|
{{description}}
|
|
66
63
|
</p>
|
|
@@ -27,20 +27,22 @@ function NotFound() {
|
|
|
27
27
|
|
|
28
28
|
export default function App() {
|
|
29
29
|
return (
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
<>
|
|
31
|
+
<Routes>
|
|
32
|
+
<Route path="/" element={<Home />} />
|
|
33
|
+
<Route path="/sign-in" element={<SignIn />} />
|
|
34
|
+
<Route path="/sign-up" element={<SignUp />} />
|
|
34
35
|
{{#if includeForgotPassword}}
|
|
35
|
-
|
|
36
|
+
<Route path="/forgot-password" element={<ForgotPassword />} />
|
|
36
37
|
{{/if}}
|
|
37
38
|
{{#if includeEmailVerification}}
|
|
38
|
-
|
|
39
|
+
<Route path="/verify-email" element={<VerifyEmail />} />
|
|
39
40
|
{{/if}}
|
|
40
41
|
{{#if includeDashboard}}
|
|
41
|
-
|
|
42
|
+
<Route path="/dashboard/*" element={<ProtectedRoute><Dashboard /></ProtectedRoute>} />
|
|
42
43
|
{{/if}}
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
<Route path="*" element={<NotFound />} />
|
|
45
|
+
</Routes>
|
|
46
|
+
</>
|
|
45
47
|
);
|
|
46
48
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@import "@githat/ui/tokens.css";
|
|
1
2
|
{{#if useTailwind}}
|
|
2
3
|
@import "tailwindcss";
|
|
3
4
|
{{/if}}
|
|
@@ -9,9 +10,9 @@
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
body {
|
|
12
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
13
|
-
background: #09090b;
|
|
14
|
-
color: #fafafa;
|
|
13
|
+
font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
|
|
14
|
+
background: var(--bg, #09090b);
|
|
15
|
+
color: var(--fg, #fafafa);
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
a {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SignInButton, SignUpButton } from '@githat/nextjs';
|
|
2
|
+
import { Wordmark } from '@githat/ui';
|
|
2
3
|
|
|
3
4
|
const hasKey = !!import.meta.env.VITE_GITHAT_PUBLISHABLE_KEY;
|
|
4
5
|
|
|
@@ -6,9 +7,7 @@ function SetupGuide() {
|
|
|
6
7
|
return (
|
|
7
8
|
<main {{#if useTailwind}}className="flex flex-col items-center justify-center min-h-screen gap-8 bg-[#09090b] text-[#fafafa] px-6"{{else}}style=\{{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', gap: '2rem', background: '#09090b', color: '#fafafa', padding: '0 1.5rem' }}{{/if}}>
|
|
8
9
|
<div {{#if useTailwind}}className="text-center"{{else}}style=\{{ textAlign: 'center' }}{{/if}}>
|
|
9
|
-
<
|
|
10
|
-
{{businessName}}
|
|
11
|
-
</h1>
|
|
10
|
+
<Wordmark name="{{businessName}}" size="xl" />
|
|
12
11
|
<p {{#if useTailwind}}className="text-zinc-400"{{else}}style=\{{ color: '#a1a1aa' }}{{/if}}>
|
|
13
12
|
Get started in 3 steps
|
|
14
13
|
</p>
|
|
@@ -58,9 +57,7 @@ export default function Home() {
|
|
|
58
57
|
|
|
59
58
|
return (
|
|
60
59
|
<main {{#if useTailwind}}className="flex flex-col items-center justify-center min-h-screen gap-6 bg-[#09090b] text-[#fafafa]"{{else}}style=\{{ display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', gap: '1.5rem', background: '#09090b', color: '#fafafa' }}{{/if}}>
|
|
61
|
-
<
|
|
62
|
-
Welcome to {{businessName}}
|
|
63
|
-
</h1>
|
|
60
|
+
<Wordmark name="{{businessName}}" size="xl" />
|
|
64
61
|
<p {{#if useTailwind}}className="text-zinc-400 max-w-lg text-center"{{else}}style=\{{ color: '#a1a1aa', maxWidth: '32rem', textAlign: 'center' }}{{/if}}>
|
|
65
62
|
{{description}}
|
|
66
63
|
</p>
|