add auth, drizzle, prisma setup logic with template

This commit is contained in:
Aman Varshney
2025-03-04 09:33:31 +05:30
parent 54d63823bb
commit 792885b9c4
68 changed files with 2692 additions and 921 deletions

View File

@@ -9,6 +9,8 @@ export function displayPostInstallInstructions(
depsInstalled: boolean,
orm?: string,
) {
const runCmd = packageManager === "npm" ? "npm run" : packageManager;
log.info(`${pc.cyan("Installation completed!")} Here are some next steps:
${
@@ -19,7 +21,7 @@ ${
orm === "prisma"
? `${pc.cyan("2.")} Generate Prisma client: ${pc.green(`${packageManager} run prisma:generate`)}
${pc.cyan("3.")} Push schema to database: ${pc.green(`${packageManager} run prisma:push`)}`
: `${pc.cyan("2.")} Apply migrations to your database: ${pc.green(`${packageManager} run drizzle:migrate`)}`
: `${pc.cyan("2.")} Apply migrations: ${pc.green(`${packageManager} run drizzle:migrate`)}`
}
`
@@ -32,19 +34,11 @@ Make sure to update ${pc.cyan("packages/server/.env")} with your PostgreSQL conn
`
: database === "sqlite"
? `${pc.yellow("Database Configuration:")}
${pc.cyan("packages/server/.env")} contains your SQLite/Turso connection details. Update if needed.
`
${pc.cyan("packages/server/.env")} contains your SQLite connection details. Update if needed.`
: ""
}${pc.yellow("Environment Variables:")}
Check ${pc.cyan(".env")} files in both client and server packages and update as needed.
}
${pc.yellow("Start Development:")}
${pc.cyan("cd")} ${projectName}${
!depsInstalled
? `
${pc.cyan(packageManager)} install`
: ""
}
${pc.cyan(packageManager === "npm" ? "npm run" : packageManager)} dev`);
${pc.cyan("cd")} ${projectName}${!depsInstalled ? `\n${pc.cyan(packageManager)} install` : ""}
${pc.cyan(runCmd)} dev`);
}