mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
add supabase database setup (#254)
This commit is contained in:
15
apps/web/public/icon/supabase.svg
Normal file
15
apps/web/public/icon/supabase.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg viewBox="0 0 109 113" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z" fill="url(#paint0_linear)"/>
|
||||
<path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0627L99.1935 40.0627C107.384 40.0627 111.952 49.5228 106.859 55.9374L63.7076 110.284Z" fill="url(#paint1_linear)" fill-opacity="0.2"/>
|
||||
<path d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z" fill="#3ECF8E"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear" x1="53.9738" y1="54.974" x2="94.1635" y2="71.8295" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#249361"/>
|
||||
<stop offset="1" stop-color="#3ECF8E"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear" x1="36.1558" y1="30.578" x2="54.4844" y2="65.0806" gradientUnits="userSpaceOnUse">
|
||||
<stop/>
|
||||
<stop offset="1" stop-opacity="0"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@@ -289,7 +289,6 @@ const analyzeStackCompatibility = (stack: StackState): CompatibilityResult => {
|
||||
`No backend requires ${displayName} to be '${valueDisplay}'.`,
|
||||
);
|
||||
notes[catKey].hasIssue = true;
|
||||
notes[catKey].hasIssue = true;
|
||||
(nextStack[catKey] as string | string[]) = value;
|
||||
changed = true;
|
||||
changes.push({
|
||||
@@ -512,6 +511,24 @@ const analyzeStackCompatibility = (stack: StackState): CompatibilityResult => {
|
||||
message: "Database set to 'PostgreSQL' (required by Neon)",
|
||||
});
|
||||
}
|
||||
} else if (nextStack.dbSetup === "supabase") {
|
||||
if (nextStack.database !== "postgres") {
|
||||
notes.dbSetup.notes.push(
|
||||
"Supabase (local) requires PostgreSQL. It will be selected.",
|
||||
);
|
||||
notes.database.notes.push(
|
||||
"Supabase (local) DB setup requires PostgreSQL. It will be selected.",
|
||||
);
|
||||
notes.dbSetup.hasIssue = true;
|
||||
notes.database.hasIssue = true;
|
||||
nextStack.database = "postgres";
|
||||
changed = true;
|
||||
changes.push({
|
||||
category: "dbSetup",
|
||||
message:
|
||||
"Database set to 'PostgreSQL' (required by Supabase setup)",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const isNuxt = nextStack.webFrontend.includes("nuxt");
|
||||
@@ -961,7 +978,6 @@ const StackBuilder = () => {
|
||||
|
||||
const disabledReasons = useMemo(() => {
|
||||
const reasons = new Map<string, string>();
|
||||
|
||||
const addRule = (category: string, techId: string, reason: string) => {
|
||||
reasons.set(`${category}-${techId}`, reason);
|
||||
};
|
||||
@@ -1219,6 +1235,14 @@ const StackBuilder = () => {
|
||||
"Disabled: Neon requires PostgreSQL. (Will auto-select if chosen)",
|
||||
);
|
||||
}
|
||||
} else if (techId === "supabase") {
|
||||
if (stack.database !== "postgres" && stack.database !== "none") {
|
||||
addRule(
|
||||
category,
|
||||
techId,
|
||||
"Disabled: Supabase (local) requires PostgreSQL. (Will auto-select if chosen)",
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -276,6 +276,13 @@ export const TECH_OPTIONS = {
|
||||
icon: "/icon/mongodb.svg",
|
||||
color: "from-green-400 to-green-600",
|
||||
},
|
||||
{
|
||||
id: "supabase",
|
||||
name: "Supabase",
|
||||
description: "Local Supabase stack (requires Docker)",
|
||||
icon: "/icon/supabase.svg",
|
||||
color: "from-emerald-400 to-emerald-600",
|
||||
},
|
||||
{
|
||||
id: "none",
|
||||
name: "Basic Setup",
|
||||
|
||||
Reference in New Issue
Block a user