@vibiz/cli 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +36 -2
  2. package/dist/chunk-NWL4LVVI.js +1015 -0
  3. package/dist/src-BOTTM5XC.js +2230 -0
  4. package/dist/vibiz.js +3302 -0
  5. package/package.json +37 -4
  6. package/templates/nextjs-saas/.env.example +13 -0
  7. package/templates/nextjs-saas/README.md +106 -0
  8. package/templates/nextjs-saas/_gitignore +8 -0
  9. package/templates/nextjs-saas/_npmrc +1 -0
  10. package/templates/nextjs-saas/app/api/auth/[...path]/route.ts +30 -0
  11. package/templates/nextjs-saas/app/api/chat/route.ts +76 -0
  12. package/templates/nextjs-saas/app/dashboard/actions.ts +32 -0
  13. package/templates/nextjs-saas/app/dashboard/page.tsx +130 -0
  14. package/templates/nextjs-saas/app/globals.css +17 -0
  15. package/templates/nextjs-saas/app/layout.tsx +28 -0
  16. package/templates/nextjs-saas/app/not-found.tsx +13 -0
  17. package/templates/nextjs-saas/app/page.tsx +63 -0
  18. package/templates/nextjs-saas/app/sign-in/page.tsx +8 -0
  19. package/templates/nextjs-saas/app/sign-up/page.tsx +8 -0
  20. package/templates/nextjs-saas/app.config.ts +15 -0
  21. package/templates/nextjs-saas/components/analytics.tsx +20 -0
  22. package/templates/nextjs-saas/components/auth-form.tsx +144 -0
  23. package/templates/nextjs-saas/components/auth-page.tsx +30 -0
  24. package/templates/nextjs-saas/components/chat-box.tsx +95 -0
  25. package/templates/nextjs-saas/components/header.tsx +24 -0
  26. package/templates/nextjs-saas/components/not-configured.tsx +17 -0
  27. package/templates/nextjs-saas/components/replay-consent.tsx +75 -0
  28. package/templates/nextjs-saas/components/replay-identify.tsx +21 -0
  29. package/templates/nextjs-saas/components/sign-out-button.tsx +25 -0
  30. package/templates/nextjs-saas/components/ui.tsx +47 -0
  31. package/templates/nextjs-saas/db/migrate.ts +21 -0
  32. package/templates/nextjs-saas/db/schema.ts +18 -0
  33. package/templates/nextjs-saas/lib/auth/client.ts +6 -0
  34. package/templates/nextjs-saas/lib/auth/server.ts +44 -0
  35. package/templates/nextjs-saas/lib/db.ts +32 -0
  36. package/templates/nextjs-saas/lib/env.ts +36 -0
  37. package/templates/nextjs-saas/lib/replay.ts +55 -0
  38. package/templates/nextjs-saas/next.config.ts +9 -0
  39. package/templates/nextjs-saas/package-lock.json +5359 -0
  40. package/templates/nextjs-saas/package.json +32 -0
  41. package/templates/nextjs-saas/postcss.config.mjs +3 -0
  42. package/templates/nextjs-saas/proxy.ts +18 -0
  43. package/templates/nextjs-saas/tsconfig.json +21 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "nextjs-saas",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start",
9
+ "typecheck": "tsc --noEmit"
10
+ },
11
+ "engines": {
12
+ "node": ">=20.9.0"
13
+ },
14
+ "dependencies": {
15
+ "@neondatabase/auth": "0.5.0-beta",
16
+ "drizzle-orm": "0.45.3",
17
+ "next": "16.3.8",
18
+ "openai": "7.28.0",
19
+ "pg": "8.23.1",
20
+ "react": "19.2.8",
21
+ "react-dom": "19.2.8"
22
+ },
23
+ "devDependencies": {
24
+ "@tailwindcss/postcss": "4.3.3",
25
+ "@types/node": "24.19.1",
26
+ "@types/pg": "8.23.1",
27
+ "@types/react": "19.2.18",
28
+ "@types/react-dom": "19.2.7",
29
+ "tailwindcss": "4.3.3",
30
+ "typescript": "5.9.3"
31
+ }
32
+ }
@@ -0,0 +1,3 @@
1
+ export default {
2
+ plugins: { '@tailwindcss/postcss': {} },
3
+ };
@@ -0,0 +1,18 @@
1
+ import { type NextRequest, NextResponse } from 'next/server';
2
+ import { getAuth } from '@/lib/auth/server';
3
+ import { missingAuthEnv } from '@/lib/env';
4
+
5
+ /**
6
+ * Guards /dashboard: no session → /sign-in. It also finishes the Google
7
+ * sign-in round trip (it swaps the one-time code in the URL for a session
8
+ * cookie) and refreshes sessions. With sign-in unconfigured it lets the
9
+ * request through, and the page explains what is missing.
10
+ */
11
+ export default async function proxy(request: NextRequest) {
12
+ if (missingAuthEnv().length) return NextResponse.next();
13
+ return getAuth().middleware({ loginUrl: '/sign-in' })(request);
14
+ }
15
+
16
+ export const config = {
17
+ matcher: ['/dashboard/:path*'],
18
+ };
@@ -0,0 +1,21 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": false,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "noEmit": true,
9
+ "esModuleInterop": true,
10
+ "module": "esnext",
11
+ "moduleResolution": "bundler",
12
+ "resolveJsonModule": true,
13
+ "isolatedModules": true,
14
+ "jsx": "react-jsx",
15
+ "incremental": true,
16
+ "plugins": [{ "name": "next" }],
17
+ "paths": { "@/*": ["./*"] }
18
+ },
19
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", ".next/dev/types/**/*.ts"],
20
+ "exclude": ["node_modules"]
21
+ }