create-githat-app 1.8.11 → 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 +45 -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
|
@@ -361,6 +361,51 @@ const reg = await getRegistration(operationId);
|
|
|
361
361
|
Registration is handled through AWS Route 53 Domains (backed by ICANN-accredited
|
|
362
362
|
registrars). WHOIS privacy protection is enabled by default.
|
|
363
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
|
+
|
|
364
409
|
## Learn More
|
|
365
410
|
|
|
366
411
|
- [GitHat Documentation](https://githat.io/docs)
|