create-thexjs-app 0.1.0

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 (115) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1026 -0
  3. package/dist/index.js +224 -0
  4. package/package.json +30 -0
  5. package/templates/basic/components.json +21 -0
  6. package/templates/basic/content/blog/hello.md +8 -0
  7. package/templates/basic/public/favicon.ico +0 -0
  8. package/templates/basic/src/actions/dashboard/greet.ts +3 -0
  9. package/templates/basic/src/api/auth/login.ts +30 -0
  10. package/templates/basic/src/api/auth/logout.ts +12 -0
  11. package/templates/basic/src/api/placeholder/comments.ts +17 -0
  12. package/templates/basic/src/api/placeholder/posts.ts +20 -0
  13. package/templates/basic/src/api/placeholder/todos.ts +21 -0
  14. package/templates/basic/src/api/placeholder/users.ts +12 -0
  15. package/templates/basic/src/components/Head.tsx +21 -0
  16. package/templates/basic/src/components/Image.tsx +27 -0
  17. package/templates/basic/src/components/Link.tsx +16 -0
  18. package/templates/basic/src/components/ui/badge.tsx +49 -0
  19. package/templates/basic/src/components/ui/button.tsx +58 -0
  20. package/templates/basic/src/components/ui/card.tsx +88 -0
  21. package/templates/basic/src/components/ui/input.tsx +20 -0
  22. package/templates/basic/src/layouts/main.tsx +38 -0
  23. package/templates/basic/src/lib/auth.ts +70 -0
  24. package/templates/basic/src/lib/migrations/001_create_sessions.sql +9 -0
  25. package/templates/basic/src/lib/placeholder-data.ts +176 -0
  26. package/templates/basic/src/lib/utils.ts +6 -0
  27. package/templates/basic/src/pages/_404.tsx +17 -0
  28. package/templates/basic/src/pages/about.tsx +22 -0
  29. package/templates/basic/src/pages/blog.tsx +41 -0
  30. package/templates/basic/src/pages/dashboard/_middleware.ts +16 -0
  31. package/templates/basic/src/pages/dashboard/index.tsx +84 -0
  32. package/templates/basic/src/pages/index.tsx +54 -0
  33. package/templates/basic/src/pages/login.tsx +85 -0
  34. package/templates/basic/src/pages/placeholder.tsx +194 -0
  35. package/templates/basic/src/pages/posts/[id].tsx +17 -0
  36. package/templates/basic/src/styles/globals.css +90 -0
  37. package/templates/basic/src/x-routes.ts +29 -0
  38. package/templates/basic/tsconfig.json +11 -0
  39. package/templates/basic/x.config.ts +10 -0
  40. package/templates/blog/components.json +20 -0
  41. package/templates/blog/content/posts/getting-started.md +38 -0
  42. package/templates/blog/content/posts/hello-world.md +21 -0
  43. package/templates/blog/content/posts/tailwind-v4.md +31 -0
  44. package/templates/blog/public/favicon.ico +0 -0
  45. package/templates/blog/src/components/ui/avatar.tsx +91 -0
  46. package/templates/blog/src/components/ui/badge.tsx +49 -0
  47. package/templates/blog/src/components/ui/button.tsx +58 -0
  48. package/templates/blog/src/components/ui/card.tsx +88 -0
  49. package/templates/blog/src/components/ui/input.tsx +20 -0
  50. package/templates/blog/src/layouts/blog.tsx +46 -0
  51. package/templates/blog/src/layouts/main.tsx +32 -0
  52. package/templates/blog/src/lib/utils.ts +5 -0
  53. package/templates/blog/src/pages/about.tsx +36 -0
  54. package/templates/blog/src/pages/blog/[slug].tsx +56 -0
  55. package/templates/blog/src/pages/blog/index.tsx +70 -0
  56. package/templates/blog/src/pages/index.tsx +70 -0
  57. package/templates/blog/src/styles/globals.css +90 -0
  58. package/templates/blog/src/x-routes.ts +20 -0
  59. package/templates/blog/tsconfig.json +5 -0
  60. package/templates/blog/x.config.ts +6 -0
  61. package/templates/landing/components.json +20 -0
  62. package/templates/landing/public/favicon.ico +0 -0
  63. package/templates/landing/src/components/code-block.tsx +24 -0
  64. package/templates/landing/src/components/ui/avatar.tsx +91 -0
  65. package/templates/landing/src/components/ui/badge.tsx +49 -0
  66. package/templates/landing/src/components/ui/button.tsx +58 -0
  67. package/templates/landing/src/components/ui/card.tsx +88 -0
  68. package/templates/landing/src/components/ui/input.tsx +20 -0
  69. package/templates/landing/src/layouts/main.tsx +48 -0
  70. package/templates/landing/src/lib/syntax.tsx +366 -0
  71. package/templates/landing/src/lib/utils.ts +5 -0
  72. package/templates/landing/src/pages/contact.tsx +95 -0
  73. package/templates/landing/src/pages/docs/_layout.tsx +109 -0
  74. package/templates/landing/src/pages/docs/api-routes.tsx +113 -0
  75. package/templates/landing/src/pages/docs/build-deploy.tsx +124 -0
  76. package/templates/landing/src/pages/docs/configuration.tsx +121 -0
  77. package/templates/landing/src/pages/docs/content-collections.tsx +130 -0
  78. package/templates/landing/src/pages/docs/data-layer.tsx +142 -0
  79. package/templates/landing/src/pages/docs/getting-started.tsx +119 -0
  80. package/templates/landing/src/pages/docs/index.tsx +123 -0
  81. package/templates/landing/src/pages/docs/layouts.tsx +114 -0
  82. package/templates/landing/src/pages/docs/middleware.tsx +124 -0
  83. package/templates/landing/src/pages/docs/pages.tsx +135 -0
  84. package/templates/landing/src/pages/docs/routing.tsx +123 -0
  85. package/templates/landing/src/pages/docs/server-functions.tsx +123 -0
  86. package/templates/landing/src/pages/features.tsx +129 -0
  87. package/templates/landing/src/pages/index.tsx +175 -0
  88. package/templates/landing/src/styles/globals.css +100 -0
  89. package/templates/landing/src/x-routes.ts +31 -0
  90. package/templates/landing/tsconfig.json +5 -0
  91. package/templates/landing/x.config.ts +2 -0
  92. package/templates/saas/components.json +20 -0
  93. package/templates/saas/public/favicon.ico +0 -0
  94. package/templates/saas/src/actions/dashboard.ts +3 -0
  95. package/templates/saas/src/components/ui/avatar.tsx +91 -0
  96. package/templates/saas/src/components/ui/badge.tsx +49 -0
  97. package/templates/saas/src/components/ui/button.tsx +58 -0
  98. package/templates/saas/src/components/ui/card.tsx +88 -0
  99. package/templates/saas/src/components/ui/input.tsx +20 -0
  100. package/templates/saas/src/layouts/dashboard.tsx +67 -0
  101. package/templates/saas/src/layouts/main.tsx +38 -0
  102. package/templates/saas/src/lib/auth.ts +70 -0
  103. package/templates/saas/src/lib/migrations/001_create_sessions.sql +9 -0
  104. package/templates/saas/src/lib/utils.ts +5 -0
  105. package/templates/saas/src/pages/dashboard/_middleware.ts +9 -0
  106. package/templates/saas/src/pages/dashboard/analytics.tsx +68 -0
  107. package/templates/saas/src/pages/dashboard/index.tsx +86 -0
  108. package/templates/saas/src/pages/dashboard/settings.tsx +105 -0
  109. package/templates/saas/src/pages/index.tsx +110 -0
  110. package/templates/saas/src/pages/login.tsx +67 -0
  111. package/templates/saas/src/pages/pricing.tsx +121 -0
  112. package/templates/saas/src/styles/globals.css +90 -0
  113. package/templates/saas/src/x-routes.ts +22 -0
  114. package/templates/saas/tsconfig.json +5 -0
  115. package/templates/saas/x.config.ts +7 -0
