feat: complete SSR CRM and refine auth UI
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import { join } from "node:path";
|
||||
import type { AuthConfig } from "@wrnexus/auth";
|
||||
import type { AppConfig } from "@wrnexus/styles";
|
||||
import { auth } from "./app/lib/auth.ts";
|
||||
|
||||
const config = {
|
||||
seo: {
|
||||
title: "Northstar CRM",
|
||||
titleTemplate: "%s | Northstar CRM",
|
||||
description: "A complete WrNexus SQLite CRM example.",
|
||||
canonicalBase: "http://localhost:3000",
|
||||
},
|
||||
theme: { palette: "blue", default: "light" },
|
||||
db: { driver: "sqlite", url: "file:./crm.sqlite" },
|
||||
styles: {
|
||||
entry: "app/styles/global.css",
|
||||
async process({ entryPath, appRoot, mode }) {
|
||||
const args = ["@tailwindcss/cli", "-i", entryPath!];
|
||||
if (mode === "production") args.push("--minify");
|
||||
return await Bun.$.cwd(appRoot)`bunx ${args}`.text();
|
||||
},
|
||||
failureMode: "throw",
|
||||
},
|
||||
auth: {
|
||||
engine: auth,
|
||||
routes: true,
|
||||
middleware: true,
|
||||
components: true,
|
||||
migrations: true,
|
||||
baseUrl: "http://localhost:3000",
|
||||
},
|
||||
profiles: {
|
||||
test: { db: { driver: "sqlite", url: `file:${join(import.meta.dir, ".tmp-test.sqlite")}` } },
|
||||
},
|
||||
security: { cors: { enabled: false } },
|
||||
} satisfies AppConfig & { auth: AuthConfig };
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user