@create-lft-app/nextjs 3.2.0 → 3.3.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/README.md +549 -549
- package/package.json +48 -48
- package/template/.claude/skills/anti-patterns.md +150 -0
- package/template/.claude/skills/drizzle-schema.md +178 -0
- package/template/.claude/skills/formatting.md +56 -0
- package/template/.claude/skills/module-architecture.md +143 -0
- package/template/.claude/skills/supabase-server-actions.md +199 -0
- package/template/.claude/skills/ui-patterns.md +161 -0
- package/template/CLAUDE.md +114 -1239
- package/template/drizzle.config.ts +12 -12
- package/template/eslint.config.mjs +16 -16
- package/template/gitignore +36 -36
- package/template/next.config.ts +7 -7
- package/template/package.json +86 -86
- package/template/postcss.config.mjs +7 -7
- package/template/proxy.ts +12 -12
- package/template/public/logolft.svg +11 -11
- package/template/src/app/(auth)/dashboard/dashboard-content.tsx +124 -124
- package/template/src/app/(auth)/dashboard/page.tsx +9 -9
- package/template/src/app/(auth)/layout.tsx +7 -7
- package/template/src/app/(auth)/users/page.tsx +9 -9
- package/template/src/app/(auth)/users/users-content.tsx +26 -26
- package/template/src/app/(public)/layout.tsx +7 -7
- package/template/src/app/(public)/login/page.tsx +17 -17
- package/template/src/app/api/webhooks/route.ts +20 -20
- package/template/src/app/globals.css +249 -249
- package/template/src/app/layout.tsx +37 -37
- package/template/src/app/page.tsx +5 -5
- package/template/src/app/providers.tsx +27 -27
- package/template/src/components/layout/main-content.tsx +28 -28
- package/template/src/components/layout/sidebar-context.tsx +33 -33
- package/template/src/components/layout/sidebar.tsx +141 -141
- package/template/src/components/tables/data-table-column-header.tsx +68 -68
- package/template/src/components/tables/data-table-date-filter.tsx +203 -203
- package/template/src/components/tables/data-table-faceted-filter.tsx +185 -185
- package/template/src/components/tables/data-table-filters-dropdown.tsx +130 -130
- package/template/src/components/tables/data-table-number-filter.tsx +295 -295
- package/template/src/components/tables/data-table-pagination.tsx +99 -99
- package/template/src/components/tables/data-table-toolbar.tsx +140 -140
- package/template/src/components/tables/data-table-view-options.tsx +63 -63
- package/template/src/components/tables/data-table.tsx +148 -148
- package/template/src/components/tables/index.ts +9 -9
- package/template/src/components/ui/accordion.tsx +58 -58
- package/template/src/components/ui/alert-dialog.tsx +165 -165
- package/template/src/components/ui/alert.tsx +66 -66
- package/template/src/components/ui/animations/index.ts +44 -44
- package/template/src/components/ui/avatar.tsx +55 -55
- package/template/src/components/ui/badge.tsx +50 -50
- package/template/src/components/ui/button.tsx +118 -118
- package/template/src/components/ui/calendar.tsx +220 -220
- package/template/src/components/ui/card.tsx +113 -113
- package/template/src/components/ui/checkbox.tsx +38 -38
- package/template/src/components/ui/collapsible.tsx +33 -33
- package/template/src/components/ui/command.tsx +196 -196
- package/template/src/components/ui/dialog.tsx +156 -156
- package/template/src/components/ui/dropdown-menu.tsx +280 -280
- package/template/src/components/ui/form.tsx +171 -171
- package/template/src/components/ui/icons.tsx +167 -167
- package/template/src/components/ui/input.tsx +28 -28
- package/template/src/components/ui/label.tsx +25 -25
- package/template/src/components/ui/motion.tsx +197 -197
- package/template/src/components/ui/page-transition.tsx +166 -166
- package/template/src/components/ui/popover.tsx +59 -59
- package/template/src/components/ui/progress.tsx +32 -32
- package/template/src/components/ui/radio-group.tsx +45 -45
- package/template/src/components/ui/scroll-area.tsx +63 -63
- package/template/src/components/ui/select.tsx +208 -208
- package/template/src/components/ui/separator.tsx +28 -28
- package/template/src/components/ui/sheet.tsx +170 -170
- package/template/src/components/ui/sidebar.tsx +726 -726
- package/template/src/components/ui/skeleton.tsx +15 -15
- package/template/src/components/ui/slider.tsx +58 -58
- package/template/src/components/ui/sonner.tsx +47 -47
- package/template/src/components/ui/spinner.tsx +27 -27
- package/template/src/components/ui/submit-button.tsx +47 -47
- package/template/src/components/ui/switch.tsx +31 -31
- package/template/src/components/ui/table.tsx +120 -120
- package/template/src/components/ui/tabs.tsx +75 -75
- package/template/src/components/ui/textarea.tsx +26 -26
- package/template/src/components/ui/tooltip.tsx +70 -70
- package/template/src/config/navigation.ts +59 -59
- package/template/src/config/roles.ts +27 -27
- package/template/src/config/site.ts +12 -12
- package/template/src/db/index.ts +12 -12
- package/template/src/db/schema/index.ts +1 -1
- package/template/src/db/schema/users.ts +16 -16
- package/template/src/db/seed.ts +39 -39
- package/template/src/hooks/index.ts +3 -3
- package/template/src/hooks/use-mobile.ts +21 -21
- package/template/src/hooks/useDataTable.ts +82 -82
- package/template/src/hooks/useDebounce.ts +49 -49
- package/template/src/hooks/useMediaQuery.ts +36 -36
- package/template/src/lib/date/config.ts +36 -36
- package/template/src/lib/date/formatters.ts +127 -127
- package/template/src/lib/date/index.ts +26 -26
- package/template/src/lib/excel/exporter.ts +89 -89
- package/template/src/lib/excel/index.ts +14 -14
- package/template/src/lib/excel/parser.ts +96 -96
- package/template/src/lib/query-client.ts +35 -35
- package/template/src/lib/supabase/admin.ts +23 -23
- package/template/src/lib/supabase/client.ts +11 -11
- package/template/src/lib/supabase/proxy.ts +67 -67
- package/template/src/lib/supabase/server.ts +38 -38
- package/template/src/lib/supabase/types.ts +53 -53
- package/template/src/lib/utils.ts +6 -6
- package/template/src/lib/validations/common.ts +75 -75
- package/template/src/lib/validations/index.ts +20 -20
- package/template/src/modules/auth/actions/auth-actions.ts +59 -59
- package/template/src/modules/auth/components/login-form.tsx +68 -68
- package/template/src/modules/auth/hooks/useAuth.ts +38 -38
- package/template/src/modules/auth/hooks/useAuthMutations.ts +43 -43
- package/template/src/modules/auth/hooks/useAuthQueries.ts +43 -43
- package/template/src/modules/auth/index.ts +12 -12
- package/template/src/modules/auth/schemas/auth.schema.ts +32 -32
- package/template/src/modules/auth/stores/useAuthStore.ts +37 -37
- package/template/src/modules/users/actions/users-actions.ts +166 -166
- package/template/src/modules/users/columns.tsx +106 -106
- package/template/src/modules/users/components/users-list.tsx +48 -48
- package/template/src/modules/users/hooks/useUsers.ts +39 -39
- package/template/src/modules/users/hooks/useUsersMutations.ts +55 -55
- package/template/src/modules/users/hooks/useUsersQueries.ts +35 -35
- package/template/src/modules/users/index.ts +30 -30
- package/template/src/modules/users/schemas/users.schema.ts +51 -51
- package/template/src/modules/users/stores/useUsersStore.ts +60 -60
- package/template/src/modules/users/types/auth-user.types.ts +42 -42
- package/template/src/modules/users/utils/user-mapper.ts +32 -32
- package/template/src/stores/index.ts +1 -1
- package/template/src/stores/useUiStore.ts +55 -55
- package/template/src/types/api.ts +28 -28
- package/template/src/types/index.ts +2 -2
- package/template/src/types/table.ts +34 -34
- package/template/supabase/config.toml +94 -94
- package/template/tsconfig.json +42 -42
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
# A string used to distinguish different Supabase projects on the same host. Defaults to the
|
|
2
|
-
# working directory name when running `supabase init`.
|
|
3
|
-
project_id = "lft-app"
|
|
4
|
-
|
|
5
|
-
[api]
|
|
6
|
-
enabled = true
|
|
7
|
-
# Port to use for the API URL.
|
|
8
|
-
port = 54321
|
|
9
|
-
# Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
|
|
10
|
-
# endpoints. public and storage are always included.
|
|
11
|
-
schemas = ["public", "storage", "graphql_public"]
|
|
12
|
-
# Extra schemas to add to the search_path of every request. public is always included.
|
|
13
|
-
extra_search_path = ["public", "extensions"]
|
|
14
|
-
# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
|
|
15
|
-
# for accidental or malicious requests.
|
|
16
|
-
max_rows = 1000
|
|
17
|
-
|
|
18
|
-
[db]
|
|
19
|
-
# Port to use for the local database URL.
|
|
20
|
-
port = 54322
|
|
21
|
-
# Port used by db diff command to initialise the shadow database.
|
|
22
|
-
shadow_port = 54320
|
|
23
|
-
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
|
|
24
|
-
# server_version;` on the remote database to check.
|
|
25
|
-
major_version = 15
|
|
26
|
-
|
|
27
|
-
[studio]
|
|
28
|
-
enabled = true
|
|
29
|
-
# Port to use for Supabase Studio.
|
|
30
|
-
port = 54323
|
|
31
|
-
# External URL of the API server that frontend connects to.
|
|
32
|
-
api_url = "http://localhost"
|
|
33
|
-
|
|
34
|
-
# Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
|
|
35
|
-
# are monitored, and you can view the emails that would have been sent from the web interface.
|
|
36
|
-
[inbucket]
|
|
37
|
-
enabled = true
|
|
38
|
-
# Port to use for the email testing server web interface.
|
|
39
|
-
port = 54324
|
|
40
|
-
# Uncomment to expose additional ports for testing user applications that send emails.
|
|
41
|
-
# smtp_port = 54325
|
|
42
|
-
# pop3_port = 54326
|
|
43
|
-
|
|
44
|
-
[storage]
|
|
45
|
-
enabled = true
|
|
46
|
-
# The maximum file size allowed (e.g. "5MB", "500KB").
|
|
47
|
-
file_size_limit = "50MiB"
|
|
48
|
-
|
|
49
|
-
[auth]
|
|
50
|
-
enabled = true
|
|
51
|
-
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
|
|
52
|
-
# in emails.
|
|
53
|
-
site_url = "http://localhost:3000"
|
|
54
|
-
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
|
|
55
|
-
additional_redirect_urls = ["https://localhost:3000"]
|
|
56
|
-
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
|
|
57
|
-
jwt_expiry = 3600
|
|
58
|
-
# If disabled, the refresh token will never expire.
|
|
59
|
-
enable_refresh_token_rotation = true
|
|
60
|
-
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
|
|
61
|
-
# Requires enable_refresh_token_rotation = true.
|
|
62
|
-
refresh_token_reuse_interval = 10
|
|
63
|
-
# Allow/disallow new user signups to your project.
|
|
64
|
-
enable_signup = true
|
|
65
|
-
|
|
66
|
-
[auth.email]
|
|
67
|
-
# Allow/disallow new user signups via email to your project.
|
|
68
|
-
enable_signup = true
|
|
69
|
-
# If enabled, a user will be required to confirm any email change on both the old, and new email
|
|
70
|
-
# addresses. If disabled, only the new email is required to confirm.
|
|
71
|
-
double_confirm_changes = true
|
|
72
|
-
# If enabled, users need to confirm their email address before signing in.
|
|
73
|
-
enable_confirmations = false
|
|
74
|
-
|
|
75
|
-
[auth.sms]
|
|
76
|
-
# Allow/disallow new user signups via SMS to your project.
|
|
77
|
-
enable_signup = true
|
|
78
|
-
# If enabled, users need to confirm their phone number before signing in.
|
|
79
|
-
enable_confirmations = false
|
|
80
|
-
|
|
81
|
-
# Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
|
|
82
|
-
[auth.sms.twilio]
|
|
83
|
-
enabled = false
|
|
84
|
-
account_sid = ""
|
|
85
|
-
message_service_sid = ""
|
|
86
|
-
# DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
|
|
87
|
-
auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"
|
|
88
|
-
|
|
89
|
-
[analytics]
|
|
90
|
-
enabled = false
|
|
91
|
-
port = 54327
|
|
92
|
-
vector_port = 54328
|
|
93
|
-
# Configure one of the supported backends: `postgres`, `bigquery`.
|
|
94
|
-
backend = "postgres"
|
|
1
|
+
# A string used to distinguish different Supabase projects on the same host. Defaults to the
|
|
2
|
+
# working directory name when running `supabase init`.
|
|
3
|
+
project_id = "lft-app"
|
|
4
|
+
|
|
5
|
+
[api]
|
|
6
|
+
enabled = true
|
|
7
|
+
# Port to use for the API URL.
|
|
8
|
+
port = 54321
|
|
9
|
+
# Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
|
|
10
|
+
# endpoints. public and storage are always included.
|
|
11
|
+
schemas = ["public", "storage", "graphql_public"]
|
|
12
|
+
# Extra schemas to add to the search_path of every request. public is always included.
|
|
13
|
+
extra_search_path = ["public", "extensions"]
|
|
14
|
+
# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
|
|
15
|
+
# for accidental or malicious requests.
|
|
16
|
+
max_rows = 1000
|
|
17
|
+
|
|
18
|
+
[db]
|
|
19
|
+
# Port to use for the local database URL.
|
|
20
|
+
port = 54322
|
|
21
|
+
# Port used by db diff command to initialise the shadow database.
|
|
22
|
+
shadow_port = 54320
|
|
23
|
+
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
|
|
24
|
+
# server_version;` on the remote database to check.
|
|
25
|
+
major_version = 15
|
|
26
|
+
|
|
27
|
+
[studio]
|
|
28
|
+
enabled = true
|
|
29
|
+
# Port to use for Supabase Studio.
|
|
30
|
+
port = 54323
|
|
31
|
+
# External URL of the API server that frontend connects to.
|
|
32
|
+
api_url = "http://localhost"
|
|
33
|
+
|
|
34
|
+
# Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
|
|
35
|
+
# are monitored, and you can view the emails that would have been sent from the web interface.
|
|
36
|
+
[inbucket]
|
|
37
|
+
enabled = true
|
|
38
|
+
# Port to use for the email testing server web interface.
|
|
39
|
+
port = 54324
|
|
40
|
+
# Uncomment to expose additional ports for testing user applications that send emails.
|
|
41
|
+
# smtp_port = 54325
|
|
42
|
+
# pop3_port = 54326
|
|
43
|
+
|
|
44
|
+
[storage]
|
|
45
|
+
enabled = true
|
|
46
|
+
# The maximum file size allowed (e.g. "5MB", "500KB").
|
|
47
|
+
file_size_limit = "50MiB"
|
|
48
|
+
|
|
49
|
+
[auth]
|
|
50
|
+
enabled = true
|
|
51
|
+
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
|
|
52
|
+
# in emails.
|
|
53
|
+
site_url = "http://localhost:3000"
|
|
54
|
+
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
|
|
55
|
+
additional_redirect_urls = ["https://localhost:3000"]
|
|
56
|
+
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
|
|
57
|
+
jwt_expiry = 3600
|
|
58
|
+
# If disabled, the refresh token will never expire.
|
|
59
|
+
enable_refresh_token_rotation = true
|
|
60
|
+
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
|
|
61
|
+
# Requires enable_refresh_token_rotation = true.
|
|
62
|
+
refresh_token_reuse_interval = 10
|
|
63
|
+
# Allow/disallow new user signups to your project.
|
|
64
|
+
enable_signup = true
|
|
65
|
+
|
|
66
|
+
[auth.email]
|
|
67
|
+
# Allow/disallow new user signups via email to your project.
|
|
68
|
+
enable_signup = true
|
|
69
|
+
# If enabled, a user will be required to confirm any email change on both the old, and new email
|
|
70
|
+
# addresses. If disabled, only the new email is required to confirm.
|
|
71
|
+
double_confirm_changes = true
|
|
72
|
+
# If enabled, users need to confirm their email address before signing in.
|
|
73
|
+
enable_confirmations = false
|
|
74
|
+
|
|
75
|
+
[auth.sms]
|
|
76
|
+
# Allow/disallow new user signups via SMS to your project.
|
|
77
|
+
enable_signup = true
|
|
78
|
+
# If enabled, users need to confirm their phone number before signing in.
|
|
79
|
+
enable_confirmations = false
|
|
80
|
+
|
|
81
|
+
# Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
|
|
82
|
+
[auth.sms.twilio]
|
|
83
|
+
enabled = false
|
|
84
|
+
account_sid = ""
|
|
85
|
+
message_service_sid = ""
|
|
86
|
+
# DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
|
|
87
|
+
auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"
|
|
88
|
+
|
|
89
|
+
[analytics]
|
|
90
|
+
enabled = false
|
|
91
|
+
port = 54327
|
|
92
|
+
vector_port = 54328
|
|
93
|
+
# Configure one of the supported backends: `postgres`, `bigquery`.
|
|
94
|
+
backend = "postgres"
|
package/template/tsconfig.json
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2017",
|
|
4
|
-
"lib": [
|
|
5
|
-
"dom",
|
|
6
|
-
"dom.iterable",
|
|
7
|
-
"esnext"
|
|
8
|
-
],
|
|
9
|
-
"allowJs": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"strict": true,
|
|
12
|
-
"noEmit": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"module": "esnext",
|
|
15
|
-
"moduleResolution": "bundler",
|
|
16
|
-
"resolveJsonModule": true,
|
|
17
|
-
"isolatedModules": true,
|
|
18
|
-
"jsx": "react-jsx",
|
|
19
|
-
"incremental": true,
|
|
20
|
-
"plugins": [
|
|
21
|
-
{
|
|
22
|
-
"name": "next"
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"paths": {
|
|
26
|
-
"@/*": [
|
|
27
|
-
"./src/*"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"include": [
|
|
32
|
-
"next-env.d.ts",
|
|
33
|
-
"**/*.ts",
|
|
34
|
-
"**/*.tsx",
|
|
35
|
-
".next/types/**/*.ts",
|
|
36
|
-
".next/dev/types/**/*.ts"
|
|
37
|
-
],
|
|
38
|
-
"exclude": [
|
|
39
|
-
"node_modules",
|
|
40
|
-
"supabase/functions"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"module": "esnext",
|
|
15
|
+
"moduleResolution": "bundler",
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"jsx": "react-jsx",
|
|
19
|
+
"incremental": true,
|
|
20
|
+
"plugins": [
|
|
21
|
+
{
|
|
22
|
+
"name": "next"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"paths": {
|
|
26
|
+
"@/*": [
|
|
27
|
+
"./src/*"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": [
|
|
32
|
+
"next-env.d.ts",
|
|
33
|
+
"**/*.ts",
|
|
34
|
+
"**/*.tsx",
|
|
35
|
+
".next/types/**/*.ts",
|
|
36
|
+
".next/dev/types/**/*.ts"
|
|
37
|
+
],
|
|
38
|
+
"exclude": [
|
|
39
|
+
"node_modules",
|
|
40
|
+
"supabase/functions"
|
|
41
|
+
]
|
|
42
|
+
}
|