@@ -0,0 +1,105 @@
1
+ import type { LoaderArgs, RouteProps } from "@thexjs/core";
2
+ import { AlertTriangle, Bell, Save, User } from "lucide-react";
3
+
4
+ export async function loader({ request }: LoaderArgs) {
5
+ const { parseSessionCookie, getSession } = await import("../../lib/auth");
6
+ const token = parseSessionCookie(request.headers.get("Cookie"));
7
+ const session = getSession(token);
8
+ return { username: session?.username ?? "User" };
9
+ }
10
+
11
+ export default function SettingsPage({ loaderData }: RouteProps) {
12
+ return (
13
+ <div className="space-y-8">
14
+ <div>
15
+ <h2 className="text-2xl font-bold tracking-tight text-foreground">Settings</h2>
16
+ <p className="mt-1 text-sm text-muted-foreground">Manage your account settings</p>
17
+ </div>
18
+
19
+ <div className="rounded-2xl border border-border bg-card">
20
+ <div className="flex items-center gap-3 border-b border-border px-6 py-4">
21
+ <div className="flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10 text-primary">
22
+ <User className="h-5 w-5" />
23
+ </div>
24
+ <h3 className="text-lg font-semibold text-card-foreground">Profile</h3>
25
+ </div>
26
+ <div className="space-y-5 p-6">
27
+ <div className="grid gap-5 sm:grid-cols-2">
28
+ <div>
29
+ <label
30
+ htmlFor="name"
31
+ className="block text-sm font-medium text-card-foreground mb-1.5"
32
+ >
33
+ Name
34
+ </label>
35
+ <input
36
+ id="name"
37
+ defaultValue={loaderData?.username as string}
38
+ className="w-full rounded-xl border border-input bg-background px-4 py-2.5 text-sm text-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/20"
39
+ />
40
+ </div>
41
+ <div>
42
+ <label
43
+ htmlFor="settings-email"
44
+ className="block text-sm font-medium text-card-foreground mb-1.5"
45
+ >
46
+ Email
47
+ </label>
48
+ <input
49
+ id="settings-email"
50
+ type="email"
51
+ defaultValue="john@example.com"
52
+ className="w-full rounded-xl border border-input bg-background px-4 py-2.5 text-sm text-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/20"
53
+ />
54
+ </div>
55
+ </div>
56
+ <button className="inline-flex items-center gap-2 rounded-xl bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:bg-primary/90">
57
+ <Save className="h-4 w-4" />
58
+ Save Changes
59
+ </button>
60
+ </div>
61
+ </div>
62
+
63
+ <div className="rounded-2xl border border-border bg-card">
64
+ <div className="flex items-center gap-3 border-b border-border px-6 py-4">
65
+ <div className="flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10 text-primary">
66
+ <Bell className="h-5 w-5" />
67
+ </div>
68
+ <h3 className="text-lg font-semibold text-card-foreground">Notifications</h3>
69
+ </div>
70
+ <div className="space-y-4 p-6">
71
+ {["Email notifications", "Push notifications", "Weekly digest", "Product updates"].map(
72
+ (item) => (
73
+ <div
74
+ key={item}
75
+ className="flex items-center justify-between rounded-xl border border-border bg-background px-4 py-3"
76
+ >
77
+ <span className="text-sm text-card-foreground">{item}</span>
78
+ <div className="flex h-6 w-11 cursor-pointer items-center rounded-full bg-primary p-0.5 transition-colors">
79
+ <div className="h-5 w-5 rounded-full bg-white shadow-sm transition-transform translate-x-[1.25rem]" />
80
+ </div>
81
+ </div>
82
+ ),
83
+ )}
84
+ </div>
85
+ </div>
86
+
87
+ <div className="rounded-2xl border border-destructive/30 bg-card">
88
+ <div className="flex items-center gap-3 border-b border-border px-6 py-4">
89
+ <div className="flex h-10 w-10 items-center justify-center rounded-xl bg-destructive/10 text-destructive">
90
+ <AlertTriangle className="h-5 w-5" />
91
+ </div>
92
+ <h3 className="text-lg font-semibold text-card-foreground">Danger Zone</h3>
93
+ </div>
94
+ <div className="p-6">
95
+ <p className="text-sm text-muted-foreground mb-4">
96
+ Permanently delete your account and all associated data.
97
+ </p>
98
+ <button className="rounded-xl border border-destructive/50 bg-destructive/10 px-5 py-2.5 text-sm font-semibold text-destructive transition-all hover:bg-destructive/20">
99
+ Delete Account
100
+ </button>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ );
105
+ }
@@ -0,0 +1,110 @@
1
+ import { ArrowRight, BarChart3, Globe, Lock, Shield, Users, Zap } from "lucide-react";
2
+ import { cn } from "../lib/utils";
3
+
4
+ const features = [
5
+ {
6
+ icon: Zap,
7
+ title: "Lightning Fast",
8
+ description: "Blazing performance with edge-ready infrastructure.",
9
+ },
10
+ {
11
+ icon: Shield,
12
+ title: "Enterprise Security",
13
+ description: "Bank-grade encryption and compliance built-in.",
14
+ },
15
+ {
16
+ icon: BarChart3,
17
+ title: "Advanced Analytics",
18
+ description: "Real-time insights with customizable dashboards.",
19
+ },
20
+ {
21
+ icon: Users,
22
+ title: "Team Collaboration",
23
+ description: "Work together seamlessly in real-time.",
24
+ },
25
+ { icon: Globe, title: "Global Scale", description: "Deploy to 30+ regions worldwide." },
26
+ { icon: Lock, title: "Access Control", description: "Granular permissions and SSO integration." },
27
+ ];
28
+
29
+ export default function HomePage() {
30
+ return (
31
+ <div className="bg-background">
32
+ <section className="relative overflow-hidden px-4 pb-24 pt-20 sm:px-6 lg:px-8">
33
+ <div className="mx-auto max-w-7xl text-center">
34
+ <h1 className="bg-gradient-to-r from-foreground via-primary to-chart-1 bg-clip-text text-5xl font-bold tracking-tight text-transparent sm:text-6xl lg:text-7xl">
35
+ Your All-in-One Platform
36
+ </h1>
37
+ <p className="mx-auto mt-6 max-w-2xl text-lg text-muted-foreground">
38
+ Build, deploy, and scale your SaaS application with modern tools, real-time analytics,
39
+ and enterprise-grade security.
40
+ </p>
41
+ <div className="mt-10 flex items-center justify-center gap-4">
42
+ <a
43
+ href="/pricing"
44
+ className="inline-flex items-center gap-2 rounded-xl bg-primary px-6 py-3 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:bg-primary/90 hover:shadow-xl hover:shadow-primary/30"
45
+ >
46
+ Get Started
47
+ <ArrowRight className="h-4 w-4" />
48
+ </a>
49
+ <a
50
+ href="/login"
51
+ className="inline-flex items-center gap-2 rounded-xl border border-border bg-background px-6 py-3 text-sm font-semibold text-foreground transition-all hover:bg-muted"
52
+ >
53
+ Sign In
54
+ </a>
55
+ </div>
56
+ </div>
57
+ </section>
58
+
59
+ <section id="features" className="border-t border-border px-4 py-24 sm:px-6 lg:px-8">
60
+ <div className="mx-auto max-w-7xl">
61
+ <div className="text-center">
62
+ <h2 className="text-3xl font-bold tracking-tight text-foreground sm:text-4xl">
63
+ Everything you need
64
+ </h2>
65
+ <p className="mt-4 text-lg text-muted-foreground">
66
+ Powerful features to help you scale your business.
67
+ </p>
68
+ </div>
69
+ <div className="mt-16 grid gap-8 sm:grid-cols-2 lg:grid-cols-3">
70
+ {features.map((feature) => {
71
+ const Icon = feature.icon;
72
+ return (
73
+ <div
74
+ key={feature.title}
75
+ className="group rounded-2xl border border-border bg-card p-6 transition-all hover:border-primary/50 hover:shadow-lg hover:shadow-primary/5"
76
+ >
77
+ <div className="flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 text-primary transition-colors group-hover:bg-primary/20">
78
+ <Icon className="h-6 w-6" />
79
+ </div>
80
+ <h3 className="mt-4 text-lg font-semibold text-card-foreground">
81
+ {feature.title}
82
+ </h3>
83
+ <p className="mt-2 text-sm text-muted-foreground">{feature.description}</p>
84
+ </div>
85
+ );
86
+ })}
87
+ </div>
88
+ </div>
89
+ </section>
90
+
91
+ <section className="border-t border-border px-4 py-24 sm:px-6 lg:px-8">
92
+ <div className="mx-auto max-w-4xl text-center">
93
+ <h2 className="text-3xl font-bold tracking-tight text-foreground sm:text-4xl">
94
+ Ready to get started?
95
+ </h2>
96
+ <p className="mt-4 text-lg text-muted-foreground">
97
+ Join thousands of teams already building with SaaS.
98
+ </p>
99
+ <a
100
+ href="/pricing"
101
+ className="mt-8 inline-flex items-center gap-2 rounded-xl bg-primary px-8 py-4 text-base font-semibold text-primary-foreground shadow-lg shadow-primary/25 transition-all hover:bg-primary/90 hover:shadow-xl hover:shadow-primary/30"
102
+ >
103
+ Start your free trial
104
+ <ArrowRight className="h-5 w-5" />
105
+ </a>
106
+ </div>
107
+ </section>
108
+ </div>
109
+ );
110
+ }
@@ -0,0 +1,67 @@
1
+ import { LogIn } from "lucide-react";
2
+ import { cn } from "../lib/utils";
3
+
4
+ export default function LoginPage() {
5
+ return (
6
+ <div className="flex min-h-[calc(100vh-4rem)] items-center justify-center px-4">
7
+ <div className="w-full max-w-sm">
8
+ <div className="rounded-2xl border border-border bg-card p-8 shadow-xl shadow-black/10">
9
+ <div className="mb-8 text-center">
10
+ <div className="mx-auto flex h-12 w-12 items-center justify-center rounded-xl bg-primary/10 text-primary">
11
+ <LogIn className="h-6 w-6" />
12
+ </div>
13
+ <h1 className="mt-4 text-2xl font-bold tracking-tight text-card-foreground">
14
+ Welcome back
15
+ </h1>
16
+ <p className="mt-2 text-sm text-muted-foreground">Sign in to your account</p>
17
+ </div>
18
+ <form className="space-y-5">
19
+ <div>
20
+ <label
21
+ htmlFor="email"
22
+ className="block text-sm font-medium text-card-foreground mb-1.5"
23
+ >
24
+ Email
25
+ </label>
26
+ <input
27
+ id="email"
28
+ type="email"
29
+ placeholder="you@example.com"
30
+ className="w-full rounded-xl border border-input bg-background px-4 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/20"
31
+ />
32
+ </div>
33
+ <div>
34
+ <label
35
+ htmlFor="password"
36
+ className="block text-sm font-medium text-card-foreground mb-1.5"
37
+ >
38
+ Password
39
+ </label>
40
+ <input
41
+ id="password"
42
+ type="password"
43
+ placeholder="••••••••"
44
+ className="w-full rounded-xl border border-input bg-background px-4 py-2.5 text-sm text-foreground placeholder:text-muted-foreground focus:border-ring focus:outline-none focus:ring-2 focus:ring-ring/20"
45
+ />
46
+ </div>
47
+ <button
48
+ type="submit"
49
+ className="w-full rounded-xl bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground shadow-lg shadow-primary/20 transition-all hover:bg-primary/90 hover:shadow-xl hover:shadow-primary/25"
50
+ >
51
+ Sign in
52
+ </button>
53
+ </form>
54
+ <p className="mt-6 text-center text-sm text-muted-foreground">
55
+ Don&apos;t have an account?{" "}
56
+ <a
57
+ href="/login"
58
+ className="font-medium text-foreground underline underline-offset-4 hover:text-primary transition-colors"
59
+ >
60
+ Register
61
+ </a>
62
+ </p>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ );
67
+ }
@@ -0,0 +1,121 @@
1
+ import { ArrowRight, Check } from "lucide-react";
2
+ import { cn } from "../lib/utils";
3
+
4
+ const tiers = [
5
+ {
6
+ name: "Free",
7
+ price: "$0",
8
+ period: "/month",
9
+ description: "Perfect for getting started.",
10
+ features: [
11
+ "1 project",
12
+ "1,000 API calls/mo",
13
+ "7-day history",
14
+ "Community support",
15
+ "Basic analytics",
16
+ ],
17
+ cta: "Get Started",
18
+ popular: false,
19
+ },
20
+ {
21
+ name: "Pro",
22
+ price: "$29",
23
+ period: "/month",
24
+ description: "For growing teams.",
25
+ features: [
26
+ "Unlimited projects",
27
+ "100,000 API calls/mo",
28
+ "90-day history",
29
+ "Priority support",
30
+ "Advanced analytics",
31
+ "Team members",
32
+ ],
33
+ cta: "Start Free Trial",
34
+ popular: true,
35
+ },
36
+ {
37
+ name: "Enterprise",
38
+ price: "$99",
39
+ period: "/month",
40
+ description: "For large organizations.",
41
+ features: [
42
+ "Everything in Pro",
43
+ "Unlimited API calls",
44
+ "Unlimited history",
45
+ "24/7 support",
46
+ "Custom integrations",
47
+ "SSO & audit logs",
48
+ ],
49
+ cta: "Contact Sales",
50
+ popular: false,
51
+ },
52
+ ];
53
+
54
+ export default function PricingPage() {
55
+ return (
56
+ <div className="px-4 py-24 sm:px-6 lg:px-8">
57
+ <div className="mx-auto max-w-7xl">
58
+ <div className="text-center">
59
+ <h1 className="text-4xl font-bold tracking-tight text-foreground sm:text-5xl">
60
+ Simple, transparent pricing
61
+ </h1>
62
+ <p className="mt-4 text-lg text-muted-foreground">
63
+ Choose the plan that fits your needs. No hidden fees.
64
+ </p>
65
+ </div>
66
+ <div className="mt-16 grid gap-8 lg:grid-cols-3">
67
+ {tiers.map((tier) => (
68
+ <div
69
+ key={tier.name}
70
+ className={cn(
71
+ "relative rounded-2xl border p-8 transition-all",
72
+ tier.popular
73
+ ? "border-primary bg-card shadow-xl shadow-primary/10 scale-105"
74
+ : "border-border bg-card hover:border-primary/50 hover:shadow-lg",
75
+ )}
76
+ >
77
+ {tier.popular && (
78
+ <div className="absolute -top-3 left-1/2 -translate-x-1/2">
79
+ <span className="inline-flex rounded-full bg-primary px-3 py-1 text-xs font-semibold text-primary-foreground shadow-sm">
80
+ Most popular
81
+ </span>
82
+ </div>
83
+ )}
84
+ <h3 className="text-xl font-bold text-card-foreground">{tier.name}</h3>
85
+ <p className="mt-2 text-sm text-muted-foreground">{tier.description}</p>
86
+ <div className="mt-6 flex items-baseline gap-1">
87
+ <span className="text-4xl font-bold tracking-tight text-card-foreground">
88
+ {tier.price}
89
+ </span>
90
+ <span className="text-sm text-muted-foreground">{tier.period}</span>
91
+ </div>
92
+ <ul className="mt-8 space-y-3">
93
+ {tier.features.map((feature) => (
94
+ <li
95
+ key={feature}
96
+ className="flex items-center gap-3 text-sm text-card-foreground"
97
+ >
98
+ <Check className="h-4 w-4 text-primary flex-shrink-0" />
99
+ {feature}
100
+ </li>
101
+ ))}
102
+ </ul>
103
+ <a
104
+ href="/login"
105
+ className={cn(
106
+ "mt-8 flex items-center justify-center gap-2 rounded-xl px-4 py-3 text-sm font-semibold transition-all",
107
+ tier.popular
108
+ ? "bg-primary text-primary-foreground shadow-lg shadow-primary/25 hover:bg-primary/90 hover:shadow-xl hover:shadow-primary/30"
109
+ : "border border-border bg-background text-foreground hover:bg-muted",
110
+ )}
111
+ >
112
+ {tier.cta}
113
+ <ArrowRight className="h-4 w-4" />
114
+ </a>
115
+ </div>
116
+ ))}
117
+ </div>
118
+ </div>
119
+ </div>
120
+ );
121
+ }
@@ -0,0 +1,90 @@
1
+ @import "tailwindcss";
2
+ @import "tw-animate-css";
3
+
4
+ @custom-variant dark (&:is(.dark *));
5
+
6
+ @theme inline {
7
+ --color-background: var(--background);
8
+ --color-foreground: var(--foreground);
9
+ --color-card: var(--card);
10
+ --color-card-foreground: var(--card-foreground);
11
+ --color-popover: var(--popover);
12
+ --color-popover-foreground: var(--popover-foreground);
13
+ --color-primary: var(--primary);
14
+ --color-primary-foreground: var(--primary-foreground);
15
+ --color-secondary: var(--secondary);
16
+ --color-secondary-foreground: var(--secondary-foreground);
17
+ --color-muted: var(--muted);
18
+ --color-muted-foreground: var(--muted-foreground);
19
+ --color-accent: var(--accent);
20
+ --color-accent-foreground: var(--accent-foreground);
21
+ --color-destructive: var(--destructive);
22
+ --color-destructive-foreground: var(--destructive-foreground);
23
+ --color-border: var(--border);
24
+ --color-input: var(--input);
25
+ --color-ring: var(--ring);
26
+ --color-chart-1: var(--chart-1);
27
+ --color-chart-2: var(--chart-2);
28
+ --color-chart-3: var(--chart-3);
29
+ --color-chart-4: var(--chart-4);
30
+ --color-chart-5: var(--chart-5);
31
+ --radius-sm: calc(var(--radius) * 0.6);
32
+ --radius-md: calc(var(--radius) * 0.8);
33
+ --radius-lg: var(--radius);
34
+ --radius-xl: calc(var(--radius) * 1.4);
35
+ --radius-2xl: calc(var(--radius) * 1.8);
36
+ --radius-3xl: calc(var(--radius) * 2.2);
37
+ --radius-4xl: calc(var(--radius) * 2.6);
38
+ --color-sidebar: var(--sidebar);
39
+ --color-sidebar-foreground: var(--sidebar-foreground);
40
+ --color-sidebar-primary: var(--sidebar-primary);
41
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
42
+ --color-sidebar-accent: var(--sidebar-accent);
43
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
44
+ --color-sidebar-border: var(--sidebar-border);
45
+ --color-sidebar-ring: var(--sidebar-ring);
46
+ }
47
+
48
+ :root {
49
+ --radius: 0.625rem;
50
+ --background: oklch(0.145 0 0);
51
+ --foreground: oklch(0.985 0 0);
52
+ --card: oklch(0.205 0 0);
53
+ --card-foreground: oklch(0.985 0 0);
54
+ --popover: oklch(0.205 0 0);
55
+ --popover-foreground: oklch(0.985 0 0);
56
+ --primary: oklch(0.922 0 0);
57
+ --primary-foreground: oklch(0.205 0 0);
58
+ --secondary: oklch(0.269 0 0);
59
+ --secondary-foreground: oklch(0.985 0 0);
60
+ --muted: oklch(0.269 0 0);
61
+ --muted-foreground: oklch(0.708 0 0);
62
+ --accent: oklch(0.269 0 0);
63
+ --accent-foreground: oklch(0.985 0 0);
64
+ --destructive: oklch(0.704 0.191 22.216);
65
+ --border: oklch(1 0 0 / 10%);
66
+ --input: oklch(1 0 0 / 15%);
67
+ --ring: oklch(0.556 0 0);
68
+ --chart-1: oklch(0.488 0.243 264.376);
69
+ --chart-2: oklch(0.696 0.17 162.48);
70
+ --chart-3: oklch(0.769 0.188 70.08);
71
+ --chart-4: oklch(0.627 0.265 303.9);
72
+ --chart-5: oklch(0.645 0.246 16.439);
73
+ --sidebar: oklch(0.205 0 0);
74
+ --sidebar-foreground: oklch(0.985 0 0);
75
+ --sidebar-primary: oklch(0.488 0.243 264.376);
76
+ --sidebar-primary-foreground: oklch(0.985 0 0);
77
+ --sidebar-accent: oklch(0.269 0 0);
78
+ --sidebar-foreground: oklch(0.985 0 0);
79
+ --sidebar-border: oklch(1 0 0 / 10%);
80
+ --sidebar-ring: oklch(0.556 0 0);
81
+ }
82
+
83
+ @layer base {
84
+ * {
85
+ @apply border-border outline-ring/50;
86
+ }
87
+ body {
88
+ @apply bg-background text-foreground;
89
+ }
90
+ }
@@ -0,0 +1,22 @@
1
+ // Auto-generated by @thexjs/core -- do not edit
2
+ export type RouteMap = {
3
+ "/": Record<string, never>;
4
+ "/pricing": Record<string, never>;
5
+ "/login": Record<string, never>;
6
+ "/dashboard/settings": Record<string, never>;
7
+ "/dashboard": Record<string, never>;
8
+ "/dashboard/analytics": Record<string, never>;
9
+ };
10
+
11
+ export function href<T extends keyof RouteMap & string>(
12
+ path: T,
13
+ ...[params]: RouteMap[T] extends Record<string, never> ? [] : [RouteMap[T]]
14
+ ): string {
15
+ if (!params) return path;
16
+ let result: string = path;
17
+ for (const [key, value] of Object.entries(params)) {
18
+ result = result.replace(new RegExp(`:${key}(?=/|$)`), encodeURIComponent(String(value)));
19
+ }
20
+ result = result.replace(/\*+$/, "");
21
+ return result;
22
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": { "noEmit": true, "baseUrl": ".", "paths": { "@/*": ["./src/*"] } },
4
+ "include": ["src"]
5
+ }
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from "@thexjs/core";
2
+ export default defineConfig({
3
+ pagesDir: "src/pages",
4
+ layoutsDir: "src/layouts",
5
+ apiDir: "src/api",
6
+ actionsDir: "src/actions",
7
+ });