create-githat-app 1.8.10 → 1.8.12
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 +2 -2
- package/package.json +1 -1
- package/templates/base/README.md.hbs +125 -0
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.13.
|
|
24
|
+
"@githat/nextjs": "^0.13.9",
|
|
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.13.
|
|
39
|
+
"@githat/nextjs": "^0.13.9",
|
|
40
40
|
"@githat/ui": "^1.0.0"
|
|
41
41
|
},
|
|
42
42
|
devDependencies: {
|
package/package.json
CHANGED
|
@@ -281,6 +281,131 @@ const { allowed, reasons } = await testPolicy({
|
|
|
281
281
|
Manage policies visually at **Dashboard → Row-Level Security** or via `useRLS()`.
|
|
282
282
|
If no policy is set, all authenticated users have access (backwards-compatible default).
|
|
283
283
|
|
|
284
|
+
## Custom domains
|
|
285
|
+
|
|
286
|
+
GitHat can host your app on a custom domain you already own (Bring Your Own Domain)
|
|
287
|
+
or register a brand-new one for you through Route 53 Domains.
|
|
288
|
+
|
|
289
|
+
### Bring Your Own Domain (BYOD)
|
|
290
|
+
|
|
291
|
+
1. Go to **Dashboard → Domains** (or your app's **Domains** tab) and enter your domain.
|
|
292
|
+
2. GitHat detects your DNS provider (Route 53, Cloudflare, GoDaddy, Namecheap, or generic)
|
|
293
|
+
and returns the CNAME and TXT records you need to add.
|
|
294
|
+
3. If your domain is already in a Route 53 hosted zone GitHat manages, the records are
|
|
295
|
+
written automatically — no manual DNS steps needed.
|
|
296
|
+
4. GitHat polls every 5 minutes and advances through the onboarding stages automatically:
|
|
297
|
+
|
|
298
|
+
`pending_dns` → `dns_verified` → `cert_pending` → `cert_issued` → `cf_attaching` → `live`
|
|
299
|
+
|
|
300
|
+
You can embed the full wizard in your own UI using the SDK component:
|
|
301
|
+
|
|
302
|
+
```tsx
|
|
303
|
+
import { DomainOnboardingWizard } from '@githat/nextjs';
|
|
304
|
+
|
|
305
|
+
<DomainOnboardingWizard
|
|
306
|
+
appId={appId}
|
|
307
|
+
onLive={(domain) => console.log(`${domain} is live!`)}
|
|
308
|
+
/>
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Or drive it programmatically with the hook:
|
|
312
|
+
|
|
313
|
+
```ts
|
|
314
|
+
import { useDomains } from '@githat/nextjs';
|
|
315
|
+
|
|
316
|
+
const { addDomain, getStatus, checkDomain, removeDomain } = useDomains();
|
|
317
|
+
|
|
318
|
+
// Start onboarding
|
|
319
|
+
const result = await addDomain(appId, 'mystore.com');
|
|
320
|
+
// result.dnsRecords — show these to the user
|
|
321
|
+
// result.instructions.autoWrite — true if GitHat wrote DNS automatically
|
|
322
|
+
|
|
323
|
+
// Poll status
|
|
324
|
+
const status = await getStatus(appId, 'mystore.com');
|
|
325
|
+
// status.status — one of the stages above
|
|
326
|
+
|
|
327
|
+
// Trigger a manual DNS + cert poll cycle
|
|
328
|
+
await checkDomain(appId, 'mystore.com');
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Register a new domain
|
|
332
|
+
|
|
333
|
+
Check availability across multiple TLDs and register right from GitHat:
|
|
334
|
+
|
|
335
|
+
```ts
|
|
336
|
+
import { useDomains } from '@githat/nextjs';
|
|
337
|
+
|
|
338
|
+
const { checkAvailability, registerDomain, getRegistration } = useDomains();
|
|
339
|
+
|
|
340
|
+
// Check availability + pricing
|
|
341
|
+
const { domains } = await checkAvailability('mystore', ['com', 'io', 'co']);
|
|
342
|
+
// domains[0] → { domain, available, awsPriceUsd, platformFeeUsd, totalUsd }
|
|
343
|
+
|
|
344
|
+
// Register (auto-starts BYOD onboarding after the domain propagates)
|
|
345
|
+
const { operationId } = await registerDomain({
|
|
346
|
+
domain: 'mystore.com',
|
|
347
|
+
autoRenew: true,
|
|
348
|
+
contactInfo: {
|
|
349
|
+
firstName: 'Jane', lastName: 'Doe',
|
|
350
|
+
email: 'jane@example.com', phoneNumber: '+1.5555550100',
|
|
351
|
+
address: '123 Main St', city: 'Seattle',
|
|
352
|
+
state: 'WA', countryCode: 'US', zipCode: '98101',
|
|
353
|
+
},
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
// Poll registration status
|
|
357
|
+
const reg = await getRegistration(operationId);
|
|
358
|
+
// reg.status — 'SUBMITTED' | 'IN_PROGRESS' | 'SUCCESSFUL' | 'FAILED'
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Registration is handled through AWS Route 53 Domains (backed by ICANN-accredited
|
|
362
|
+
registrars). WHOIS privacy protection is enabled by default.
|
|
363
|
+
|
|
364
|
+
## Built-in analytics
|
|
365
|
+
|
|
366
|
+
Every GitHat app ships with a read-side analytics API. Surface it in your admin
|
|
367
|
+
pages using the `useAnalytics()` hook — no additional setup required:
|
|
368
|
+
|
|
369
|
+
```{{#if typescript}}tsx{{else}}jsx{{/if}}
|
|
370
|
+
import { useAnalytics } from '@githat/nextjs';
|
|
371
|
+
|
|
372
|
+
const { getOverview, getTimeSeries, getTopUsers, getFunnels } = useAnalytics(appId);
|
|
373
|
+
|
|
374
|
+
// Last-30-days KPIs
|
|
375
|
+
const { signups, signins, apiCalls, storageMb } = await getOverview();
|
|
376
|
+
|
|
377
|
+
// Day-by-day sign-in trend
|
|
378
|
+
const { points } = await getTimeSeries({ metric: 'signins', granularity: 'day' });
|
|
379
|
+
|
|
380
|
+
// Top users by activity
|
|
381
|
+
const { users } = await getTopUsers({ metric: 'signins', limit: 10 });
|
|
382
|
+
|
|
383
|
+
// Conversion funnel: visitor → signup → email_verified → first_signin → mfa_enabled
|
|
384
|
+
const { funnel } = await getFunnels();
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Drop in the ready-made dashboard component (KPI cards + SVG chart + funnel + top-users
|
|
388
|
+
table — zero external chart dependencies):
|
|
389
|
+
|
|
390
|
+
```{{#if typescript}}tsx{{else}}jsx{{/if}}
|
|
391
|
+
import { AnalyticsDashboard } from '@githat/nextjs';
|
|
392
|
+
|
|
393
|
+
<AnalyticsDashboard appId={appId} />
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
For org-wide KPIs (number of apps, total API calls, billing tier):
|
|
397
|
+
|
|
398
|
+
```{{#if typescript}}tsx{{else}}jsx{{/if}}
|
|
399
|
+
import { useOrgAnalytics } from '@githat/nextjs';
|
|
400
|
+
|
|
401
|
+
const { getOverview } = useOrgAnalytics(org.id);
|
|
402
|
+
const { numApps, activeUsers, billingTier } = await getOverview();
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Analytics endpoints live under `/analytics/*` and require an authenticated
|
|
406
|
+
org-admin JWT. They are read-only and cache the overview for 60 seconds
|
|
407
|
+
in Lambda memory — free-tier-safe with no extra infrastructure.
|
|
408
|
+
|
|
284
409
|
## Learn More
|
|
285
410
|
|
|
286
411
|
- [GitHat Documentation](https://githat.io/docs)
|