create-thexjs-app 0.1.1 → 0.1.3

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.
Files changed (29) hide show
  1. package/dist/index.js +42 -20
  2. package/package.json +3 -8
  3. package/templates/basic/src/components/Link.tsx +6 -12
  4. package/templates/basic/src/pages/placeholder.tsx +2 -1
  5. package/templates/default/src/layouts/main.tsx +0 -3
  6. package/templates/default/src/pages/index.tsx +2 -2
  7. package/templates/default/src/styles/globals.css +1 -1
  8. package/templates/landing/src/components/code-block.tsx +104 -10
  9. package/templates/landing/src/layouts/main.tsx +48 -18
  10. package/templates/landing/src/pages/docs/_layout.tsx +26 -14
  11. package/templates/landing/src/pages/docs/api-routes.tsx +1 -1
  12. package/templates/landing/src/pages/docs/build-deploy.tsx +1 -1
  13. package/templates/landing/src/pages/docs/configuration.tsx +1 -1
  14. package/templates/landing/src/pages/docs/content-collections.tsx +1 -1
  15. package/templates/landing/src/pages/docs/data-layer.tsx +1 -1
  16. package/templates/landing/src/pages/docs/getting-started.tsx +4 -4
  17. package/templates/landing/src/pages/docs/installation.tsx +16 -20
  18. package/templates/landing/src/pages/docs/introduction.tsx +8 -11
  19. package/templates/landing/src/pages/docs/layouts.tsx +1 -1
  20. package/templates/landing/src/pages/docs/middleware.tsx +1 -1
  21. package/templates/landing/src/pages/docs/packages/cli.tsx +10 -7
  22. package/templates/landing/src/pages/docs/packages/core.tsx +7 -3
  23. package/templates/landing/src/pages/docs/packages/env.tsx +3 -3
  24. package/templates/landing/src/pages/docs/pages.tsx +1 -1
  25. package/templates/landing/src/pages/docs/routing.tsx +1 -1
  26. package/templates/landing/src/pages/docs/server-functions.tsx +1 -1
  27. package/templates/landing/src/pages/index.tsx +91 -126
  28. package/templates/landing/src/styles/globals.css +81 -45
  29. package/templates/saas/src/pages/dashboard/settings.tsx +2 -2
@@ -1,10 +1,10 @@
1
1
  import type { RouteProps } from "@thexjs/core";
2
2
  import { ArrowRight } from "lucide-react";
3
- import { CodeBlock } from "../../components/code-block";
3
+ import { CodeBlock, TerminalBlock } from "../../components/code-block";
4
4
 
5
5
  export const mode = "static";
6
6
 
