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:
@@ -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