create-githat-app 0.1.1 → 0.5.0
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/LICENSE +18 -0
- package/README.md +215 -160
- package/bin/index.js +2 -3
- package/dist/cli.js +1231 -0
- package/package.json +27 -7
- package/templates/base/.env.example.hbs +13 -0
- package/templates/base/.env.local.hbs +10 -0
- package/templates/base/.gitignore.hbs +11 -0
- package/templates/base/README.md.hbs +94 -0
- package/templates/base/githat/api/agents.ts.hbs +17 -0
- package/templates/base/githat/api/auth.ts.hbs +38 -0
- package/templates/base/githat/api/client.ts.hbs +92 -0
- package/templates/base/githat/api/mcp.ts.hbs +21 -0
- package/templates/base/githat/api/orgs.ts.hbs +34 -0
- package/templates/base/githat/api/types.ts.hbs +70 -0
- package/templates/base/githat/api/users.ts.hbs +14 -0
- package/templates/base/githat/auth/guard.tsx.hbs +53 -0
- package/templates/base/githat/auth/index.ts.hbs +3 -0
- package/templates/base/githat/config.ts.hbs +18 -0
- package/templates/base/githat/dashboard/agents.tsx.hbs +121 -0
- package/templates/base/githat/dashboard/apps.tsx.hbs +53 -0
- package/templates/base/githat/dashboard/layout.tsx.hbs +83 -0
- package/templates/base/githat/dashboard/mcp-servers.tsx.hbs +111 -0
- package/templates/base/githat/dashboard/members.tsx.hbs +123 -0
- package/templates/base/githat/dashboard/overview.tsx.hbs +37 -0
- package/templates/base/githat/dashboard/settings.tsx.hbs +87 -0
- package/templates/nextjs/app/(auth)/forgot-password/page.tsx.hbs +63 -0
- package/templates/nextjs/app/(auth)/reset-password/page.tsx.hbs +98 -0
- package/templates/nextjs/app/(auth)/sign-in/page.tsx.hbs +9 -0
- package/templates/nextjs/app/(auth)/sign-up/page.tsx.hbs +9 -0
- package/templates/nextjs/app/(auth)/verify-email/page.tsx.hbs +58 -0
- package/templates/nextjs/app/dashboard/agents/page.tsx.hbs +9 -0
- package/templates/nextjs/app/dashboard/apps/page.tsx.hbs +9 -0
- package/templates/nextjs/app/dashboard/layout.tsx.hbs +28 -0
- package/templates/nextjs/app/dashboard/mcp/page.tsx.hbs +9 -0
- package/templates/nextjs/app/dashboard/members/page.tsx.hbs +9 -0
- package/templates/nextjs/app/dashboard/page.tsx.hbs +30 -0
- package/templates/nextjs/app/dashboard/settings/page.tsx.hbs +9 -0
- package/templates/nextjs/app/globals.css.hbs +20 -0
- package/templates/nextjs/app/layout.tsx.hbs +33 -0
- package/templates/nextjs/app/page.tsx.hbs +73 -0
- package/templates/nextjs/next.config.ts.hbs +5 -0
- package/templates/nextjs/postcss.config.mjs.hbs +9 -0
- package/templates/nextjs/proxy.ts.hbs +10 -0
- package/templates/nextjs/tsconfig.json.hbs +21 -0
- package/templates/react-vite/index.html.hbs +12 -0
- package/templates/react-vite/src/App.tsx.hbs +46 -0
- package/templates/react-vite/src/index.css.hbs +20 -0
- package/templates/react-vite/src/main.tsx.hbs +30 -0
- package/templates/react-vite/src/pages/Dashboard.tsx.hbs +68 -0
- package/templates/react-vite/src/pages/ForgotPassword.tsx.hbs +58 -0
- package/templates/react-vite/src/pages/Home.tsx.hbs +73 -0
- package/templates/react-vite/src/pages/SignIn.tsx.hbs +9 -0
- package/templates/react-vite/src/pages/SignUp.tsx.hbs +9 -0
- package/templates/react-vite/src/pages/VerifyEmail.tsx.hbs +51 -0
- package/templates/react-vite/tsconfig.json.hbs +16 -0
- package/templates/react-vite/vite.config.ts.hbs +14 -0
- package/src/cli.js +0 -131
- package/src/scaffold.js +0 -529
- package/src/templates/components.js +0 -97
- package/src/templates/index.js +0 -172
- package/src/templates/pages.js +0 -471
- package/src/templates/react.js +0 -191
package/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GitHat. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and associated documentation files (the "Software") are the
|
|
6
|
+
proprietary property of GitHat. You may use the hosted GitHat service at
|
|
7
|
+
https://githat.io subject to the terms published there.
|
|
8
|
+
|
|
9
|
+
You may NOT copy, modify, merge, publish, distribute, sublicense, or sell
|
|
10
|
+
copies of the Software, or permit others to do so, without the prior written
|
|
11
|
+
permission of GitHat.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
16
|
+
GITHAT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
17
|
+
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
18
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,223 +1,278 @@
|
|
|
1
1
|
# create-githat-app
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Scaffold a production-ready app with a fully-managed backend — auth, teams, orgs, API keys, MCP verification, and AI agent identity. **No backend to deploy.**
|
|
4
4
|
|
|
5
|
-
`create-githat-app`
|
|
5
|
+
[GitHat](https://githat.io) is your backend. When you run `create-githat-app`, your generated project connects to GitHat's hosted platform at `api.githat.io`. User accounts, organizations, teams, API keys, MCP servers, and AI agents are all stored and managed by GitHat. You write frontend code only.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
[](https://github.com/GitHat-IO/create-githat-app/blob/main/LICENSE)
|
|
7
|
+
## Install & Launch
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Quick Start
|
|
9
|
+
Run one command from anywhere:
|
|
13
10
|
|
|
14
11
|
```bash
|
|
15
|
-
npx create-githat-app
|
|
12
|
+
npx create-githat-app
|
|
16
13
|
```
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
Or with a project name:
|
|
19
16
|
|
|
20
17
|
```bash
|
|
21
|
-
|
|
22
|
-
npm run dev
|
|
18
|
+
npx create-githat-app my-app
|
|
23
19
|
```
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
Or install globally:
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
```bash
|
|
24
|
+
npm i -g create-githat-app
|
|
25
|
+
create-githat-app my-app
|
|
26
|
+
```
|
|
28
27
|
|
|
29
|
-
|
|
28
|
+
The CLI launches an interactive wizard that walks you through every decision.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
## How It Works
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
- **Forgot / Reset Password** — Complete recovery flow
|
|
35
|
-
- **Protected Routes** — Middleware (Next.js) or route guards (React)
|
|
36
|
-
- **Dashboard** — Sidebar navigation, responsive layout
|
|
37
|
-
- **Settings** — Profile editing, avatar upload, password change
|
|
38
|
-
- **Team Management** — Invite members, change roles, remove users
|
|
39
|
-
- **API Keys** — Create apps, view and copy publishable/secret keys
|
|
40
|
-
- **Email Verification** — Banner prompting unverified users
|
|
41
|
-
- **Org Switcher** — Switch between organizations seamlessly
|
|
42
|
-
- **Dark Theme** — Beautiful dark UI, responsive on all devices
|
|
32
|
+
### Step 1 — Answer the prompts
|
|
43
33
|
|
|
44
|
-
|
|
34
|
+
The CLI asks you a series of questions:
|
|
45
35
|
|
|
46
|
-
|
|
36
|
+
```
|
|
37
|
+
◆ Project name?
|
|
38
|
+
│ my-saas-app
|
|
39
|
+
│
|
|
40
|
+
◆ Business name?
|
|
41
|
+
│ Acme Corp
|
|
42
|
+
│
|
|
43
|
+
◆ Framework?
|
|
44
|
+
│ ● Next.js 16 (App Router)
|
|
45
|
+
│ ○ React 19 + Vite 7
|
|
46
|
+
│
|
|
47
|
+
◆ Language?
|
|
48
|
+
│ ● TypeScript
|
|
49
|
+
│ ○ JavaScript
|
|
50
|
+
│
|
|
51
|
+
◆ Package manager?
|
|
52
|
+
│ ● npm
|
|
53
|
+
│ ○ yarn
|
|
54
|
+
│ ○ pnpm
|
|
55
|
+
│ ○ bun
|
|
56
|
+
│
|
|
57
|
+
◆ GitHat publishable key?
|
|
58
|
+
│ pk_live_abc123...
|
|
59
|
+
│
|
|
60
|
+
◆ Auth features to include?
|
|
61
|
+
│ ◻ Forgot password
|
|
62
|
+
│ ◻ Email verification
|
|
63
|
+
│ ◻ Organization management
|
|
64
|
+
│ ◻ MCP server identity
|
|
65
|
+
│ ◻ AI agent identity
|
|
66
|
+
│
|
|
67
|
+
◆ Database?
|
|
68
|
+
│ ● None
|
|
69
|
+
│ ○ Prisma + PostgreSQL
|
|
70
|
+
│ ○ Prisma + MySQL
|
|
71
|
+
│ ○ Drizzle + PostgreSQL
|
|
72
|
+
│ ○ Drizzle + SQLite
|
|
73
|
+
│
|
|
74
|
+
◆ Include Tailwind CSS 4?
|
|
75
|
+
│ ● Yes ○ No
|
|
76
|
+
│
|
|
77
|
+
◆ Include platform dashboard?
|
|
78
|
+
│ ● Yes ○ No
|
|
79
|
+
│
|
|
80
|
+
◆ Initialize git repository?
|
|
81
|
+
│ ● Yes ○ No
|
|
82
|
+
│
|
|
83
|
+
◆ Install dependencies now?
|
|
84
|
+
│ ● Yes ○ No
|
|
85
|
+
```
|
|
47
86
|
|
|
48
|
-
|
|
87
|
+
### Step 2 — Project is generated
|
|
49
88
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
89
|
+
```
|
|
90
|
+
◇ Project structure created
|
|
91
|
+
◇ package.json generated
|
|
92
|
+
◇ Git repository initialized
|
|
93
|
+
◇ Dependencies installed
|
|
54
94
|
|
|
55
|
-
|
|
95
|
+
◇ Setup complete!
|
|
96
|
+
```
|
|
56
97
|
|
|
57
|
-
|
|
98
|
+
### Step 3 — Start building
|
|
58
99
|
|
|
59
100
|
```bash
|
|
60
|
-
|
|
101
|
+
cd my-saas-app
|
|
102
|
+
npm run dev
|
|
61
103
|
```
|
|
62
104
|
|
|
63
|
-
|
|
64
|
-
|---------------------------|------------------------------------------------------|
|
|
65
|
-
| `project-name` | Directory name for your app (prompted if omitted) |
|
|
66
|
-
| `--js` | Use JavaScript instead of TypeScript (Next.js only) |
|
|
67
|
-
| `--key <publishable_key>` | Set your GitHat publishable key upfront |
|
|
105
|
+
Your app is running at `http://localhost:3000` with auth, dashboard, and the full GitHat platform wired up.
|
|
68
106
|
|
|
69
|
-
|
|
107
|
+
## CLI Flags
|
|
70
108
|
|
|
71
|
-
|
|
72
|
-
# Interactive — prompts for everything
|
|
73
|
-
npx create-githat-app
|
|
109
|
+
Skip prompts with flags:
|
|
74
110
|
|
|
75
|
-
|
|
76
|
-
|
|
111
|
+
```bash
|
|
112
|
+
# Use JavaScript instead of TypeScript
|
|
113
|
+
npx create-githat-app my-app --js
|
|
77
114
|
|
|
78
|
-
#
|
|
79
|
-
npx create-githat-app my-app --
|
|
80
|
-
```
|
|
115
|
+
# Use TypeScript (default)
|
|
116
|
+
npx create-githat-app my-app --ts
|
|
81
117
|
|
|
82
|
-
|
|
118
|
+
# Pass your publishable key directly
|
|
119
|
+
npx create-githat-app my-app --key pk_live_abc123
|
|
83
120
|
|
|
84
|
-
|
|
121
|
+
# Combine flags
|
|
122
|
+
npx create-githat-app my-app --js --key pk_live_abc123
|
|
85
123
|
|
|
86
|
-
|
|
124
|
+
# Show help
|
|
125
|
+
npx create-githat-app --help
|
|
87
126
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
4. **Publishable key** — optional; you can add it to `.env` later
|
|
92
|
-
5. **Features** — multi-select the pages you want:
|
|
93
|
-
- Dashboard
|
|
94
|
-
- Settings (profile, avatar, password)
|
|
95
|
-
- Team management (invites, roles)
|
|
96
|
-
- Apps (API key management)
|
|
97
|
-
- Forgot Password (recovery flow)
|
|
127
|
+
# Show version
|
|
128
|
+
npx create-githat-app --version
|
|
129
|
+
```
|
|
98
130
|
|
|
99
|
-
|
|
131
|
+
## What You Get
|
|
100
132
|
|
|
101
|
-
|
|
133
|
+
A production-ready project connected to GitHat's hosted backend:
|
|
102
134
|
|
|
103
|
-
|
|
135
|
+
- **Fully-managed backend** — `api.githat.io` handles auth, orgs, teams, API keys, agents, MCP
|
|
136
|
+
- **Auth pages** — sign-in, sign-up, forgot password, email verification
|
|
137
|
+
- **Protected dashboard** — sidebar navigation, org switcher, user button
|
|
138
|
+
- **`@githat/nextjs` SDK** — `<GitHatProvider>`, `<ProtectedRoute>`, `useAuth()`
|
|
139
|
+
- **`githat/` platform folder** — typed API client for all 42+ backend endpoints
|
|
140
|
+
- **Dark theme** — zinc/purple design system out of the box
|
|
141
|
+
- **Database ready** — Prisma or Drizzle for your app's own data (optional)
|
|
142
|
+
- **Tailwind CSS 4** — utility-first styling (optional)
|
|
104
143
|
|
|
105
|
-
|
|
144
|
+
## The `githat/` Folder
|
|
106
145
|
|
|
107
|
-
|
|
108
|
-
my-app/
|
|
109
|
-
├── app/
|
|
110
|
-
│ ├── layout.tsx # GitHatProvider wrapper
|
|
111
|
-
│ ├── page.tsx # Home with sign-in/up buttons
|
|
112
|
-
│ ├── globals.css
|
|
113
|
-
│ ├── middleware.ts # Auth route protection
|
|
114
|
-
│ ├── (auth)/
|
|
115
|
-
│ │ ├── sign-in/page.tsx
|
|
116
|
-
│ │ ├── sign-up/page.tsx
|
|
117
|
-
│ │ ├── forgot-password/page.tsx
|
|
118
|
-
│ │ └── reset-password/page.tsx
|
|
119
|
-
│ └── dashboard/
|
|
120
|
-
│ ├── layout.tsx # Protected layout + sidebar
|
|
121
|
-
│ ├── page.tsx
|
|
122
|
-
│ ├── settings/page.tsx
|
|
123
|
-
│ ├── team/page.tsx
|
|
124
|
-
│ └── apps/page.tsx
|
|
125
|
-
├── .env.local
|
|
126
|
-
├── .env.example
|
|
127
|
-
├── package.json
|
|
128
|
-
└── next.config.mjs
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### React (Vite)
|
|
132
|
-
|
|
133
|
-
```text
|
|
134
|
-
my-app/
|
|
135
|
-
├── src/
|
|
136
|
-
│ ├── main.jsx # BrowserRouter + GitHatProvider
|
|
137
|
-
│ ├── App.jsx # Route definitions
|
|
138
|
-
│ ├── pages/
|
|
139
|
-
│ │ ├── Home.jsx
|
|
140
|
-
│ │ ├── SignIn.jsx
|
|
141
|
-
│ │ ├── SignUp.jsx
|
|
142
|
-
│ │ ├── Dashboard.jsx
|
|
143
|
-
│ │ ├── DashboardLayout.jsx
|
|
144
|
-
│ │ ├── Settings.jsx
|
|
145
|
-
│ │ ├── Team.jsx
|
|
146
|
-
│ │ ├── Apps.jsx
|
|
147
|
-
│ │ ├── ForgotPassword.jsx
|
|
148
|
-
│ │ └── ResetPassword.jsx
|
|
149
|
-
│ └── components/
|
|
150
|
-
│ ├── Sidebar.jsx
|
|
151
|
-
│ └── VerifyEmailBanner.jsx
|
|
152
|
-
├── .env
|
|
153
|
-
├── .env.example
|
|
154
|
-
├── index.html
|
|
155
|
-
└── vite.config.js
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
---
|
|
159
|
-
|
|
160
|
-
## Configuration
|
|
161
|
-
|
|
162
|
-
After scaffolding, add your GitHat publishable key to the environment file:
|
|
163
|
-
|
|
164
|
-
**Next.js** — `.env.local`
|
|
146
|
+
Your generated project includes a `githat/` directory — a local integration layer between your app and the GitHat platform API:
|
|
165
147
|
|
|
166
|
-
```
|
|
167
|
-
|
|
148
|
+
```
|
|
149
|
+
githat/
|
|
150
|
+
config.ts # Central configuration (env vars, feature flags)
|
|
151
|
+
api/
|
|
152
|
+
client.ts # Typed fetch wrapper with token refresh
|
|
153
|
+
types.ts # TypeScript interfaces for all API responses
|
|
154
|
+
auth.ts # Login, register, forgot password, verify email
|
|
155
|
+
orgs.ts # Create/update orgs, invite/remove members
|
|
156
|
+
users.ts # List orgs, switch org
|
|
157
|
+
mcp.ts # Register/verify MCP servers
|
|
158
|
+
agents.ts # Register/verify AI agent wallets
|
|
159
|
+
auth/
|
|
160
|
+
guard.tsx # Role-based route protection component
|
|
161
|
+
index.ts # Auth exports
|
|
162
|
+
dashboard/
|
|
163
|
+
layout.tsx # Dashboard shell with sidebar navigation
|
|
164
|
+
overview.tsx # Stats overview page
|
|
165
|
+
apps.tsx # App + API key management
|
|
166
|
+
members.tsx # Invite members, manage roles, remove
|
|
167
|
+
settings.tsx # Edit org name, brand color, save
|
|
168
|
+
mcp-servers.tsx # Register MCP servers, verify, remove
|
|
169
|
+
agents.tsx # Register AI agent wallets, verify, remove
|
|
168
170
|
```
|
|
169
171
|
|
|
170
|
-
|
|
172
|
+
All API calls go to `api.githat.io`. The client handles auth tokens and automatic refresh.
|
|
171
173
|
|
|
172
|
-
|
|
173
|
-
VITE_GITHAT_PUBLISHABLE_KEY=pk_live_your_key_here
|
|
174
|
-
```
|
|
174
|
+
## Your Backend is GitHat
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
You don't deploy or maintain a backend. GitHat's hosted platform handles:
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
- **Authentication** — sign-up, sign-in, email verification, password reset
|
|
179
|
+
- **Organizations** — create, switch, branding, custom domains
|
|
180
|
+
- **Team management** — invite members by email, assign roles (owner/admin/member), remove
|
|
181
|
+
- **API key management** — publishable + secret keys per app, rotation
|
|
182
|
+
- **MCP server registration** — domain verification via DNS TXT, OAuth2 credentials
|
|
183
|
+
- **AI agent registration** — Ethereum wallet verification, challenge-response tokens
|
|
184
|
+
- **Email delivery** — verification emails, invitations, password resets (via AWS SES)
|
|
185
|
+
- **Database** — users, orgs, teams, apps, agents, MCP servers (DynamoDB, managed by GitHat)
|
|
186
|
+
- **Public verification** — anyone can verify an agent or MCP server at `githat.io/verify/`
|
|
179
187
|
|
|
180
|
-
|
|
188
|
+
Your data lives in GitHat's infrastructure. You write frontend code, GitHat handles the rest.
|
|
181
189
|
|
|
182
|
-
##
|
|
190
|
+
## Three Identity Types
|
|
183
191
|
|
|
184
|
-
|
|
185
|
-
2. Create an organization (or use your default one)
|
|
186
|
-
3. Navigate to **Apps** in the dashboard
|
|
187
|
-
4. Create a new app and copy the **Publishable Key**
|
|
188
|
-
5. Paste it into your `.env.local` or `.env` file
|
|
192
|
+
GitHat supports three types of identity in a single platform:
|
|
189
193
|
|
|
190
|
-
|
|
194
|
+
| Type | Auth Method | Dashboard Page |
|
|
195
|
+
| --------------- | -------------------------- | -------------- |
|
|
196
|
+
| **Humans** | Email + password | Members |
|
|
197
|
+
| **MCP Servers** | Domain verification | MCP Servers |
|
|
198
|
+
| **AI Agents** | Ethereum wallet signatures | AI Agents |
|
|
199
|
+
|
|
200
|
+
## Project Structure
|
|
191
201
|
|
|
192
|
-
|
|
202
|
+
### Next.js 16
|
|
193
203
|
|
|
194
|
-
|
|
204
|
+
```
|
|
205
|
+
my-app/
|
|
206
|
+
app/
|
|
207
|
+
layout.tsx
|
|
208
|
+
page.tsx
|
|
209
|
+
globals.css
|
|
210
|
+
(auth)/
|
|
211
|
+
sign-in/page.tsx
|
|
212
|
+
sign-up/page.tsx
|
|
213
|
+
forgot-password/page.tsx
|
|
214
|
+
verify-email/page.tsx
|
|
215
|
+
dashboard/
|
|
216
|
+
layout.tsx
|
|
217
|
+
page.tsx
|
|
218
|
+
apps/page.tsx
|
|
219
|
+
members/page.tsx
|
|
220
|
+
settings/page.tsx
|
|
221
|
+
mcp/page.tsx
|
|
222
|
+
agents/page.tsx
|
|
223
|
+
githat/
|
|
224
|
+
...
|
|
225
|
+
middleware.ts
|
|
226
|
+
next.config.ts
|
|
227
|
+
.env.local
|
|
228
|
+
```
|
|
195
229
|
|
|
196
|
-
|
|
230
|
+
### React 19 + Vite 7
|
|
197
231
|
|
|
198
|
-
|
|
199
|
-
-
|
|
200
|
-
|
|
232
|
+
```
|
|
233
|
+
my-app/
|
|
234
|
+
src/
|
|
235
|
+
main.tsx
|
|
236
|
+
App.tsx
|
|
237
|
+
index.css
|
|
238
|
+
pages/
|
|
239
|
+
Home.tsx
|
|
240
|
+
SignIn.tsx
|
|
241
|
+
SignUp.tsx
|
|
242
|
+
ForgotPassword.tsx
|
|
243
|
+
VerifyEmail.tsx
|
|
244
|
+
Dashboard.tsx
|
|
245
|
+
githat/
|
|
246
|
+
...
|
|
247
|
+
index.html
|
|
248
|
+
vite.config.ts
|
|
249
|
+
.env.local
|
|
250
|
+
```
|
|
201
251
|
|
|
202
|
-
|
|
252
|
+
## Environment Variables
|
|
203
253
|
|
|
204
|
-
|
|
205
|
-
- `react` / `react-dom` — React
|
|
206
|
-
- `react-router-dom` — Client-side routing
|
|
207
|
-
- `vite` / `@vitejs/plugin-react` — Build tooling
|
|
254
|
+
Generated `.env.local`:
|
|
208
255
|
|
|
209
|
-
|
|
256
|
+
```env
|
|
257
|
+
# Next.js
|
|
258
|
+
NEXT_PUBLIC_GITHAT_PUBLISHABLE_KEY=pk_live_...
|
|
259
|
+
NEXT_PUBLIC_GITHAT_API_URL=https://api.githat.io
|
|
210
260
|
|
|
211
|
-
|
|
261
|
+
# React/Vite
|
|
262
|
+
VITE_GITHAT_PUBLISHABLE_KEY=pk_live_...
|
|
263
|
+
VITE_GITHAT_API_URL=https://api.githat.io
|
|
264
|
+
```
|
|
212
265
|
|
|
213
|
-
|
|
214
|
-
- **SDK Documentation** — [@githat/nextjs on npm](https://www.npmjs.com/package/@githat/nextjs)
|
|
215
|
-
- **CLI on npm** — [create-githat-app](https://www.npmjs.com/package/create-githat-app)
|
|
216
|
-
- **GitHub** — [GitHat-IO/create-githat-app](https://github.com/GitHat-IO/create-githat-app)
|
|
217
|
-
- **Report Issues** — [GitHub Issues](https://github.com/GitHat-IO/create-githat-app/issues)
|
|
266
|
+
## Contributing
|
|
218
267
|
|
|
219
|
-
|
|
268
|
+
```bash
|
|
269
|
+
git clone https://github.com/GitHat-IO/create-githat-app.git
|
|
270
|
+
cd create-githat-app
|
|
271
|
+
npm install
|
|
272
|
+
npm run build
|
|
273
|
+
node bin/index.js test-app
|
|
274
|
+
```
|
|
220
275
|
|
|
221
276
|
## License
|
|
222
277
|
|
|
223
|
-
|
|
278
|
+
MIT
|
package/bin/index.js
CHANGED