7
- export default function DocPage({}: RouteProps) {
7
+ export default function DocPage(_props: RouteProps) {
8
8
  return (
9
9
  <div>
10
10
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Installation</p>
@@ -23,7 +23,7 @@ export default function DocPage({}: RouteProps) {
23
23
  — x uses <span className="text-foreground">Bun.serve</span>,{" "}
24
24
  <span className="text-foreground">Bun.file</span>, and other Bun-only APIs. Verify with:
25
25
  </p>
26
- <CodeBlock label="terminal" lang="bash" code="bun --version" />
26
+ <TerminalBlock label="terminal — bun" code="bun --version" />
27
27
 
28
28
  <h2 className="mt-12 text-xl font-bold tracking-tight">Create a new project</h2>
29
29
  <p className="mt-3 text-muted-foreground">
@@ -33,41 +33,37 @@ export default function DocPage({}: RouteProps) {
33
33
  <span className="text-foreground">@thexjs/cli</span> versions, and runs{" "}
34
34
  <span className="text-foreground">bun install</span>.
35
35
  </p>
36
- <CodeBlock
37
- label="terminal"
38
- lang="bash"
36
+ <TerminalBlock
37
+ label="~/projects — zsh"
39
38
  code={`bun create thexjs-app@latest my-app
40
39
  cd my-app
41
40
  bun run dev`}
42
41
  />
43
42
  <p className="mt-4 text-muted-foreground">
44
43
  When prompted for a template, press Enter to accept{" "}
45
- <span className="text-foreground">default</span> (recommended) — a single home page to
46
- start from. Other templates include <span className="text-foreground">basic</span>,{" "}
44
+ <span className="text-foreground">default</span> (recommended) — a single home page to start
45
+ from. Other templates include <span className="text-foreground">basic</span>,{" "}
47
46
  <span className="text-foreground">blog</span>, <span className="text-foreground">saas</span>
48
47
  , and <span className="text-foreground">landing</span>.
49
48
  </p>
50
- <CodeBlock
49
+ <TerminalBlock
51
50
  label="template selection"
52
- lang="bash"
53
51
  code={`Available templates:
54
52
 
55
- default Blank slate with a single home page — the fastest way to start. (recommended)
56
- basic Minimal starter: pages, an API route, auth, and a dashboard.
57
- blog Markdown content collections, post listing, and post pages.
58
- saas Dashboard, settings, pricing, auth, and a data layer example.
59
- landing Marketing site with docs pages, styled with shadcn/Tailwind.
53
+ default Blank slate with a single home page. (recommended)
54
+ basic Minimal starter: pages, API route, auth, dashboard.
55
+ blog Markdown content collections.
56
+ saas Dashboard, settings, pricing, auth, data layer.
57
+ landing Marketing site with docs pages.
60
58
 
61
59
  Choose a template (default/basic/blog/saas/landing) (default):`}
62
60
  />
63
61
  <p className="mt-4 text-muted-foreground">
64
- Pass a template explicitly with{" "}
65
- <span className="text-foreground">--template</span> or{" "}
62
+ Pass a template explicitly with <span className="text-foreground">--template</span> or{" "}
66
63
  <span className="text-foreground">-t</span>:
67
64
  </p>
68
- <CodeBlock
69
- label="terminal"
70
- lang="bash"
65
+ <TerminalBlock
66
+ label="~/projects — zsh"
71
67
  code="bun create thexjs-app@latest my-app --template default"
72
68
  />
73
69
 
@@ -4,7 +4,7 @@ import { CodeBlock } from "../../components/code-block";
4
4
 
5
5
  export const mode = "static";
6
6
 
7
- export default function DocPage({}: RouteProps) {
7
+ export default function DocPage(_props: RouteProps) {
8
8
  return (
9
9
  <div>
10
10
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Introduction</p>
@@ -23,9 +23,9 @@ export default function DocPage({}: RouteProps) {
23
23
  Most stacks split concerns across multiple tools: a bundler, a server, a static host, a
24
24
  separate API layer. x keeps everything in one Bun process. Drop a file in{" "}
25
25
  <span className="text-foreground">src/pages</span>, get a route. Mark a page{" "}
26
- <span className="text-foreground">static</span> and it prerenders at build time. Leave it
27
- as server mode and it renders per request. API routes and server functions live alongside
28
- your pages — same types, same runtime.
26
+ <span className="text-foreground">static</span> and it prerenders at build time. Leave it as
27
+ server mode and it renders per request. API routes and server functions live alongside your
28
+ pages — same types, same runtime.
29
29
  </p>
30
30
 
31
31
  <h2 className="mt-12 text-xl font-bold tracking-tight">The package ecosystem</h2>
@@ -88,14 +88,11 @@ export default function HomePage({}: RouteProps) {
88
88
  <p className="mt-3 text-muted-foreground">
89
89
  Pages default to server-rendered (SSR). Opt into build-time prerendering per page:
90
90
  </p>
91
- <CodeBlock
92
- label="route mode"
93
- code={`export const mode: "static" | "server" = "static";`}
94
- />
91
+ <CodeBlock label="route mode" code={`export const mode: "static" | "server" = "static";`} />
95
92
  <p className="mt-4 text-muted-foreground">
96
- Static pages ship as plain HTML in{" "}
97
- <span className="text-foreground">.x/client/</span> — deployable to any static host.
98
- Server pages need a running Bun process via <span className="text-foreground">x start</span>.
93
+ Static pages ship as plain HTML in <span className="text-foreground">.x/client/</span> —
94
+ deployable to any static host. Server pages need a running Bun process via{" "}
95
+ <span className="text-foreground">x start</span>.
99
96
  </p>
100
97
 
101
98
  <div className="mt-16 flex flex-wrap gap-6 border-t border-border pt-8">
@@ -2,7 +2,7 @@ import type { RouteProps } from "@thexjs/core";
2
2
  import { ArrowRight } from "lucide-react";
3
3
  import { CodeBlock } from "../../components/code-block";
4
4
 
5
- export default function DocPage({}: RouteProps) {
5
+ export default function DocPage(_props: RouteProps) {
6
6
  return (
7
7
  <div>
8
8
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Layouts</p>
@@ -2,7 +2,7 @@ import type { RouteProps } from "@thexjs/core";
2
2
  import { ArrowRight } from "lucide-react";
3
3
  import { CodeBlock } from "../../components/code-block";
4
4
 
5
- export default function DocPage({}: RouteProps) {
5
+ export default function DocPage(_props: RouteProps) {
6
6
  return (
7
7
  <div>
8
8
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Middleware</p>
@@ -4,7 +4,7 @@ import { CodeBlock } from "../../../components/code-block";
4
4
 
5
5
  export const mode = "static";
6
6
 
7
- export default function DocPage({}: RouteProps) {
7
+ export default function DocPage(_props: RouteProps) {
8
8
  return (
9
9
  <div>
10
10
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Packages</p>
@@ -16,8 +16,9 @@ export default function DocPage({}: RouteProps) {
16
16
 
17
17
  <CodeBlock label="terminal" lang="bash" code="bun add @thexjs/cli" />
18
18
  <p className="mt-4 text-sm text-muted-foreground">
19
- Requires Bun on your PATH. The CLI shells out to <span className="text-foreground">bun</span>{" "}
20
- and uses Bun-only APIs (<span className="text-foreground">Bun.serve</span>,{" "}
19
+ Requires Bun on your PATH. The CLI shells out to{" "}
20
+ <span className="text-foreground">bun</span> and uses Bun-only APIs (
21
+ <span className="text-foreground">Bun.serve</span>,{" "}
21
22
  <span className="text-foreground">Bun.argv</span>).
22
23
  </p>
23
24
 
@@ -65,9 +66,9 @@ export default defineConfig({
65
66
  });`}
66
67
  />
67
68
  <p className="mt-4 text-muted-foreground">
68
- Without a config file, defaults apply: <span className="text-foreground">src/pages</span> for
69
- pages, <span className="text-foreground">content</span> for content collections if present,
70
- port <span className="text-foreground">3000</span>.
69
+ Without a config file, defaults apply: <span className="text-foreground">src/pages</span>{" "}
70
+ for pages, <span className="text-foreground">content</span> for content collections if
71
+ present, port <span className="text-foreground">3000</span>.
71
72
  </p>
72
73
 
73
74
  <h2 className="mt-12 text-xl font-bold tracking-tight">What each command does</h2>
@@ -83,7 +84,9 @@ export default defineConfig({
83
84
  </p>
84
85
 
85
86
  <h3 className="mt-8 text-lg font-semibold">x build</h3>
86
- <p className="mt-2 text-muted-foreground">Compiles Tailwind in production mode, then writes:</p>
87
+ <p className="mt-2 text-muted-foreground">
88
+ Compiles Tailwind in production mode, then writes:
89
+ </p>
87
90
  <ul className="mt-3 list-inside list-disc space-y-2 text-muted-foreground">
88
91
  <li>
89
92
  <span className="text-foreground">.x/client/</span> — prerendered HTML for static pages,
@@ -4,7 +4,7 @@ import { CodeBlock } from "../../../components/code-block";
4
4
 
5
5
  export const mode = "static";
6
6
 
7
- export default function DocPage({}: RouteProps) {
7
+ export default function DocPage(_props: RouteProps) {
8
8
  return (
9
9
  <div>
10
10
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Packages</p>
@@ -69,7 +69,10 @@ src/pages/_404.tsx Custom not-found page`}
69
69
  <p className="mt-3 text-muted-foreground">
70
70
  Every page defaults to server-rendered. Opt into build-time prerendering:
71
71
  </p>
72
- <CodeBlock label="src/pages/index.tsx" code={`export const mode: "static" | "server" = "static";`} />
72
+ <CodeBlock
73
+ label="src/pages/index.tsx"
74
+ code={`export const mode: "static" | "server" = "static";`}
75
+ />
73
76
  <ul className="mt-4 list-inside list-disc space-y-2 text-muted-foreground">
74
77
  <li>
75
78
  <span className="text-foreground">static</span> — rendered once at build time to HTML in{" "}
@@ -77,7 +80,8 @@ src/pages/_404.tsx Custom not-found page`}
77
80
  </li>
78
81
  <li>
79
82
  <span className="text-foreground">server</span> — rendered per request via{" "}
80
- <span className="text-foreground">x start</span> or <span className="text-foreground">x dev</span>
83
+ <span className="text-foreground">x start</span> or{" "}
84
+ <span className="text-foreground">x dev</span>
81
85
  </li>
82
86
  </ul>
83
87
 
@@ -4,7 +4,7 @@ import { CodeBlock } from "../../../components/code-block";
4
4
 
5
5
  export const mode = "static";
6
6
 
7
- export default function DocPage({}: RouteProps) {
7
+ export default function DocPage(_props: RouteProps) {
8
8
  return (
9
9
  <div>
10
10
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Packages</p>
@@ -84,8 +84,8 @@ function json<T>(): EnvValidator<T> {
84
84
 
85
85
  <h2 className="mt-12 text-xl font-bold tracking-tight">client / clientPrefix</h2>
86
86
  <p className="mt-3 text-muted-foreground">
87
- The <span className="text-foreground">client</span> schema is for variables safe to expose to
88
- the browser. <span className="text-foreground">clientPrefix</span> enforces that every
87
+ The <span className="text-foreground">client</span> schema is for variables safe to expose
88
+ to the browser. <span className="text-foreground">clientPrefix</span> enforces that every
89
89
  client key starts with that prefix (e.g.{" "}
90
90
  <span className="text-foreground">NEXT_PUBLIC_</span>,{" "}
91
91
  <span className="text-foreground">PUBLIC_</span>) — a key that does not match fails
@@ -2,7 +2,7 @@ import type { RouteProps } from "@thexjs/core";
2
2
  import { ArrowRight } from "lucide-react";
3
3
  import { CodeBlock } from "../../components/code-block";
4
4
 
5
- export default function DocPage({}: RouteProps) {
5
+ export default function DocPage(_props: RouteProps) {
6
6
  return (
7
7
  <div>
8
8
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Pages</p>
@@ -2,7 +2,7 @@ import type { RouteProps } from "@thexjs/core";
2
2
  import { ArrowRight } from "lucide-react";
3
3
  import { CodeBlock } from "../../components/code-block";
4
4
 
5
- export default function DocPage({}: RouteProps) {
5
+ export default function DocPage(_props: RouteProps) {
6
6
  return (
7
7
  <div>
8
8
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Routing</p>
@@ -2,7 +2,7 @@ import type { RouteProps } from "@thexjs/core";
2
2
  import { ArrowRight } from "lucide-react";
3
3
  import { CodeBlock } from "../../components/code-block";
4
4
 
5
- export default function DocPage({}: RouteProps) {
5
+ export default function DocPage(_props: RouteProps) {
6
6
  return (
7
7
  <div>
8
8
  <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">
@@ -1,5 +1,5 @@
1
1
  import { ArrowRight, BookOpen, Code2, FileJson, Globe, Layers, Shield, Zap } from "lucide-react";
2
- import { CodeBlock } from "../components/code-block";
2
+ import { TerminalBlock } from "../components/code-block";
3
3
 
4
4
  const features = [
5
5
  {
@@ -39,153 +39,118 @@ export const mode = "static";
39
39
  export default function HomePage() {
40
40
  return (
41
41
  <div className="pb-32">
42
- {/* ── Hero ── */}
43
- <section className="relative flex min-h-[92vh] flex-col items-center justify-center overflow-hidden px-6">
42
+ <section className="relative overflow-hidden px-6 pt-16 pb-24 sm:pt-20">
44
43
  <div
45
- className="pointer-events-none absolute inset-0 opacity-[0.22]"
44
+ className="pointer-events-none absolute inset-0 opacity-30"
46
45
  style={{
47
46
  backgroundImage:
48
- "linear-gradient(to right, oklch(0.22 0.015 265) 1px, transparent 1px), linear-gradient(to bottom, oklch(0.22 0.015 265) 1px, transparent 1px)",
49
- backgroundSize: "56px 56px",
50
- maskImage: "radial-gradient(ellipse 75% 65% at 50% 35%, black 15%, transparent 100%)",
47
+ "linear-gradient(to right, #1a2233 1px, transparent 1px), linear-gradient(to bottom, #1a2233 1px, transparent 1px)",
48
+ backgroundSize: "40px 40px",
49
+ maskImage: "radial-gradient(ellipse 80% 70% at 50% 0%, black 10%, transparent 100%)",
51
50
  }}
52
51
  />
53
- <div className="pointer-events-none absolute inset-0 flex items-start justify-center pt-12">
54
- <div className="h-[480px] w-[480px] animate-pulse-glow rounded-full bg-primary/15 sm:h-[640px] sm:w-[640px]" />
55
- </div>
56
- <div className="relative z-10 flex flex-col items-center text-center">
57
- <p className="font-mono text-[11px] uppercase tracking-[0.32em] text-primary/90">
58
- Fullstack · Bun · React
59
- </p>
60
- <h1 className="mt-6 max-w-4xl text-5xl font-bold tracking-tight leading-[1.05] sm:text-7xl">
61
- One runtime.
62
- <br />
63
- <span className="text-primary">Every layer.</span>
64
- </h1>
65
- <p className="mt-6 max-w-xl text-lg leading-relaxed text-muted-foreground sm:text-xl">
66
- x is a fullstack framework for Bun — file-based routing, SSR, static export, API routes,
67
- and server functions in a single process.
68
- </p>
69
- <div className="mt-10 flex flex-wrap items-center justify-center gap-4">
70
- <a
71
- href="/docs/installation"
72
- className="group inline-flex h-12 items-center gap-2 rounded-xl bg-primary px-6 text-sm font-semibold text-primary-foreground shadow-xl shadow-primary/30 transition-all hover:bg-primary/90 hover:shadow-primary/40 active:scale-[0.97]"
73
- >
74
- Install x{" "}
75
- <ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-0.5" />
76
- </a>
77
- <a
78
- href="/docs/introduction"
79
- className="group inline-flex h-12 items-center gap-2 rounded-xl border border-border bg-card/50 px-6 text-sm font-medium text-foreground backdrop-blur-sm transition-all hover:bg-muted active:scale-[0.97]"
80
- >
81
- <BookOpen className="h-4 w-4" /> Introduction
82
- </a>
52
+ <div className="pointer-events-none absolute -top-32 left-1/2 h-[520px] w-[520px] -translate-x-1/2 animate-pulse-glow rounded-full bg-primary/10 blur-3xl" />
53
+
54
+ <div className="relative z-10 mx-auto grid max-w-6xl items-center gap-14 lg:grid-cols-[1fr_1.05fr] lg:gap-10">
55
+ <div>
56
+ <p className="font-mono text-[11px] uppercase tracking-[0.28em] text-primary">
57
+ Bun-native fullstack
58
+ </p>
59
+ <h1 className="mt-5 text-[clamp(2.4rem,6vw,4.25rem)] font-extrabold leading-[1.02]">
60
+ Files in.
61
+ <br />
62
+ <span className="text-primary">Routes out.</span>
63
+ </h1>
64
+ <p className="mt-6 max-w-lg text-base leading-relaxed text-muted-foreground sm:text-lg">
65
+ x is a React framework where your folder structure is the router, your API lives
66
+ beside your pages, and everything runs in one Bun process.
67
+ </p>
68
+ <div className="mt-9 flex flex-wrap gap-3">
69
+ <a
70
+ href="/docs/installation"
71
+ className="group inline-flex h-11 items-center gap-2 rounded-xl bg-primary px-5 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:bg-primary/90 active:scale-[0.98]"
72
+ >
73
+ Install x
74
+ <ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-0.5" />
75
+ </a>
76
+ <a
77
+ href="/docs/introduction"
78
+ className="inline-flex h-11 items-center gap-2 rounded-xl border border-border bg-card/60 px-5 text-sm font-medium backdrop-blur-sm transition-colors hover:bg-muted"
79
+ >
80
+ <BookOpen className="h-4 w-4" /> Introduction
81
+ </a>
82
+ </div>
83
+ </div>
84
+
85
+ <div className="relative">
86
+ <div className="absolute -inset-4 rounded-3xl bg-gradient-to-br from-primary/10 via-transparent to-secondary/5 blur-2xl" />
87
+ <TerminalBlock
88
+ label="~/my-app — zsh"
89
+ code={`$ bun create thexjs-app@latest my-app
90
+
91
+ Available templates:
92
+
93
+ default Blank slate — single home page. (recommended)
94
+ basic Pages, API, auth, dashboard.
95
+ blog Markdown content collections.
96
+ saas Dashboard, pricing, data layer.
97
+
98
+ Choose a template (default): █
99
+
100
+ $ cd my-app && bun run dev
101
+ [x] dev server running at http://localhost:3000`}
102
+ />
83
103
  </div>
84
104
  </div>
85
- <div className="pointer-events-none absolute bottom-0 left-0 right-0 h-64 bg-gradient-to-t from-background to-transparent" />
86
105
  </section>
87
106
 
88
- {/* ── Features ── */}
89
107
  <section className="mx-auto max-w-6xl px-6">
90
108
  <div className="mx-auto max-w-2xl text-center">
91
- <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">Why x</p>
92
- <h2 className="mt-4 text-3xl font-bold tracking-tight sm:text-4xl">
93
- Everything in one place
94
- </h2>
109
+ <p className="font-mono text-[11px] uppercase tracking-[0.22em] text-primary">Why x</p>
110
+ <h2 className="mt-4 text-3xl font-bold sm:text-4xl">Everything in one place</h2>
95
111
  <p className="mt-4 text-muted-foreground">
96
- Most frameworks make you choose. x gives you everything — in one Bun process, zero
97
- config.
112
+ Most frameworks split the stack. x keeps routing, rendering, API, and build tooling in
113
+ one runtime.
98
114
  </p>
99
115
  </div>
100
- <div className="mt-16 grid gap-px overflow-hidden rounded-2xl border border-border bg-border sm:grid-cols-3">
116
+ <div className="mt-14 grid gap-3 sm:grid-cols-2 lg:grid-cols-3">
101
117
  {features.map((f) => (
102
- <div key={f.title} className="bg-card p-8 transition-colors hover:bg-card/80">
103
- <div className="flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10 text-primary">
104
- <f.icon className="h-5 w-5" />
118
+ <article
119
+ key={f.title}
120
+ className="group rounded-2xl border border-border/80 bg-card/50 p-6 transition-colors hover:border-primary/25 hover:bg-card"
121
+ >
122
+ <div className="flex h-9 w-9 items-center justify-center rounded-lg border border-border bg-muted/50 text-primary transition-colors group-hover:border-primary/30 group-hover:bg-primary/10">
123
+ <f.icon className="h-4 w-4" />
105
124
  </div>
106
- <h3 className="mt-5 text-lg font-semibold">{f.title}</h3>
125
+ <h3 className="mt-4 font-semibold">{f.title}</h3>
107
126
  <p className="mt-2 text-sm leading-relaxed text-muted-foreground">{f.desc}</p>
108
- </div>
127
+ </article>
109
128
  ))}
110
129
  </div>
111
130
  </section>
112
131
 
113
- {/* ── Terminal / Quick start ── */}
114
- <section className="mx-auto mt-32 max-w-4xl px-6">
115
- <div className="mx-auto max-w-2xl text-center">
116
- <p className="text-xs font-semibold uppercase tracking-[0.2em] text-primary">
117
- Quick start
118
- </p>
119
- <h2 className="mt-4 text-3xl font-bold tracking-tight sm:text-4xl">
120
- Scaffold in one command
121
- </h2>
122
- <p className="mt-4 text-muted-foreground">
123
- Create a project with the default template — a single home page, ready to edit.
132
+ <section className="mx-auto mt-28 max-w-4xl px-6">
133
+ <div className="rounded-3xl border border-border/80 bg-card/40 p-10 text-center sm:p-14">
134
+ <h2 className="text-3xl font-bold sm:text-4xl">Ready to build?</h2>
135
+ <p className="mx-auto mt-4 max-w-lg text-muted-foreground">
136
+ Read the docs, scaffold a project, and ship from a single home page or a full-stack
137
+ starter.
124
138
  </p>
125
- </div>
126
- <CodeBlock
127
- label="~/project — bash"
128
- lang="bash"
129
- code={`$ bun create thexjs-app@latest my-app
130
-
131
- Available templates:
132
-
133
- default Blank slate with a single home page. (recommended)
134
- basic Pages, API route, auth, and dashboard.
135
- blog Markdown content collections.
136
- saas Dashboard, pricing, and data layer.
137
- landing Marketing site with docs pages.
138
-
139
- Choose a template (default): █
140
-
141
- $ cd my-app && bun run dev
142
- dev server running at http://localhost:3000`}
143
- />
144
- <div className="mt-8 flex flex-wrap items-center justify-center gap-4">
145
- <a
146
- href="/docs/installation"
147
- className="group inline-flex h-11 items-center gap-2 rounded-xl bg-primary px-6 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:bg-primary/90 active:scale-[0.97]"
148
- >
149
- Installation guide{" "}
150
- <ArrowRight className="h-4 w-4 transition-transform group-hover:translate-x-0.5" />
151
- </a>
152
- <a
153
- href="/docs/packages/core"
154
- className="inline-flex h-11 items-center rounded-xl border border-border px-6 text-sm font-medium text-foreground transition-colors hover:bg-muted"
155
- >
156
- Package docs
157
- </a>
158
- </div>
159
- </section>
160
-
161
- {/* ── CTA ── */}
162
- <section className="mx-auto mt-32 max-w-4xl px-6">
163
- <div className="relative overflow-hidden rounded-3xl border border-primary/20 bg-gradient-to-br from-primary/[0.07] via-primary/[0.03] to-background p-14 text-center sm:p-24">
164
- <div className="pointer-events-none absolute -right-20 -top-20 h-60 w-60 rounded-full bg-primary/10 blur-3xl" />
165
- <div className="relative">
166
- <h2 className="text-3xl font-bold tracking-tight sm:text-4xl">Ready to build?</h2>
167
- <p className="mt-4 text-lg text-muted-foreground">
168
- One command, one process, everything you need. Start building with x today.
169
- </p>
170
- <div className="mt-8 flex flex-wrap items-center justify-center gap-4">
171
- <a
172
- href="/docs"
173
- className="group inline-flex h-12 items-center gap-2 rounded-xl bg-primary px-6 text-sm font-semibold text-primary-foreground shadow-xl shadow-primary/25 transition-all hover:bg-primary/90 active:scale-[0.97]"
174
- >
175
- <BookOpen className="h-4 w-4" /> Read the docs
176
- </a>
177
- <a
178
- href="https://github.com/abdelkabirouadoukou/x"
179
- target="_blank"
180
- rel="noopener noreferrer"
181
- className="group inline-flex h-12 items-center gap-2 rounded-xl border border-border bg-card/50 px-6 text-sm font-medium text-foreground backdrop-blur-sm transition-all hover:bg-muted active:scale-[0.97]"
182
- >
183
- <svg viewBox="0 0 24 24" className="h-5 w-5" fill="currentColor">
184
- <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
185
- </svg>
186
- GitHub
187
- </a>
188
- </div>
139
+ <div className="mt-8 flex flex-wrap items-center justify-center gap-3">
140
+ <a
141
+ href="/docs"
142
+ className="inline-flex h-11 items-center gap-2 rounded-xl bg-primary px-5 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:bg-primary/90"
143
+ >
144
+ <BookOpen className="h-4 w-4" /> Read the docs
145
+ </a>
146
+ <a
147
+ href="https://github.com/abdelkabirouadoukou/x"
148
+ target="_blank"
149
+ rel="noopener noreferrer"
150
+ className="inline-flex h-11 items-center rounded-xl border border-border px-5 text-sm font-medium transition-colors hover:bg-muted"
151
+ >
152
+ GitHub
153
+ </a>
189
154
  </div>
190
155
  </div>
191
156
  </section>