@digilogiclabs/create-saas-app 1.1.0 → 1.1.2
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.
- package/CHANGELOG.md +1 -1
- package/README.md +5 -5
- package/bin/index.js +36 -3
- package/dist/.tsbuildinfo +1 -0
- package/dist/index.js +398 -20102
- package/dist/index.js.map +1 -1
- package/dist/mobile/base/template/.env.example +15 -0
- package/dist/templates/mobile/base/template/.env.example +15 -0
- package/dist/templates/mobile/base/template/App.tsx +88 -0
- package/dist/templates/mobile/base/template/app/(auth)/login.tsx +44 -0
- package/dist/templates/mobile/base/template/app/(auth)/signup.tsx +43 -0
- package/dist/templates/mobile/base/template/app/checkout.tsx +20 -0
- package/dist/templates/mobile/base/template/package.json +38 -0
- package/dist/templates/shared/auth/firebase/web/config.ts +23 -0
- package/dist/templates/shared/auth/supabase/web/config.ts +8 -0
- package/dist/templates/web/base/template/.env.example +15 -0
- package/dist/templates/web/base/template/.eslintrc.js +8 -0
- package/dist/templates/web/base/template/README.md +68 -0
- package/dist/templates/web/base/template/next.config.js +15 -0
- package/dist/templates/web/base/template/package.json +48 -0
- package/dist/templates/web/base/template/postcss.config.js +7 -0
- package/dist/templates/web/base/template/src/app/auth/callback/route.ts +18 -0
- package/dist/templates/web/base/template/src/app/checkout/page.tsx +28 -0
- package/dist/templates/web/base/template/src/app/globals.css +60 -0
- package/dist/templates/web/base/template/src/app/layout.tsx +29 -0
- package/dist/templates/web/base/template/src/app/login/page.tsx +39 -0
- package/dist/templates/web/base/template/src/app/page.tsx +132 -0
- package/dist/templates/web/base/template/src/app/signup/page.tsx +39 -0
- package/dist/templates/web/base/template/src/components/providers/app-providers.tsx +29 -0
- package/dist/templates/web/base/template/src/components/shared/header.tsx +42 -0
- package/dist/templates/web/base/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/base/template/src/components/ui/button.tsx +56 -0
- package/dist/templates/web/base/template/src/components/ui/card.tsx +71 -0
- package/dist/templates/web/base/template/src/lib/utils.ts +7 -0
- package/dist/templates/web/base/template/tailwind.config.js +77 -0
- package/dist/templates/web/base/template/tsconfig.json +33 -0
- package/dist/templates/web/base/template.backup/.env.example +15 -0
- package/dist/templates/web/base/template.backup.20250817/.env.example +15 -0
- package/dist/templates/web/ui-package-test/template/package.json +42 -0
- package/dist/templates/web/ui-package-test/template/src/app/page.tsx +106 -0
- package/dist/templates/web/ui-package-test/template/tsconfig.json +41 -0
- package/dist/templates/web/web-ui-package/template/.env.example +15 -0
- package/dist/templates/web/web-ui-package/template/.eslintrc.js +8 -0
- package/dist/templates/web/web-ui-package/template/README.md +68 -0
- package/dist/templates/web/web-ui-package/template/next.config.js +15 -0
- package/dist/templates/web/web-ui-package/template/package.json +39 -0
- package/dist/templates/web/web-ui-package/template/postcss.config.js +7 -0
- package/dist/templates/web/web-ui-package/template/src/app/auth/callback/route.ts +18 -0
- package/dist/templates/web/web-ui-package/template/src/app/checkout/page.tsx +28 -0
- package/dist/templates/web/web-ui-package/template/src/app/globals.css +42 -0
- package/dist/templates/web/web-ui-package/template/src/app/layout.tsx +29 -0
- package/dist/templates/web/web-ui-package/template/src/app/login/page.tsx +39 -0
- package/dist/templates/web/web-ui-package/template/src/app/page.tsx +91 -0
- package/dist/templates/web/web-ui-package/template/src/app/signup/page.tsx +39 -0
- package/dist/templates/web/web-ui-package/template/src/components/providers/app-providers.tsx +29 -0
- package/dist/templates/web/web-ui-package/template/src/components/shared/header.tsx +42 -0
- package/dist/templates/web/web-ui-package/template/src/components/ui/badge.tsx +36 -0
- package/dist/templates/web/web-ui-package/template/src/lib/utils.ts +7 -0
- package/dist/templates/web/web-ui-package/template/tailwind.config.js +77 -0
- package/dist/templates/web/web-ui-package/template/tsconfig.json +33 -0
- package/dist/templates/web/web-ui-package/template.backup/.env.example +15 -0
- package/dist/templates/web/web-ui-package/template.backup.20250817/.env.example +15 -0
- package/dist/web/base/template/.env.example +15 -0
- package/dist/web/base/template/.eslintrc.js +8 -0
- package/dist/web/base/template.backup/.env.example +15 -0
- package/dist/web/base/template.backup.20250817/.env.example +15 -0
- package/dist/web/ui-package-test/template/.env.example +15 -0
- package/dist/web/ui-package-test/template/.eslintrc.js +8 -0
- package/dist/web/ui-package-test/template.backup/.env.example +15 -0
- package/dist/web/ui-package-test/template.backup.20250817/.env.example +15 -0
- package/dist/web/web-ui-package/template/.env.example +15 -0
- package/dist/web/web-ui-package/template/.eslintrc.js +8 -0
- package/dist/web/web-ui-package/template.backup/.env.example +15 -0
- package/dist/web/web-ui-package/template.backup.20250817/.env.example +15 -0
- package/package.json +105 -105
- package/src/templates/mobile/base/template/.env.example +15 -0
- package/src/templates/mobile/base/template/App.tsx +51 -10
- package/src/templates/mobile/base/template/app/(auth)/login.tsx +44 -0
- package/src/templates/mobile/base/template/app/(auth)/signup.tsx +43 -0
- package/src/templates/mobile/base/template/app/checkout.tsx +20 -0
- package/src/templates/mobile/base/template/package.json +6 -6
- package/src/templates/shared/auth/firebase/web/config.ts +23 -24
- package/src/templates/shared/auth/supabase/web/config.ts +8 -9
- package/src/templates/web/base/template/.env.example +12 -31
- package/src/templates/web/base/template/package.json +6 -6
- package/src/templates/web/base/template/src/app/auth/callback/route.ts +18 -0
- package/src/templates/web/base/template/src/app/checkout/page.tsx +28 -0
- package/src/templates/web/base/template/src/app/layout.tsx +2 -1
- package/src/templates/web/base/template/src/app/login/page.tsx +39 -0
- package/src/templates/web/base/template/src/app/page.tsx +34 -10
- package/src/templates/web/base/template/src/app/signup/page.tsx +39 -0
- package/src/templates/web/base/template/src/components/providers/app-providers.tsx +17 -9
- package/src/templates/web/base/template/src/components/shared/header.tsx +42 -0
- package/src/templates/web/base/template/tailwind.config.js +1 -1
- package/src/templates/web/base/template.backup/.env.example +15 -0
- package/src/templates/web/base/template.backup.20250817/.env.example +15 -0
- package/src/templates/web/ui-package-test/template/next-env.d.ts +5 -0
- package/src/templates/web/ui-package-test/template/package.json +42 -0
- package/src/templates/web/ui-package-test/template/src/app/page.tsx +106 -0
- package/src/templates/web/ui-package-test/template/tsconfig.json +41 -0
- package/src/templates/web/web-ui-package/template/.env.example +15 -0
- package/src/templates/web/web-ui-package/template/.eslintrc.js +8 -0
- package/src/templates/web/web-ui-package/template/README.md +68 -0
- package/src/templates/web/web-ui-package/template/next.config.js +15 -0
- package/src/templates/web/web-ui-package/template/package.json +39 -0
- package/src/templates/web/web-ui-package/template/postcss.config.js +7 -0
- package/src/templates/web/web-ui-package/template/src/app/auth/callback/route.ts +18 -0
- package/src/templates/web/web-ui-package/template/src/app/checkout/page.tsx +28 -0
- package/src/templates/web/web-ui-package/template/src/app/globals.css +42 -0
- package/src/templates/web/web-ui-package/template/src/app/layout.tsx +29 -0
- package/src/templates/web/web-ui-package/template/src/app/login/page.tsx +39 -0
- package/src/templates/web/web-ui-package/template/src/app/page.tsx +91 -0
- package/src/templates/web/web-ui-package/template/src/app/signup/page.tsx +39 -0
- package/src/templates/web/web-ui-package/template/src/components/providers/app-providers.tsx +29 -0
- package/src/templates/web/web-ui-package/template/src/components/shared/header.tsx +42 -0
- package/src/templates/web/web-ui-package/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/web-ui-package/template/src/lib/utils.ts +7 -0
- package/src/templates/web/web-ui-package/template/tailwind.config.js +77 -0
- package/src/templates/web/web-ui-package/template/tsconfig.json +33 -0
- package/src/templates/web/web-ui-package/template.backup/.env.example +15 -0
- package/src/templates/web/web-ui-package/template.backup.20250817/.env.example +15 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button } from '@digilogiclabs/saas-factory-ui';
|
|
3
|
+
|
|
4
|
+
export default function Home() {
|
|
5
|
+
return (
|
|
6
|
+
<main className="flex min-h-screen flex-col items-center justify-between p-24">
|
|
7
|
+
<div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
|
|
8
|
+
<p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
|
|
9
|
+
Get started by editing
|
|
10
|
+
<code className="font-mono font-bold">src/app/page.tsx</code>
|
|
11
|
+
</p>
|
|
12
|
+
<div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
|
|
13
|
+
<a
|
|
14
|
+
className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0"
|
|
15
|
+
href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
|
16
|
+
target="_blank"
|
|
17
|
+
rel="noopener noreferrer"
|
|
18
|
+
>
|
|
19
|
+
By{' '}
|
|
20
|
+
<img src="/vercel.svg" alt="Vercel Logo" className="dark:invert" width={100} height={24} />
|
|
21
|
+
</a>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<div className="relative flex place-items-center before:absolute before:h-[300px] before:w-full sm:before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-full sm:after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
|
|
26
|
+
<img
|
|
27
|
+
className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert"
|
|
28
|
+
src="/next.svg"
|
|
29
|
+
alt="Next.js Logo"
|
|
30
|
+
width={180}
|
|
31
|
+
height={37}
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
|
|
36
|
+
<a
|
|
37
|
+
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
|
38
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
39
|
+
target="_blank"
|
|
40
|
+
rel="noopener noreferrer"
|
|
41
|
+
>
|
|
42
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
43
|
+
Docs{' '}
|
|
44
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
45
|
+
->
|
|
46
|
+
</span>
|
|
47
|
+
</h2>
|
|
48
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
49
|
+
Find in-depth information about Next.js features and API.
|
|
50
|
+
</p>
|
|
51
|
+
</a>
|
|
52
|
+
|
|
53
|
+
<a
|
|
54
|
+
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
|
|
55
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800 hover:dark:bg-opacity-30"
|
|
56
|
+
target="_blank"
|
|
57
|
+
rel="noopener noreferrer"
|
|
58
|
+
>
|
|
59
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
60
|
+
Learn{' '}
|
|
61
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
62
|
+
->
|
|
63
|
+
</span>
|
|
64
|
+
</h2>
|
|
65
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
66
|
+
Learn about Next.js in an interactive course with quizzes!
|
|
67
|
+
</p>
|
|
68
|
+
</a>
|
|
69
|
+
|
|
70
|
+
<a
|
|
71
|
+
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
|
72
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
73
|
+
target="_blank"
|
|
74
|
+
rel="noopener noreferrer"
|
|
75
|
+
>
|
|
76
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
77
|
+
Templates{' '}
|
|
78
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
79
|
+
->
|
|
80
|
+
</span>
|
|
81
|
+
</h2>
|
|
82
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50`}>
|
|
83
|
+
Explore starter templates for Next.js.
|
|
84
|
+
</p>
|
|
85
|
+
</a>
|
|
86
|
+
|
|
87
|
+
<a
|
|
88
|
+
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app"
|
|
89
|
+
className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30"
|
|
90
|
+
target="_blank"
|
|
91
|
+
rel="noopener noreferrer"
|
|
92
|
+
>
|
|
93
|
+
<h2 className={`mb-3 text-2xl font-semibold`}>
|
|
94
|
+
Deploy{' '}
|
|
95
|
+
<span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
|
|
96
|
+
->
|
|
97
|
+
</span>
|
|
98
|
+
</h2>
|
|
99
|
+
<p className={`m-0 max-w-[30ch] text-sm opacity-50 text-balance`}>
|
|
100
|
+
Instantly deploy your Next.js site to a shareable URL with Vercel.
|
|
101
|
+
</p>
|
|
102
|
+
</a>
|
|
103
|
+
</div>
|
|
104
|
+
</main>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"module": "esnext",
|
|
16
|
+
"moduleResolution": "node",
|
|
17
|
+
"resolveJsonModule": true,
|
|
18
|
+
"isolatedModules": true,
|
|
19
|
+
"jsx": "preserve",
|
|
20
|
+
"incremental": true,
|
|
21
|
+
"plugins": [
|
|
22
|
+
{
|
|
23
|
+
"name": "next"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"paths": {
|
|
27
|
+
"@/*": [
|
|
28
|
+
"./src/*"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"include": [
|
|
33
|
+
"next-env.d.ts",
|
|
34
|
+
"**/*.ts",
|
|
35
|
+
"**/*.tsx",
|
|
36
|
+
".next/types/**/*.ts"
|
|
37
|
+
],
|
|
38
|
+
"exclude": [
|
|
39
|
+
"node_modules"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Auth Configuration
|
|
2
|
+
NEXT_PUBLIC_AUTH_PROVIDER=supabase|firebase
|
|
3
|
+
|
|
4
|
+
# Supabase
|
|
5
|
+
NEXT_PUBLIC_SUPABASE_URL=
|
|
6
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=
|
|
7
|
+
|
|
8
|
+
# Firebase
|
|
9
|
+
NEXT_PUBLIC_FIREBASE_API_KEY=
|
|
10
|
+
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
|
|
11
|
+
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
|
|
12
|
+
|
|
13
|
+
# Payments
|
|
14
|
+
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
|
|
15
|
+
STRIPE_SECRET_KEY=
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# {{titleCaseName}}
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
First, run the development server:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run dev
|
|
11
|
+
# or
|
|
12
|
+
yarn dev
|
|
13
|
+
# or
|
|
14
|
+
pnpm dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- ⚡ **Next.js 14** - React framework with App Router
|
|
22
|
+
- 🎨 **Tailwind CSS** - Utility-first CSS framework
|
|
23
|
+
- 🔒 **{{#auth}}{{#firebase}}Firebase{{/firebase}}{{#supabase}}Supabase{{/supabase}}{{/auth}} Auth** - Authentication ready
|
|
24
|
+
- 📱 **Responsive Design** - Mobile-first approach
|
|
25
|
+
- 🌙 **Dark Mode** - Built-in theme switching
|
|
26
|
+
- 📦 **TypeScript** - Type-safe development
|
|
27
|
+
- 🎯 **ESLint & Prettier** - Code quality tools
|
|
28
|
+
|
|
29
|
+
## Project Structure
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
src/
|
|
33
|
+
├── app/ # Next.js App Router
|
|
34
|
+
│ ├── globals.css # Global styles
|
|
35
|
+
│ ├── layout.tsx # Root layout
|
|
36
|
+
│ └── page.tsx # Home page
|
|
37
|
+
├── components/ # React components
|
|
38
|
+
│ ├── ui/ # UI components
|
|
39
|
+
│ └── providers/ # Context providers
|
|
40
|
+
├── lib/ # Utility functions
|
|
41
|
+
├── hooks/ # Custom React hooks
|
|
42
|
+
└── types/ # TypeScript definitions
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Environment Variables
|
|
46
|
+
|
|
47
|
+
Copy `.env.example` to `.env.local` and fill in your configuration:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cp .env.example .env.local
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Deployment
|
|
54
|
+
|
|
55
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new).
|
|
56
|
+
|
|
57
|
+
Check out the [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
|
|
58
|
+
|
|
59
|
+
## Learn More
|
|
60
|
+
|
|
61
|
+
- [Next.js Documentation](https://nextjs.org/docs)
|
|
62
|
+
- [Tailwind CSS Documentation](https://tailwindcss.com/docs)
|
|
63
|
+
- [{{#auth}}{{#firebase}}Firebase Documentation{{/firebase}}{{#supabase}}Supabase Documentation{{/supabase}}{{/auth}}]({{#auth}}{{#firebase}}https://firebase.google.com/docs{{/firebase}}{{#supabase}}https://supabase.com/docs{{/supabase}}{{/auth}})
|
|
64
|
+
|
|
65
|
+
## Support
|
|
66
|
+
|
|
67
|
+
For support, email support@digilogiclabs.com or join our Discord community.
|
|
68
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "{{description}} (with UI Package v0.7.3)",
|
|
5
|
+
"private": true,
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "next dev",
|
|
8
|
+
"build": "next build",
|
|
9
|
+
"start": "next start",
|
|
10
|
+
"lint": "next lint",
|
|
11
|
+
"type-check": "tsc --noEmit"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"next": "^15.0.0",
|
|
15
|
+
"react": "^19.0.0",
|
|
16
|
+
"react-dom": "^19.0.0",
|
|
17
|
+
"@digilogiclabs/saas-factory-ui": "^0.7.3",
|
|
18
|
+
"tailwindcss": "^3.3.0",
|
|
19
|
+
"autoprefixer": "^10.4.16",
|
|
20
|
+
"postcss": "^8.4.31",
|
|
21
|
+
"clsx": "^2.0.0",
|
|
22
|
+
"class-variance-authority": "^0.7.0",
|
|
23
|
+
"tailwind-merge": "^2.0.0",
|
|
24
|
+
"next-themes": "^0.2.1",
|
|
25
|
+
"lucide-react": "^0.292.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"typescript": "^5.0.0",
|
|
29
|
+
"@types/node": "^20.0.0",
|
|
30
|
+
"@types/react": "^19.0.0",
|
|
31
|
+
"@types/react-dom": "^19.0.0",
|
|
32
|
+
"eslint": "^8.0.0",
|
|
33
|
+
"eslint-config-next": "^15.0.0",
|
|
34
|
+
"prettier": "^3.0.0"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18.0.0"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createRouteHandlerClient } from '@supabase/auth-helpers-nextjs';
|
|
2
|
+
import { cookies } from 'next/headers';
|
|
3
|
+
import { NextResponse } from 'next/server';
|
|
4
|
+
|
|
5
|
+
import type { NextRequest } from 'next/server';
|
|
6
|
+
|
|
7
|
+
export async function GET(request: NextRequest) {
|
|
8
|
+
const requestUrl = new URL(request.url);
|
|
9
|
+
const code = requestUrl.searchParams.get('code');
|
|
10
|
+
|
|
11
|
+
if (code) {
|
|
12
|
+
const supabase = createRouteHandlerClient({ cookies });
|
|
13
|
+
await supabase.auth.exchangeCodeForSession(code);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// URL to redirect to after sign in process completes
|
|
17
|
+
return NextResponse.redirect(requestUrl.origin);
|
|
18
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { useStripe } from '@digilogiclabs/saas-factory-payments';
|
|
5
|
+
import { Button } from '@/components/ui/button';
|
|
6
|
+
|
|
7
|
+
export default function CheckoutPage() {
|
|
8
|
+
const { handleCheckout } = useStripe();
|
|
9
|
+
|
|
10
|
+
const onCheckout = async () => {
|
|
11
|
+
await handleCheckout({
|
|
12
|
+
priceId: 'price_12345', // Replace with your actual price ID
|
|
13
|
+
returnUrl: `${window.location.origin}/dashboard`,
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="flex items-center justify-center min-h-screen bg-gray-100">
|
|
19
|
+
<div className="p-8 bg-white rounded-lg shadow-md">
|
|
20
|
+
<h1 className="text-2xl font-bold mb-4">Checkout</h1>
|
|
21
|
+
<p className="mb-6">Click the button below to proceed to payment.</p>
|
|
22
|
+
<Button onClick={onCheckout}>
|
|
23
|
+
Proceed to Checkout
|
|
24
|
+
</Button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
/* Import SaaS Factory UI styles */
|
|
6
|
+
@import '@digilogiclabs/saas-factory-ui/dist/index.css';
|
|
7
|
+
|
|
8
|
+
@layer base {
|
|
9
|
+
:root {
|
|
10
|
+
--background: 0 0% 100%;
|
|
11
|
+
--foreground: 222.2 84% 4.9%;
|
|
12
|
+
--card: 0 0% 100%;
|
|
13
|
+
--card-foreground: 222.2 84% 4.9%;
|
|
14
|
+
--primary: 221.2 83.2% 53.3%;
|
|
15
|
+
--primary-foreground: 210 40% 98%;
|
|
16
|
+
--secondary: 210 40% 96%;
|
|
17
|
+
--secondary-foreground: 222.2 84% 4.9%;
|
|
18
|
+
--border: 214.3 31.8% 91.4%;
|
|
19
|
+
--radius: 0.5rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.dark {
|
|
23
|
+
--background: 222.2 84% 4.9%;
|
|
24
|
+
--foreground: 210 40% 98%;
|
|
25
|
+
--card: 222.2 84% 4.9%;
|
|
26
|
+
--card-foreground: 210 40% 98%;
|
|
27
|
+
--primary: 217.2 91.2% 59.8%;
|
|
28
|
+
--primary-foreground: 222.2 84% 4.9%;
|
|
29
|
+
--secondary: 217.2 32.6% 17.5%;
|
|
30
|
+
--secondary-foreground: 210 40% 98%;
|
|
31
|
+
--border: 217.2 32.6% 17.5%;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@layer base {
|
|
36
|
+
* {
|
|
37
|
+
@apply border-border;
|
|
38
|
+
}
|
|
39
|
+
body {
|
|
40
|
+
@apply bg-background text-foreground;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Metadata } from 'next'
|
|
2
|
+
import { Inter } from 'next/font/google'
|
|
3
|
+
import './globals.css'
|
|
4
|
+
import { AppProviders } from '@/components/providers/app-providers'
|
|
5
|
+
import { Header } from '@/components/shared/header'
|
|
6
|
+
|
|
7
|
+
const inter = Inter({ subsets: ['latin'] })
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
title: '{{titleCaseName}}',
|
|
11
|
+
description: '{{description}}',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default function RootLayout({
|
|
15
|
+
children,
|
|
16
|
+
}: {
|
|
17
|
+
children: React.ReactNode
|
|
18
|
+
}) {
|
|
19
|
+
return (
|
|
20
|
+
<html lang="en" suppressHydrationWarning>
|
|
21
|
+
<body className={inter.className}>
|
|
22
|
+
<AppProviders>
|
|
23
|
+
<Header />
|
|
24
|
+
{children}
|
|
25
|
+
</AppProviders>
|
|
26
|
+
</body>
|
|
27
|
+
</html>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { LoginForm } from '@digilogiclabs/saas-factory-ui';
|
|
4
|
+
import { AuthProvider } from '@digilogiclabs/saas-factory-auth';
|
|
5
|
+
import { createBrowserClient } from '@supabase/ssr';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
export default function LoginPage() {
|
|
9
|
+
const supabase = createBrowserClient(
|
|
10
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
11
|
+
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
const handleLogin = async (values: any) => {
|
|
15
|
+
await supabase.auth.signInWithPassword({
|
|
16
|
+
email: values.email,
|
|
17
|
+
password: values.password,
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const handleGoogleLogin = async () => {
|
|
22
|
+
await supabase.auth.signInWithOAuth({
|
|
23
|
+
provider: 'google',
|
|
24
|
+
options: {
|
|
25
|
+
redirectTo: `${location.origin}/auth/callback`,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className="flex items-center justify-center min-h-screen bg-gray-100">
|
|
32
|
+
<LoginForm
|
|
33
|
+
onSubmit={handleLogin}
|
|
34
|
+
onGoogleSignIn={handleGoogleLogin}
|
|
35
|
+
authProvider={AuthProvider.SUPABASE}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { Button, Card } from '@digilogiclabs/saas-factory-ui'
|
|
4
|
+
import { ArrowRight, Zap, Shield, Rocket, CheckCircle } from 'lucide-react'
|
|
5
|
+
import Link from 'next/link'
|
|
6
|
+
|
|
7
|
+
export default function Home() {
|
|
8
|
+
return (
|
|
9
|
+
<main className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800">
|
|
10
|
+
<div className="container mx-auto px-4 py-16">
|
|
11
|
+
{/* Hero Section */}
|
|
12
|
+
<div className="text-center mb-16">
|
|
13
|
+
<div className="inline-flex items-center px-4 py-2 rounded-full text-sm font-medium bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 mb-6">
|
|
14
|
+
<CheckCircle className="w-4 h-4 mr-2" />
|
|
15
|
+
UI Package v0.7.3 Integrated Successfully
|
|
16
|
+
</div>
|
|
17
|
+
<h1 className="text-4xl md:text-6xl font-bold text-gray-900 dark:text-white mb-6">
|
|
18
|
+
Welcome to{' '}
|
|
19
|
+
<span className="text-blue-600 dark:text-blue-400">{{titleCaseName}}</span>
|
|
20
|
+
</h1>
|
|
21
|
+
<p className="text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-2xl mx-auto">
|
|
22
|
+
{{description}}. This template uses the stable SaaS Factory UI package v0.7.3.
|
|
23
|
+
</p>
|
|
24
|
+
<div className="flex flex-col sm:flex-row gap-4 justify-center">
|
|
25
|
+
<Button size="lg" className="text-lg px-8">
|
|
26
|
+
Get Started
|
|
27
|
+
<ArrowRight className="ml-2 h-5 w-5" />
|
|
28
|
+
</Button>
|
|
29
|
+
<Button variant="outline" size="lg" className="text-lg px-8">
|
|
30
|
+
Learn More
|
|
31
|
+
</Button>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
{/* Component Showcase */}
|
|
36
|
+
<div className="grid md:grid-cols-3 gap-8 mb-16">
|
|
37
|
+
<Card className="text-center p-6">
|
|
38
|
+
<div className="mx-auto w-12 h-12 bg-blue-100 dark:bg-blue-900 rounded-lg flex items-center justify-center mb-4">
|
|
39
|
+
<Zap className="h-6 w-6 text-blue-600 dark:text-blue-400" />
|
|
40
|
+
</div>
|
|
41
|
+
<h3 className="text-xl font-semibold mb-2">UI Package Components</h3>
|
|
42
|
+
<p className="text-gray-600 dark:text-gray-300">
|
|
43
|
+
Button and Card components from @digilogiclabs/saas-factory-ui
|
|
44
|
+
</p>
|
|
45
|
+
</Card>
|
|
46
|
+
|
|
47
|
+
<Card className="text-center p-6">
|
|
48
|
+
<div className="mx-auto w-12 h-12 bg-green-100 dark:bg-green-900 rounded-lg flex items-center justify-center mb-4">
|
|
49
|
+
<Shield className="h-6 w-6 text-green-600 dark:text-green-400" />
|
|
50
|
+
</div>
|
|
51
|
+
<h3 className="text-xl font-semibold mb-2">Hybrid Architecture</h3>
|
|
52
|
+
<p className="text-gray-600 dark:text-gray-300">
|
|
53
|
+
Clean web build with no React Native contamination
|
|
54
|
+
</p>
|
|
55
|
+
</Card>
|
|
56
|
+
|
|
57
|
+
<Card className="text-center p-6">
|
|
58
|
+
<div className="mx-auto w-12 h-12 bg-purple-100 dark:bg-purple-900 rounded-lg flex items-center justify-center mb-4">
|
|
59
|
+
<Rocket className="h-6 w-6 text-purple-600 dark:text-purple-400" />
|
|
60
|
+
</div>
|
|
61
|
+
<h3 className="text-xl font-semibold mb-2">TypeScript Ready</h3>
|
|
62
|
+
<p className="text-gray-600 dark:text-gray-300">
|
|
63
|
+
Full type safety with enhanced component definitions
|
|
64
|
+
</p>
|
|
65
|
+
</Card>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
{/* Button Variants Showcase */}
|
|
69
|
+
<Card className="max-w-4xl mx-auto p-8">
|
|
70
|
+
<div className="text-center mb-6">
|
|
71
|
+
<h2 className="text-2xl font-bold mb-2">UI Package Component Showcase</h2>
|
|
72
|
+
<p className="text-gray-600 dark:text-gray-300">
|
|
73
|
+
Testing Button variants from the stable UI package
|
|
74
|
+
</p>
|
|
75
|
+
</div>
|
|
76
|
+
<div className="flex flex-wrap justify-center gap-4 mb-6">
|
|
77
|
+
<Button>Default Button</Button>
|
|
78
|
+
<Button variant="secondary">Secondary Button</Button>
|
|
79
|
+
<Button variant="outline">Outline Button</Button>
|
|
80
|
+
<Button disabled>Disabled Button</Button>
|
|
81
|
+
</div>
|
|
82
|
+
<div className="text-center">
|
|
83
|
+
<p className="text-sm text-gray-500">
|
|
84
|
+
All components imported from @digilogiclabs/saas-factory-ui v0.7.3
|
|
85
|
+
</p>
|
|
86
|
+
</div>
|
|
87
|
+
</Card>
|
|
88
|
+
</div>
|
|
89
|
+
</main>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { SignupForm } from '@digilogiclabs/saas-factory-ui';
|
|
4
|
+
import { AuthProvider } from '@digilogiclabs/saas-factory-auth';
|
|
5
|
+
import { createBrowserClient } from '@supabase/ssr';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
export default function SignupPage() {
|
|
9
|
+
const supabase = createBrowserClient(
|
|
10
|
+
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
|
11
|
+
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
const handleSignup = async (values: any) => {
|
|
15
|
+
await supabase.auth.signUp({
|
|
16
|
+
email: values.email,
|
|
17
|
+
password: values.password,
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const handleGoogleSignup = async () => {
|
|
22
|
+
await supabase.auth.signInWithOAuth({
|
|
23
|
+
provider: 'google',
|
|
24
|
+
options: {
|
|
25
|
+
redirectTo: `${location.origin}/auth/callback`,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<div className="flex items-center justify-center min-h-screen bg-gray-100">
|
|
32
|
+
<SignupForm
|
|
33
|
+
onSubmit={handleSignup}
|
|
34
|
+
onGoogleSignIn={handleGoogleSignup}
|
|
35
|
+
authProvider={AuthProvider.SUPABASE}
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import React from 'react'
|
|
4
|
+
import { AuthProvider } from '@digilogiclabs/saas-factory-auth'
|
|
5
|
+
import { ThemeProvider } from 'next-themes'
|
|
6
|
+
import { StripeProvider } from '@digilogiclabs/saas-factory-payments'
|
|
7
|
+
|
|
8
|
+
interface AppProvidersProps {
|
|
9
|
+
children: React.ReactNode
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function AppProviders({ children }: AppProvidersProps) {
|
|
13
|
+
return (
|
|
14
|
+
<AuthProvider provider="supabase">
|
|
15
|
+
<StripeProvider
|
|
16
|
+
stripeKey={process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY!}
|
|
17
|
+
>
|
|
18
|
+
<ThemeProvider
|
|
19
|
+
attribute="class"
|
|
20
|
+
defaultTheme="system"
|
|
21
|
+
enableSystem
|
|
22
|
+
disableTransitionOnChange
|
|
23
|
+
>
|
|
24
|
+
{children}
|
|
25
|
+
</ThemeProvider>
|
|
26
|
+
</StripeProvider>
|
|
27
|
+
</AuthProvider>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Link from 'next/link';
|
|
5
|
+
import { useAuth } from '@digilogiclabs/saas-factory-auth';
|
|
6
|
+
import { Button } from '@/components/ui/button';
|
|
7
|
+
import { LogOut } from 'lucide-react';
|
|
8
|
+
|
|
9
|
+
export function Header() {
|
|
10
|
+
const { user, signOut } = useAuth();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<header className="bg-white dark:bg-gray-800 shadow-md">
|
|
14
|
+
<div className="container mx-auto px-4 py-4 flex justify-between items-center">
|
|
15
|
+
<Link href="/" className="text-2xl font-bold text-gray-900 dark:text-white">
|
|
16
|
+
{{titleCaseName}}
|
|
17
|
+
</Link>
|
|
18
|
+
<nav className="flex items-center gap-4">
|
|
19
|
+
{user ? (
|
|
20
|
+
<>
|
|
21
|
+
<Link href="/dashboard" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
|
|
22
|
+
Dashboard
|
|
23
|
+
</Link>
|
|
24
|
+
<Button variant="ghost" size="icon" onClick={signOut}>
|
|
25
|
+
<LogOut className="h-5 w-5" />
|
|
26
|
+
</Button>
|
|
27
|
+
</>
|
|
28
|
+
) : (
|
|
29
|
+
<>
|
|
30
|
+
<Link href="/login" className="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
|
|
31
|
+
Login
|
|
32
|
+
</Link>
|
|
33
|
+
<Button asChild>
|
|
34
|
+
<Link href="/signup">Sign Up</Link>
|
|
35
|
+
</Button>
|
|
36
|
+
</>
|
|
37
|
+
)}
|
|
38
|
+
</nav>
|
|
39
|
+
</div>
|
|
40
|
+
</header>
|
|
41
|
+
);
|
|
42
|
+
}
|