mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Remove GitHub Actions and SEO addons
This commit is contained in:
5
.changeset/fluffy-schools-speak.md
Normal file
5
.changeset/fluffy-schools-speak.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"create-better-t-stack": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Remove GitHub Actions and SEO addons
|
||||||
@@ -42,8 +42,6 @@ Options:
|
|||||||
--auth Include authentication
|
--auth Include authentication
|
||||||
--no-auth Disable authentication
|
--no-auth Disable authentication
|
||||||
--docker Include Docker setup
|
--docker Include Docker setup
|
||||||
--github-actions Add GitHub Actions workflows
|
|
||||||
--seo Configure SEO optimizations
|
|
||||||
--git Initialize a new git repo (default)
|
--git Initialize a new git repo (default)
|
||||||
--no-git Skip git initialization
|
--no-git Skip git initialization
|
||||||
--npm Use npm as package manager
|
--npm Use npm as package manager
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ export const DEFAULT_CONFIG: ProjectConfig = {
|
|||||||
|
|
||||||
export const dependencyVersionMap = {
|
export const dependencyVersionMap = {
|
||||||
// Authentication
|
// Authentication
|
||||||
"better-auth": "^1.1.16",
|
"better-auth": "^1.2.4",
|
||||||
|
|
||||||
// Database - Drizzle
|
// Database - Drizzle
|
||||||
"drizzle-orm": "^0.38.4",
|
"drizzle-orm": "^0.38.4",
|
||||||
"drizzle-kit": "^0.30.4",
|
"drizzle-kit": "^0.30.5",
|
||||||
|
|
||||||
// Database - SQLite/PostgreSQL
|
// Database - SQLite/PostgreSQL
|
||||||
"@libsql/client": "^0.14.0",
|
"@libsql/client": "^0.14.0",
|
||||||
|
|||||||
@@ -6,19 +6,6 @@ export async function setupAddons(projectDir: string, addons: ProjectAddons[]) {
|
|||||||
if (addons.includes("docker")) {
|
if (addons.includes("docker")) {
|
||||||
await setupDocker(projectDir);
|
await setupDocker(projectDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addons.includes("github-actions")) {
|
|
||||||
await setupGithubActions(projectDir);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (addons.includes("SEO")) {
|
|
||||||
// log.info(
|
|
||||||
// pc.yellow(
|
|
||||||
// "SEO feature is still a work-in-progress and will be available in a future update.",
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
await setupSEO(projectDir);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setupDocker(projectDir: string) {
|
async function setupDocker(projectDir: string) {
|
||||||
@@ -103,181 +90,3 @@ node_modules
|
|||||||
dockerignoreContent,
|
dockerignoreContent,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setupGithubActions(projectDir: string) {
|
|
||||||
const workflowsDir = path.join(projectDir, ".github/workflows");
|
|
||||||
await fs.ensureDir(workflowsDir);
|
|
||||||
|
|
||||||
const ciWorkflowContent = `name: CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Type check
|
|
||||||
run: npm run check-types
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: npm run build
|
|
||||||
`;
|
|
||||||
|
|
||||||
const deployWorkflowContent = `name: Deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
# Enable manual trigger
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
cache: 'npm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
# Add your deployment steps here
|
|
||||||
# This is just a placeholder for your actual deployment logic
|
|
||||||
- name: Deploy
|
|
||||||
run: echo "Add your deployment commands here"
|
|
||||||
`;
|
|
||||||
|
|
||||||
await fs.writeFile(path.join(workflowsDir, "ci.yml"), ciWorkflowContent);
|
|
||||||
await fs.writeFile(
|
|
||||||
path.join(workflowsDir, "deploy.yml"),
|
|
||||||
deployWorkflowContent,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function setupSEO(projectDir: string) {
|
|
||||||
const robotsContent = `# Instructions: Customize this file to control how search engines crawl your site
|
|
||||||
# Learn more: https://developers.google.com/search/docs/advanced/robots/create-robots-txt
|
|
||||||
|
|
||||||
# Allow all crawlers (default)
|
|
||||||
User-agent: *
|
|
||||||
Allow: /
|
|
||||||
|
|
||||||
# Disallow crawling of specific directories (uncomment and customize as needed)
|
|
||||||
# Disallow: /admin/
|
|
||||||
# Disallow: /private/
|
|
||||||
|
|
||||||
# Specify the location of your sitemap
|
|
||||||
Sitemap: https://yourdomain.com/sitemap.xml
|
|
||||||
`;
|
|
||||||
|
|
||||||
await fs.writeFile(
|
|
||||||
path.join(projectDir, "packages", "client", "robots.txt"),
|
|
||||||
robotsContent,
|
|
||||||
);
|
|
||||||
|
|
||||||
const sitemapContent = `<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>https://yourdomain.com/</loc>
|
|
||||||
<lastmod>2025-03-01</lastmod>
|
|
||||||
<changefreq>weekly</changefreq>
|
|
||||||
<priority>1.0</priority>
|
|
||||||
</url>
|
|
||||||
|
|
||||||
<url>
|
|
||||||
<loc>https://yourdomain.com/about</loc>
|
|
||||||
<lastmod>2025-03-01</lastmod>
|
|
||||||
<changefreq>monthly</changefreq>
|
|
||||||
<priority>0.8</priority>
|
|
||||||
</url>
|
|
||||||
|
|
||||||
</urlset>
|
|
||||||
`;
|
|
||||||
await fs.writeFile(
|
|
||||||
path.join(projectDir, "packages", "client", "sitemap.xml"),
|
|
||||||
sitemapContent,
|
|
||||||
);
|
|
||||||
|
|
||||||
const metaContent = `<!doctype html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>TanStack Router</title>
|
|
||||||
<meta name="description"
|
|
||||||
content="Replace this with your page description - keep it between 150-160 characters for optimal display in search results." />
|
|
||||||
<meta name="keywords" content="keyword1, keyword2, keyword3, customize based on your content" />
|
|
||||||
<meta name="robots" content="index, follow" />
|
|
||||||
<link rel="icon" href="/favicon.ico" />
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
|
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
|
||||||
|
|
||||||
<!-- OPEN GRAPH TAGS: Optimize how your content appears when shared on Facebook, LinkedIn, etc. -->
|
|
||||||
<meta property="og:title" content="Replace with your page title" />
|
|
||||||
<meta property="og:description"
|
|
||||||
content="Replace with your page description (typically the same as meta description)" />
|
|
||||||
<meta property="og:image" content="path-to-image" />
|
|
||||||
<meta property="og:type" content="website" />
|
|
||||||
<meta property="og:site_name" content="Your Site Name" />
|
|
||||||
|
|
||||||
<!-- TWITTER CARD TAGS: Optimize how your content appears when shared on Twitter -->
|
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
|
||||||
<meta name="twitter:title" content="Replace with your page title" />
|
|
||||||
<meta name="twitter:description" content="Replace with your page description" />
|
|
||||||
<meta name="twitter:image" content="path-to-image" />
|
|
||||||
<meta name="twitter:creator" content="@yourtwitterhandle" />
|
|
||||||
|
|
||||||
<!-- STRUCTURED DATA: Help search engines understand your content better (JSON-LD format) -->
|
|
||||||
<script type="application/ld+json">
|
|
||||||
{
|
|
||||||
"@context": "https://schema.org",
|
|
||||||
"@type": "WebPage",
|
|
||||||
"name": "Replace with your page title",
|
|
||||||
"description": "Replace with your page description",
|
|
||||||
"url": "https://yourdomain.com/your-page-url"
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="app"></div>
|
|
||||||
<script type="module" src="/src/main.tsx"></script>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
`;
|
|
||||||
|
|
||||||
await fs.writeFile(
|
|
||||||
path.join(projectDir, "packages", "client", "index.html"),
|
|
||||||
metaContent,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -99,10 +99,6 @@ function generateFeaturesList(
|
|||||||
for (const feature of features) {
|
for (const feature of features) {
|
||||||
if (feature === "docker") {
|
if (feature === "docker") {
|
||||||
featuresList.push("- **Docker** - Containerized deployment");
|
featuresList.push("- **Docker** - Containerized deployment");
|
||||||
} else if (feature === "github-actions") {
|
|
||||||
featuresList.push("- **GitHub Actions** - CI/CD workflows");
|
|
||||||
} else if (feature === "SEO") {
|
|
||||||
featuresList.push("- **SEO** - Search engine optimization tools");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ async function main() {
|
|||||||
.option("--auth", "Include authentication")
|
.option("--auth", "Include authentication")
|
||||||
.option("--no-auth", "Exclude authentication")
|
.option("--no-auth", "Exclude authentication")
|
||||||
.option("--docker", "Include Docker setup")
|
.option("--docker", "Include Docker setup")
|
||||||
.option("--github-actions", "Include GitHub Actions")
|
|
||||||
.option("--seo", "Include SEO setup")
|
|
||||||
.option("--no-addons", "Skip all additional addons")
|
.option("--no-addons", "Skip all additional addons")
|
||||||
.option("--git", "Include git setup")
|
.option("--git", "Include git setup")
|
||||||
.option("--no-git", "Skip git initialization")
|
.option("--no-git", "Skip git initialization")
|
||||||
@@ -72,18 +70,11 @@ async function main() {
|
|||||||
...("git" in options && { git: options.git }),
|
...("git" in options && { git: options.git }),
|
||||||
...("install" in options && { noInstall: !options.install }),
|
...("install" in options && { noInstall: !options.install }),
|
||||||
...("turso" in options && { turso: options.turso }),
|
...("turso" in options && { turso: options.turso }),
|
||||||
...((options.docker ||
|
...((options.docker || options.addons === false) && {
|
||||||
options.githubActions ||
|
|
||||||
options.seo ||
|
|
||||||
options.addons === false) && {
|
|
||||||
addons:
|
addons:
|
||||||
options.addons === false
|
options.addons === false
|
||||||
? []
|
? []
|
||||||
: ([
|
: ([...(options.docker ? ["docker"] : [])] as ProjectAddons[]),
|
||||||
...(options.docker ? ["docker"] : []),
|
|
||||||
...(options.githubActions ? ["github-actions"] : []),
|
|
||||||
...(options.seo ? ["SEO"] : []),
|
|
||||||
] as ProjectAddons[]),
|
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -15,16 +15,6 @@ export async function getAddonsChoice(
|
|||||||
label: "Docker setup",
|
label: "Docker setup",
|
||||||
hint: "Containerize your application",
|
hint: "Containerize your application",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
value: "github-actions",
|
|
||||||
label: "GitHub Actions",
|
|
||||||
hint: "CI/CD workflows",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: "SEO",
|
|
||||||
label: "Basic SEO setup",
|
|
||||||
hint: "Search engine optimization configuration",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
required: false,
|
required: false,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export type ProjectDatabase = "sqlite" | "postgres" | "none";
|
export type ProjectDatabase = "sqlite" | "postgres" | "none";
|
||||||
export type ProjectOrm = "drizzle" | "prisma" | "none";
|
export type ProjectOrm = "drizzle" | "prisma" | "none";
|
||||||
export type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
export type PackageManager = "npm" | "pnpm" | "yarn" | "bun";
|
||||||
export type ProjectAddons = "docker" | "github-actions" | "SEO";
|
export type ProjectAddons = "docker";
|
||||||
|
|
||||||
export interface ProjectConfig {
|
export interface ProjectConfig {
|
||||||
projectName: string;
|
projectName: string;
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>TanStack Router</title>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -11,40 +11,40 @@
|
|||||||
"check-types": "tsc --noEmit"
|
"check-types": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tanstack/router-plugin": "^1.101.0",
|
"@tanstack/router-plugin": "^1.114.25",
|
||||||
"@types/node": "^22.13.1",
|
"@types/node": "^22.13.10",
|
||||||
"@types/react": "^19.0.8",
|
"@types/react": "^19.0.12",
|
||||||
"@types/react-dom": "^19.0.3",
|
"@types/react-dom": "^19.0.4",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"postcss": "^8.5.1",
|
"postcss": "^8.5.3",
|
||||||
"prettier": "^3.4.2",
|
"prettier": "^3.5.3",
|
||||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||||
"tailwindcss": "^4.0.5",
|
"tailwindcss": "^4.0.14",
|
||||||
"vite": "^6.1.0"
|
"vite": "^6.2.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hookform/resolvers": "^3.10.0",
|
"@hookform/resolvers": "^3.10.0",
|
||||||
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
"@radix-ui/react-dropdown-menu": "^2.1.6",
|
||||||
"@radix-ui/react-label": "^2.1.2",
|
"@radix-ui/react-label": "^2.1.2",
|
||||||
"@radix-ui/react-slot": "^1.1.2",
|
"@radix-ui/react-slot": "^1.1.2",
|
||||||
"@tailwindcss/vite": "^4.0.5",
|
|
||||||
"@tanstack/react-form": "^1.0.5",
|
"@tanstack/react-form": "^1.0.5",
|
||||||
"@tanstack/react-query": "^5.66.0",
|
"@tailwindcss/vite": "^4.0.14",
|
||||||
"@tanstack/react-query-devtools": "^5.66.0",
|
"@tanstack/react-query": "^5.69.0",
|
||||||
"@tanstack/react-router": "^1.101.0",
|
"@tanstack/react-query-devtools": "^5.69.0",
|
||||||
"@tanstack/react-router-devtools": "^1.114.25",
|
"@tanstack/react-router": "^1.114.25",
|
||||||
"@trpc/client": "^11.0.0-rc.748",
|
"@tanstack/router-devtools": "^1.114.25",
|
||||||
"@trpc/react-query": "^11.0.0-rc.748",
|
"@trpc/client": "^11.0.0-rc.840",
|
||||||
"@trpc/server": "^11.0.0-rc.748",
|
"@trpc/react-query": "^11.0.0-rc.840",
|
||||||
|
"@trpc/server": "^11.0.0-rc.840",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
"lucide-react": "^0.473.0",
|
"lucide-react": "^0.473.0",
|
||||||
"next-themes": "^0.4.4",
|
"next-themes": "^0.4.6",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
"sonner": "^1.7.4",
|
"sonner": "^1.7.4",
|
||||||
"tailwind-merge": "^2.6.0",
|
"tailwind-merge": "^2.6.0",
|
||||||
"tailwindcss-animate": "^1.0.7",
|
"tailwindcss-animate": "^1.0.7",
|
||||||
"zod": "^3.24.1"
|
"zod": "^3.24.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
Outlet,
|
Outlet,
|
||||||
createRootRouteWithContext,
|
createRootRouteWithContext,
|
||||||
useRouterState,
|
useRouterState,
|
||||||
|
HeadContent,
|
||||||
} from "@tanstack/react-router";
|
} from "@tanstack/react-router";
|
||||||
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
||||||
import "../index.css";
|
import "../index.css";
|
||||||
@@ -18,6 +19,23 @@ export interface RouterAppContext {
|
|||||||
|
|
||||||
export const Route = createRootRouteWithContext<RouterAppContext>()({
|
export const Route = createRootRouteWithContext<RouterAppContext>()({
|
||||||
component: RootComponent,
|
component: RootComponent,
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{
|
||||||
|
title: "My App",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
content: "My App is a web application",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
links: [
|
||||||
|
{
|
||||||
|
rel: "icon",
|
||||||
|
href: "/favicon.ico",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
function RootComponent() {
|
function RootComponent() {
|
||||||
@@ -26,6 +44,7 @@ function RootComponent() {
|
|||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<HeadContent />
|
||||||
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
|
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
|
||||||
<Header />
|
<Header />
|
||||||
{isFetching && <Loader />}
|
{isFetching && <Loader />}
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
"@hono/trpc-server": "^0.3.4",
|
"@hono/trpc-server": "^0.3.4",
|
||||||
"@trpc/server": "^11.0.0-rc.748",
|
"@trpc/server": "^11.0.0-rc.748",
|
||||||
"dotenv": "^16.4.7",
|
"dotenv": "^16.4.7",
|
||||||
"hono": "^4.7.0",
|
"hono": "^4.7.5",
|
||||||
"zod": "^3.24.1"
|
"zod": "^3.24.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tsx": "^4.19.2",
|
"tsx": "^4.19.2",
|
||||||
"@types/node": "^22.13.4",
|
"@types/node": "^22.13.4",
|
||||||
"typescript": "^5.7.3"
|
"typescript": "^5.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user