feat: dashboard, Convex auth, UI components, and LemonSpace branding

- Add dashboard shell with auth integration
- Wire Better Auth / Convex (client, server, HTTP routes)
- Add shadcn-style UI primitives and logo assets
- Update global styles and landing page
- Add internal docs (.docs)

Made-with: Cursor
This commit is contained in:
Matthias
2026-03-25 10:15:42 +01:00
parent 2cead5e87b
commit cd857a01f5
42 changed files with 24599 additions and 118 deletions

36
convex/auth.ts Normal file
View File

@@ -0,0 +1,36 @@
import { createClient, type GenericCtx } from "@convex-dev/better-auth";
import { convex } from "@convex-dev/better-auth/plugins";
import { components } from "./_generated/api";
import { DataModel } from "./_generated/dataModel";
import { query } from "./_generated/server";
import { betterAuth } from "better-auth/minimal";
import authConfig from "./auth.config";
const siteUrl = process.env.SITE_URL!;
// Component Client — stellt Adapter, Helper und Auth-Methoden bereit
export const authComponent = createClient<DataModel>(components.betterAuth);
// Auth Factory — wird pro Request aufgerufen (Convex ist request-scoped)
export const createAuth = (ctx: GenericCtx<DataModel>) => {
return betterAuth({
baseURL: siteUrl,
trustedOrigins: [siteUrl],
database: authComponent.adapter(ctx),
emailAndPassword: {
enabled: true,
requireEmailVerification: false, // Später auf true → useSend Integration
},
plugins: [
convex({ authConfig }),
],
});
};
// Helper Query: Aktuellen User abrufen (nutzbar in Frontend via useQuery)
export const getCurrentUser = query({
args: {},
handler: async (ctx) => {
return authComponent.safeGetAuthUser(ctx);
},
});