Skip to content

Commit f76e82c

Browse files
committed
refactor: update database option to sqlite and replace framer-motion with motion
1 parent 60e7211 commit f76e82c

File tree

8 files changed

+59
-65
lines changed

8 files changed

+59
-65
lines changed

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"dependencies": {
1313
"@xyflow/react": "^12.4.3",
1414
"babel-plugin-react-compiler": "^19.0.0-beta-21e868a-20250216",
15-
"framer-motion": "^12.4.3",
1615
"fumadocs-core": "15.0.6",
1716
"fumadocs-mdx": "11.5.3",
1817
"fumadocs-ui": "15.0.6",
1918
"lucide-react": "^0.475.0",
19+
"motion": "^12.4.3",
2020
"next": "15.1.6",
2121
"react": "^19.0.0",
2222
"react-dom": "^19.0.0"

apps/web/src/app/(home)/_components/CustomizableSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { motion } from "framer-motion";
1+
import { motion } from "motion/react";
22
import CustomizableStack from "./CustomizableStack";
33

44
export default function CustomizableSection() {

apps/web/src/app/(home)/_components/CustomizableStack.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const CustomizableStack = () => {
4444
const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);
4545
const [activeNodes, setActiveNodes] = useState({
4646
backend: "hono",
47-
database: "libsql",
47+
database: "sqlite",
4848
orm: "drizzle",
4949
auth: "better-auth",
5050
});
@@ -140,9 +140,9 @@ const CustomizableStack = () => {
140140
const generateCommand = useCallback(() => {
141141
const flags: string[] = ["-y"];
142142

143-
if (activeNodes.database !== "libsql") {
143+
if (activeNodes.database !== "sqlite") {
144144
flags.splice(flags.indexOf("-y"), 1);
145-
flags.push(`--database ${activeNodes.database}`);
145+
flags.push(`--${activeNodes.database}`);
146146
}
147147

148148
if (activeNodes.auth !== "better-auth") {

apps/web/src/app/(home)/_components/Icons.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,23 @@ const PackageIcon = ({ pm, className }: { pm: string; className?: string }) => {
120120
/>
121121
</svg>
122122
);
123+
124+
case "github":
125+
return (
126+
<svg
127+
className={className}
128+
xmlns="http://www.w3.org/2000/svg"
129+
viewBox="0 0 97.63 96.03"
130+
>
131+
<title>Github</title>
132+
<path
133+
fill="#f0f6fc"
134+
fillRule="evenodd"
135+
d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a47 47 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0"
136+
clipRule="evenodd"
137+
/>
138+
</svg>
139+
);
123140
default:
124141
return null;
125142
}

apps/web/src/app/(home)/_components/Navbar.tsx

Lines changed: 33 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
"use client";
2+
import Link from "next/link";
23
import { useEffect, useRef, useState } from "react";
4+
import PackageIcon from "./Icons";
35

46
const Navbar = () => {
5-
const [activeLink, setActiveLink] = useState("about");
7+
const [activeLink, setActiveLink] = useState("home");
68
const [bgStyles, setBgStyles] = useState({});
79
const [scrolled, setScrolled] = useState(false);
810
const linkRefs = useRef<{ [key: string]: HTMLAnchorElement | null }>({});
@@ -56,57 +58,47 @@ const Navbar = () => {
5658

5759
<div
5860
className={`flex items-center backdrop-blur-md bg-white/5 rounded-full border border-white/10 py-1 px-1.5 text-sm relative transition-all duration-500 ease-out ${
59-
scrolled ? "w-[480px]" : "w-[350px]"
61+
scrolled ? "w-[420px]" : "w-[280px]"
6062
}`}
6163
>
6264
<div
6365
className="absolute transition-all duration-300 ease-in-out bg-white/5 border border-white/10 rounded-full py-2"
6466
style={bgStyles}
6567
/>
66-
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
67-
<a
68-
href="#about"
68+
<Link
69+
href="/"
6970
ref={(ref) => {
70-
linkRefs.current.about = ref;
71+
linkRefs.current.home = ref;
7172
}}
72-
onClick={() => setActiveLink("about")}
73+
onMouseOver={() => setActiveLink("home")}
7374
className="text-gray-300 hover:text-white transition-colors py-2 px-4 rounded-full relative"
7475
>
75-
About
76-
</a>
77-
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
78-
<a
79-
href="#careers"
76+
Home
77+
</Link>
78+
<Link
79+
href="https://www.github.com/better-t-stack/create-better-t-stack"
80+
target="_blank"
8081
ref={(ref) => {
81-
linkRefs.current.careers = ref;
82+
linkRefs.current.github = ref;
8283
}}
83-
onClick={() => setActiveLink("careers")}
84-
className="text-gray-300 hover:text-white transition-colors py-2 px-4 rounded-full relative"
85-
>
86-
Careers
87-
</a>
88-
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
89-
<a
90-
href="#blog"
91-
ref={(ref) => {
92-
linkRefs.current.blog = ref;
93-
}}
94-
onClick={() => setActiveLink("blog")}
95-
className="text-gray-300 hover:text-white transition-colors py-2 px-4 rounded-full relative"
84+
onMouseOver={() => setActiveLink("github")}
85+
onMouseLeave={() => setActiveLink("home")}
86+
className="text-gray-300 hover:text-white transition-colors py-2 px-4 rounded-full relative flex gap-2 items-center"
9687
>
97-
Blog
98-
</a>
99-
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
100-
<a
101-
href="#changelog"
88+
<PackageIcon pm="github" className="w-4 h-4" /> Github
89+
</Link>
90+
<Link
91+
href="https://www.npmjs.com/package/create-better-t-stack"
92+
target="_blank"
10293
ref={(ref) => {
103-
linkRefs.current.changelog = ref;
94+
linkRefs.current.npm = ref;
10495
}}
105-
onClick={() => setActiveLink("changelog")}
106-
className="text-gray-300 hover:text-white transition-colors py-2 px-4 rounded-full relative"
96+
onMouseOver={() => setActiveLink("npm")}
97+
onMouseLeave={() => setActiveLink("home")}
98+
className="text-gray-300 hover:text-white transition-colors py-2 px-4 rounded-full relative flex gap-2 items-center"
10799
>
108-
Changelog
109-
</a>
100+
<PackageIcon pm="npm" className="w-4 h-4 rounded-full" /> Npm
101+
</Link>
110102
<span
111103
className="text-gray-500 transition-all duration-300"
112104
style={{
@@ -116,13 +108,13 @@ const Navbar = () => {
116108
>
117109
|
118110
</span>
119-
{/* biome-ignore lint/a11y/useValidAnchor: <explanation> */}
120-
<a
121-
href="#documentation"
111+
<Link
112+
href="/docs"
122113
ref={(ref) => {
123114
linkRefs.current.documentation = ref;
124115
}}
125-
onClick={() => setActiveLink("documentation")}
116+
onMouseOver={() => setActiveLink("documentation")}
117+
onMouseLeave={() => setActiveLink("home")}
126118
style={{
127119
transform: scrolled ? "translateY(0)" : "translateY(-8px)",
128120
}}
@@ -133,7 +125,7 @@ const Navbar = () => {
133125
}`}
134126
>
135127
Documentation
136-
</a>
128+
</Link>
137129
</div>
138130

139131
<div

apps/web/src/app/(home)/_components/TechSelector.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@ type TechOption = {
55
};
66

77
const techOptions: Record<string, TechOption[]> = {
8-
backend: [
9-
{ id: "hono", label: "Hono", category: "backend" },
10-
{ id: "express", label: "Express", category: "backend" },
11-
],
128
database: [
13-
{ id: "libsql", label: "libSQL", category: "database" },
9+
{ id: "sqlite", label: "Sqlite", category: "database" },
1410
{ id: "postgres", label: "PostgreSQL", category: "database" },
1511
],
1612
orm: [

apps/web/src/lib/constant.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -170,19 +170,6 @@ export const initialNodes: TechNode[] = [
170170
group: "backend",
171171
},
172172
},
173-
{
174-
id: "express",
175-
type: "techNode",
176-
position: { x: 897, y: 389 },
177-
data: {
178-
label: "Express",
179-
category: "backend",
180-
description: "Fast, unopinionated web framework",
181-
isDefault: false,
182-
isActive: false,
183-
group: "backend",
184-
},
185-
},
186173
{
187174
id: "libsql",
188175
type: "techNode",

bun.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
"dependencies": {
4242
"@xyflow/react": "^12.4.3",
4343
"babel-plugin-react-compiler": "^19.0.0-beta-21e868a-20250216",
44-
"framer-motion": "^12.4.3",
4544
"fumadocs-core": "15.0.6",
4645
"fumadocs-mdx": "11.5.3",
4746
"fumadocs-ui": "15.0.6",
4847
"lucide-react": "^0.475.0",
48+
"motion": "^12.4.3",
4949
"next": "15.1.6",
5050
"react": "^19.0.0",
5151
"react-dom": "^19.0.0",
@@ -1233,6 +1233,8 @@
12331233

12341234
"minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="],
12351235

1236+
"motion": ["motion@12.4.3", "", { "dependencies": { "framer-motion": "^12.4.3", "tslib": "^2.4.0" }, "peerDependencies": { "@emotion/is-prop-valid": "*", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0" }, "optionalPeers": ["@emotion/is-prop-valid", "react", "react-dom"] }, "sha512-KeoMpKFEVdofN0v/z1g3tm4cMtk1WAHQ5Pg7M1ElxeRLA8cBSrkmSCJ9q6hLo7spp/n906h2kmeDNvBkysaxcQ=="],
1237+
12361238
"motion-dom": ["motion-dom@12.0.0", "", { "dependencies": { "motion-utils": "^12.0.0" } }, "sha512-CvYd15OeIR6kHgMdonCc1ihsaUG4MYh/wrkz8gZ3hBX/uamyZCXN9S9qJoYF03GqfTt7thTV/dxnHYX4+55vDg=="],
12371239

12381240
"motion-utils": ["motion-utils@12.0.0", "", {}, "sha512-MNFiBKbbqnmvOjkPyOKgHUp3Q6oiokLkI1bEwm5QA28cxMZrv0CbbBGDNmhF6DIXsi1pCQBSs0dX8xjeER1tmA=="],

0 commit comments

Comments
 (0)