add supabase database setup (#254)

This commit is contained in:
Aman Varshney
2025-05-13 19:50:36 +05:30
committed by GitHub
parent 745dca1d6a
commit 5c5a4b2293
12 changed files with 308 additions and 7 deletions

View File

@@ -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)",
);
}
}
}

View File

@@ -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",