create-githat-app 1.0.3 → 1.0.5
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 +283 -123
- package/package.json +1 -1
- package/templates/fullstack/apps-api-express/.env.example.hbs +6 -0
- package/templates/fullstack/apps-api-express/.env.local.hbs +6 -0
- package/templates/fullstack/apps-api-express/package.json.hbs +24 -0
- package/templates/fullstack/apps-api-express/src/index.ts.hbs +41 -0
- package/templates/fullstack/apps-api-express/src/routes/health.ts.hbs +11 -0
- package/templates/fullstack/apps-api-express/src/routes/users.ts.hbs +43 -0
- package/templates/fullstack/apps-api-express/tsconfig.json.hbs +16 -0
- package/templates/fullstack/apps-api-fastify/.env.example.hbs +6 -0
- package/templates/fullstack/apps-api-fastify/.env.local.hbs +6 -0
- package/templates/fullstack/apps-api-fastify/package.json.hbs +22 -0
- package/templates/fullstack/apps-api-fastify/src/index.ts.hbs +28 -0
- package/templates/fullstack/apps-api-fastify/src/routes/health.ts.hbs +11 -0
- package/templates/fullstack/apps-api-fastify/src/routes/users.ts.hbs +43 -0
- package/templates/fullstack/apps-api-fastify/tsconfig.json.hbs +16 -0
- package/templates/fullstack/apps-api-hono/.env.example.hbs +6 -0
- package/templates/fullstack/apps-api-hono/.env.local.hbs +6 -0
- package/templates/fullstack/apps-api-hono/package.json.hbs +22 -0
- package/templates/fullstack/apps-api-hono/src/index.ts.hbs +35 -0
- package/templates/fullstack/apps-api-hono/src/routes/health.ts.hbs +11 -0
- package/templates/fullstack/apps-api-hono/src/routes/users.ts.hbs +43 -0
- package/templates/fullstack/apps-api-hono/tsconfig.json.hbs +16 -0
- package/templates/fullstack/apps-web-nextjs/.env.example.hbs +5 -0
- package/templates/fullstack/apps-web-nextjs/.env.local.hbs +5 -0
- package/templates/fullstack/apps-web-nextjs/app/(auth)/forgot-password/page.tsx.hbs +11 -0
- package/templates/fullstack/apps-web-nextjs/app/(auth)/reset-password/page.tsx.hbs +39 -0
- package/templates/fullstack/apps-web-nextjs/app/(auth)/sign-in/page.tsx.hbs +9 -0
- package/templates/fullstack/apps-web-nextjs/app/(auth)/sign-up/page.tsx.hbs +9 -0
- package/templates/fullstack/apps-web-nextjs/app/(auth)/verify-email/page.tsx.hbs +11 -0
- package/templates/fullstack/apps-web-nextjs/app/dashboard/layout.tsx.hbs +15 -0
- package/templates/fullstack/apps-web-nextjs/app/dashboard/page.tsx.hbs +27 -0
- package/templates/fullstack/apps-web-nextjs/app/globals.css.hbs +20 -0
- package/templates/fullstack/apps-web-nextjs/app/layout.tsx.hbs +26 -0
- package/templates/fullstack/apps-web-nextjs/app/page.tsx.hbs +18 -0
- package/templates/fullstack/apps-web-nextjs/next.config.ts.hbs +15 -0
- package/templates/fullstack/apps-web-nextjs/package.json.hbs +33 -0
- package/templates/fullstack/apps-web-nextjs/postcss.config.mjs.hbs +9 -0
- package/templates/fullstack/apps-web-nextjs/tsconfig.json.hbs +21 -0
- package/templates/fullstack/root/.gitignore.hbs +42 -0
- package/templates/fullstack/root/githat.yaml.hbs +17 -0
- package/templates/fullstack/root/package.json.hbs +15 -0
- package/templates/fullstack/root/turbo.json.hbs +20 -0
- package/templates/nextjs/app/(auth)/reset-password/page.tsx.hbs +10 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SignInButton, SignUpButton } from '@githat/nextjs';
|
|
2
|
+
|
|
3
|
+
export default function Home() {
|
|
4
|
+
return (
|
|
5
|
+
<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
|
+
<h1 {{#if useTailwind}}className="text-4xl font-bold"{{else}}style=\{{ fontSize: '2.5rem', fontWeight: 700 }}{{/if}}>
|
|
7
|
+
Welcome to {{businessName}}
|
|
8
|
+
</h1>
|
|
9
|
+
<p {{#if useTailwind}}className="text-zinc-400 max-w-lg text-center"{{else}}style=\{{ color: '#a1a1aa', maxWidth: '32rem', textAlign: 'center' }}{{/if}}>
|
|
10
|
+
{{description}}
|
|
11
|
+
</p>
|
|
12
|
+
<div {{#if useTailwind}}className="flex gap-4"{{else}}style=\{{ display: 'flex', gap: '1rem' }}{{/if}}>
|
|
13
|
+
<SignInButton />
|
|
14
|
+
<SignUpButton />
|
|
15
|
+
</div>
|
|
16
|
+
</main>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NextConfig } from 'next';
|
|
2
|
+
|
|
3
|
+
const nextConfig: NextConfig = {
|
|
4
|
+
// Proxy API calls to the backend in development
|
|
5
|
+
async rewrites() {
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
source: '/api/:path*',
|
|
9
|
+
destination: `${process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3001'}/:path*`,
|
|
10
|
+
},
|
|
11
|
+
];
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default nextConfig;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@{{projectName}}/web",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "next dev --port 3000",
|
|
7
|
+
"build": "next build",
|
|
8
|
+
"start": "next start",
|
|
9
|
+
"lint": "next lint",
|
|
10
|
+
"typecheck": "tsc --noEmit"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@githat/nextjs": "^0.2.2",
|
|
14
|
+
"next": "^16.0.0",
|
|
15
|
+
"react": "^19.0.0",
|
|
16
|
+
"react-dom": "^19.0.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
{{#if typescript}}
|
|
20
|
+
"@types/node": "^22.0.0",
|
|
21
|
+
"@types/react": "^19.0.0",
|
|
22
|
+
"@types/react-dom": "^19.0.0",
|
|
23
|
+
"typescript": "^5.9.0",
|
|
24
|
+
{{/if}}
|
|
25
|
+
{{#if useTailwind}}
|
|
26
|
+
"@tailwindcss/postcss": "^4.0.0",
|
|
27
|
+
"postcss": "^8.4.0",
|
|
28
|
+
"tailwindcss": "^4.0.0"
|
|
29
|
+
{{else}}
|
|
30
|
+
"@types/node": "^22.0.0"
|
|
31
|
+
{{/if}}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "preserve",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [{ "name": "next" }],
|
|
17
|
+
"paths": { "@/*": ["./*"] }
|
|
18
|
+
},
|
|
19
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
20
|
+
"exclude": ["node_modules"]
|
|
21
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
.pnp
|
|
4
|
+
.pnp.js
|
|
5
|
+
|
|
6
|
+
# Build
|
|
7
|
+
dist/
|
|
8
|
+
.next/
|
|
9
|
+
out/
|
|
10
|
+
build/
|
|
11
|
+
|
|
12
|
+
# Turbo
|
|
13
|
+
.turbo/
|
|
14
|
+
|
|
15
|
+
# Environment
|
|
16
|
+
.env
|
|
17
|
+
.env.local
|
|
18
|
+
.env.*.local
|
|
19
|
+
|
|
20
|
+
# IDE
|
|
21
|
+
.idea/
|
|
22
|
+
.vscode/
|
|
23
|
+
*.swp
|
|
24
|
+
*.swo
|
|
25
|
+
|
|
26
|
+
# OS
|
|
27
|
+
.DS_Store
|
|
28
|
+
Thumbs.db
|
|
29
|
+
|
|
30
|
+
# Logs
|
|
31
|
+
*.log
|
|
32
|
+
npm-debug.log*
|
|
33
|
+
yarn-debug.log*
|
|
34
|
+
yarn-error.log*
|
|
35
|
+
pnpm-debug.log*
|
|
36
|
+
|
|
37
|
+
# Testing
|
|
38
|
+
coverage/
|
|
39
|
+
.nyc_output/
|
|
40
|
+
|
|
41
|
+
# TypeScript
|
|
42
|
+
*.tsbuildinfo
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 1
|
|
2
|
+
name: {{projectName}}
|
|
3
|
+
|
|
4
|
+
apps:
|
|
5
|
+
web:
|
|
6
|
+
type: {{framework}}
|
|
7
|
+
path: apps/web
|
|
8
|
+
domain: {{projectName}}.githat.io
|
|
9
|
+
env:
|
|
10
|
+
NEXT_PUBLIC_API_URL: $\{{apps.api.url}}
|
|
11
|
+
|
|
12
|
+
api:
|
|
13
|
+
type: {{backendFramework}}
|
|
14
|
+
path: apps/api
|
|
15
|
+
domain: api.{{projectName}}.githat.io
|
|
16
|
+
env:
|
|
17
|
+
GITHAT_PUBLISHABLE_KEY: $\{{secrets.GITHAT_PUBLISHABLE_KEY}}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"private": true,
|
|
4
|
+
"workspaces": ["apps/*", "packages/*"],
|
|
5
|
+
"scripts": {
|
|
6
|
+
"dev": "turbo dev",
|
|
7
|
+
"build": "turbo build",
|
|
8
|
+
"lint": "turbo lint",
|
|
9
|
+
"typecheck": "turbo typecheck"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"turbo": "^2.3.0"
|
|
13
|
+
},
|
|
14
|
+
"packageManager": "{{packageManager}}@10.9.2"
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://turbo.build/schema.json",
|
|
3
|
+
"ui": "tui",
|
|
4
|
+
"tasks": {
|
|
5
|
+
"build": {
|
|
6
|
+
"dependsOn": ["^build"],
|
|
7
|
+
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
|
|
8
|
+
},
|
|
9
|
+
"dev": {
|
|
10
|
+
"cache": false,
|
|
11
|
+
"persistent": true
|
|
12
|
+
},
|
|
13
|
+
"lint": {
|
|
14
|
+
"dependsOn": ["^lint"]
|
|
15
|
+
},
|
|
16
|
+
"typecheck": {
|
|
17
|
+
"dependsOn": ["^typecheck"]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{{#if includeForgotPassword}}
|
|
2
2
|
'use client';
|
|
3
3
|
|
|
4
|
-
import { useState } from 'react';
|
|
4
|
+
import { Suspense, useState } from 'react';
|
|
5
5
|
import { useSearchParams, useRouter } from 'next/navigation';
|
|
6
6
|
{{#if includeGithatFolder}}
|
|
7
7
|
import { authApi } from '../../../githat/api/auth{{#unless typescript}}.js{{/unless}}';
|
|
8
8
|
{{/if}}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
function ResetPasswordContent() {
|
|
11
11
|
const searchParams = useSearchParams();
|
|
12
12
|
const router = useRouter();
|
|
13
13
|
const token = searchParams.get('token');
|
|
@@ -95,4 +95,12 @@ export default function ResetPasswordPage() {
|
|
|
95
95
|
</main>
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
|
+
|
|
99
|
+
export default function ResetPasswordPage() {
|
|
100
|
+
return (
|
|
101
|
+
<Suspense fallback={<div {{#if useTailwind}}className="flex items-center justify-center min-h-screen bg-[#09090b] text-zinc-400"{{else}}style=\{{ display: 'flex', alignItems: 'center', justifyContent: 'center', minHeight: '100vh', background: '#09090b', color: '#a1a1aa' }}{{/if}}>Loading...</div>}>
|
|
102
|
+
<ResetPasswordContent />
|
|
103
|
+
</Suspense>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
98
106
|
{{/if}}
|