@digilogiclabs/create-saas-app 1.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.
- package/CHANGELOG.md +7 -0
- package/README.md +472 -0
- package/bin/index.js +3 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +20791 -0
- package/dist/index.js.map +1 -0
- package/package.json +105 -0
- package/src/templates/mobile/base/template/App.tsx +47 -0
- package/src/templates/mobile/base/template/package.json +38 -0
- package/src/templates/shared/auth/firebase/web/config.ts +24 -0
- package/src/templates/shared/auth/supabase/web/config.ts +9 -0
- package/src/templates/web/base/template/.env.example +34 -0
- package/src/templates/web/base/template/.eslintrc.js +8 -0
- package/src/templates/web/base/template/README.md +68 -0
- package/src/templates/web/base/template/next.config.js +15 -0
- package/src/templates/web/base/template/package.json +48 -0
- package/src/templates/web/base/template/postcss.config.js +7 -0
- package/src/templates/web/base/template/src/app/globals.css +60 -0
- package/src/templates/web/base/template/src/app/layout.tsx +28 -0
- package/src/templates/web/base/template/src/app/page.tsx +108 -0
- package/src/templates/web/base/template/src/components/providers/app-providers.tsx +21 -0
- package/src/templates/web/base/template/src/components/ui/badge.tsx +36 -0
- package/src/templates/web/base/template/src/components/ui/button.tsx +56 -0
- package/src/templates/web/base/template/src/components/ui/card.tsx +71 -0
- package/src/templates/web/base/template/src/lib/utils.ts +7 -0
- package/src/templates/web/base/template/tailwind.config.js +77 -0
- package/src/templates/web/base/template/tsconfig.json +33 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Slot } from "@radix-ui/react-slot"
|
|
3
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
|
|
6
|
+
const buttonVariants = cva(
|
|
7
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
+
destructive:
|
|
13
|
+
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
14
|
+
outline:
|
|
15
|
+
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
16
|
+
secondary:
|
|
17
|
+
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
18
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
19
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default: "h-10 px-4 py-2",
|
|
23
|
+
sm: "h-9 rounded-md px-3",
|
|
24
|
+
lg: "h-11 rounded-md px-8",
|
|
25
|
+
icon: "h-10 w-10",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: "default",
|
|
30
|
+
size: "default",
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
export interface ButtonProps
|
|
36
|
+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
37
|
+
VariantProps<typeof buttonVariants> {
|
|
38
|
+
asChild?: boolean
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
42
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
43
|
+
const Comp = asChild ? Slot : "button"
|
|
44
|
+
return (
|
|
45
|
+
<Comp
|
|
46
|
+
className={cn(buttonVariants({ variant, size, className }))}
|
|
47
|
+
ref={ref}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
Button.displayName = "Button"
|
|
54
|
+
|
|
55
|
+
export { Button, buttonVariants }
|
|
56
|
+
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "@/lib/utils"
|
|
3
|
+
|
|
4
|
+
const Card = React.forwardRef<
|
|
5
|
+
HTMLDivElement,
|
|
6
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
7
|
+
>(({ className, ...props }, ref) => (
|
|
8
|
+
<div
|
|
9
|
+
ref={ref}
|
|
10
|
+
className={cn(
|
|
11
|
+
"rounded-lg border bg-card text-card-foreground shadow-sm",
|
|
12
|
+
className
|
|
13
|
+
)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
))
|
|
17
|
+
Card.displayName = "Card"
|
|
18
|
+
|
|
19
|
+
const CardHeader = React.forwardRef<
|
|
20
|
+
HTMLDivElement,
|
|
21
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
22
|
+
>(({ className, ...props }, ref) => (
|
|
23
|
+
<div ref={ref} className={cn("flex flex-col space-y-1.5 p-6", className)} {...props} />
|
|
24
|
+
))
|
|
25
|
+
CardHeader.displayName = "CardHeader"
|
|
26
|
+
|
|
27
|
+
const CardTitle = React.forwardRef<
|
|
28
|
+
HTMLParagraphElement,
|
|
29
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
30
|
+
>(({ className, ...props }, ref) => (
|
|
31
|
+
<h3
|
|
32
|
+
ref={ref}
|
|
33
|
+
className={cn(
|
|
34
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
35
|
+
className
|
|
36
|
+
)}
|
|
37
|
+
{...props}
|
|
38
|
+
/>
|
|
39
|
+
))
|
|
40
|
+
CardTitle.displayName = "CardTitle"
|
|
41
|
+
|
|
42
|
+
const CardDescription = React.forwardRef<
|
|
43
|
+
HTMLParagraphElement,
|
|
44
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
45
|
+
>(({ className, ...props }, ref) => (
|
|
46
|
+
<p
|
|
47
|
+
ref={ref}
|
|
48
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
))
|
|
52
|
+
CardDescription.displayName = "CardDescription"
|
|
53
|
+
|
|
54
|
+
const CardContent = React.forwardRef<
|
|
55
|
+
HTMLDivElement,
|
|
56
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
57
|
+
>(({ className, ...props }, ref) => (
|
|
58
|
+
<div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
|
|
59
|
+
))
|
|
60
|
+
CardContent.displayName = "CardContent"
|
|
61
|
+
|
|
62
|
+
const CardFooter = React.forwardRef<
|
|
63
|
+
HTMLDivElement,
|
|
64
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
65
|
+
>(({ className, ...props }, ref) => (
|
|
66
|
+
<div ref={ref} className={cn("flex items-center p-6 pt-0", className)} {...props} />
|
|
67
|
+
))
|
|
68
|
+
CardFooter.displayName = "CardFooter"
|
|
69
|
+
|
|
70
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
|
|
71
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
darkMode: ["class"],
|
|
4
|
+
content: [
|
|
5
|
+
'./pages/**/*.{ts,tsx}',
|
|
6
|
+
'./components/**/*.{ts,tsx}',
|
|
7
|
+
'./app/**/*.{ts,tsx}',
|
|
8
|
+
'./src/**/*.{ts,tsx}',
|
|
9
|
+
],
|
|
10
|
+
theme: {
|
|
11
|
+
container: {
|
|
12
|
+
center: true,
|
|
13
|
+
padding: "2rem",
|
|
14
|
+
screens: {
|
|
15
|
+
"2xl": "1400px",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
extend: {
|
|
19
|
+
colors: {
|
|
20
|
+
border: "hsl(var(--border))",
|
|
21
|
+
input: "hsl(var(--input))",
|
|
22
|
+
ring: "hsl(var(--ring))",
|
|
23
|
+
background: "hsl(var(--background))",
|
|
24
|
+
foreground: "hsl(var(--foreground))",
|
|
25
|
+
primary: {
|
|
26
|
+
DEFAULT: "hsl(var(--primary))",
|
|
27
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
28
|
+
},
|
|
29
|
+
secondary: {
|
|
30
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
31
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
32
|
+
},
|
|
33
|
+
destructive: {
|
|
34
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
35
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
36
|
+
},
|
|
37
|
+
muted: {
|
|
38
|
+
DEFAULT: "hsl(var(--muted))",
|
|
39
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
40
|
+
},
|
|
41
|
+
accent: {
|
|
42
|
+
DEFAULT: "hsl(var(--accent))",
|
|
43
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
44
|
+
},
|
|
45
|
+
popover: {
|
|
46
|
+
DEFAULT: "hsl(var(--popover))",
|
|
47
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
48
|
+
},
|
|
49
|
+
card: {
|
|
50
|
+
DEFAULT: "hsl(var(--card))",
|
|
51
|
+
foreground: "hsl(var(--card-foreground))",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
borderRadius: {
|
|
55
|
+
lg: "var(--radius)",
|
|
56
|
+
md: "calc(var(--radius) - 2px)",
|
|
57
|
+
sm: "calc(var(--radius) - 4px)",
|
|
58
|
+
},
|
|
59
|
+
keyframes: {
|
|
60
|
+
"accordion-down": {
|
|
61
|
+
from: { height: 0 },
|
|
62
|
+
to: { height: "var(--radix-accordion-content-height)" },
|
|
63
|
+
},
|
|
64
|
+
"accordion-up": {
|
|
65
|
+
from: { height: "var(--radix-accordion-content-height)" },
|
|
66
|
+
to: { height: 0 },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
animation: {
|
|
70
|
+
"accordion-down": "accordion-down 0.2s ease-out",
|
|
71
|
+
"accordion-up": "accordion-up 0.2s ease-out",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
plugins: [require("tailwindcss-animate")],
|
|
76
|
+
}
|
|
77
|
+
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "es6"],
|
|
5
|
+
"allowJs": true,
|
|
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": "preserve",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"baseUrl": ".",
|
|
22
|
+
"paths": {
|
|
23
|
+
"@/*": ["./src/*"],
|
|
24
|
+
"@/components/*": ["./src/components/*"],
|
|
25
|
+
"@/lib/*": ["./src/lib/*"],
|
|
26
|
+
"@/hooks/*": ["./src/hooks/*"],
|
|
27
|
+
"@/types/*": ["./src/types/*"]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
31
|
+
"exclude": ["node_modules"]
|
|
32
|
+
}
|
|
33
|
+
|