@create-lft-app/nextjs 3.1.0 → 3.2.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 (128) hide show
  1. package/README.md +549 -549
  2. package/package.json +48 -48
  3. package/template/CLAUDE.md +1239 -279
  4. package/template/drizzle.config.ts +12 -12
  5. package/template/eslint.config.mjs +16 -16
  6. package/template/gitignore +36 -36
  7. package/template/next.config.ts +7 -7
  8. package/template/package.json +86 -86
  9. package/template/postcss.config.mjs +7 -7
  10. package/template/proxy.ts +12 -12
  11. package/template/public/logolft.svg +11 -11
  12. package/template/src/app/(auth)/dashboard/dashboard-content.tsx +124 -124
  13. package/template/src/app/(auth)/dashboard/page.tsx +9 -9
  14. package/template/src/app/(auth)/layout.tsx +7 -7
  15. package/template/src/app/(auth)/users/page.tsx +9 -9
  16. package/template/src/app/(auth)/users/users-content.tsx +26 -26
  17. package/template/src/app/(public)/layout.tsx +7 -7
  18. package/template/src/app/(public)/login/page.tsx +17 -17
  19. package/template/src/app/api/webhooks/route.ts +20 -20
  20. package/template/src/app/globals.css +249 -249
  21. package/template/src/app/layout.tsx +37 -37
  22. package/template/src/app/page.tsx +5 -5
  23. package/template/src/app/providers.tsx +27 -27
  24. package/template/src/components/layout/main-content.tsx +28 -28
  25. package/template/src/components/layout/sidebar-context.tsx +33 -33
  26. package/template/src/components/layout/sidebar.tsx +141 -146
  27. package/template/src/components/tables/data-table-column-header.tsx +68 -68
  28. package/template/src/components/tables/data-table-date-filter.tsx +203 -0
  29. package/template/src/components/tables/data-table-faceted-filter.tsx +185 -0
  30. package/template/src/components/tables/data-table-filters-dropdown.tsx +130 -0
  31. package/template/src/components/tables/data-table-number-filter.tsx +295 -0
  32. package/template/src/components/tables/data-table-pagination.tsx +99 -99
  33. package/template/src/components/tables/data-table-toolbar.tsx +140 -50
  34. package/template/src/components/tables/data-table-view-options.tsx +63 -59
  35. package/template/src/components/tables/data-table.tsx +148 -128
  36. package/template/src/components/tables/index.ts +9 -5
  37. package/template/src/components/ui/accordion.tsx +58 -58
  38. package/template/src/components/ui/alert-dialog.tsx +165 -165
  39. package/template/src/components/ui/alert.tsx +66 -66
  40. package/template/src/components/ui/animations/index.ts +44 -44
  41. package/template/src/components/ui/avatar.tsx +55 -55
  42. package/template/src/components/ui/badge.tsx +50 -50
  43. package/template/src/components/ui/button.tsx +118 -118
  44. package/template/src/components/ui/calendar.tsx +220 -220
  45. package/template/src/components/ui/card.tsx +113 -113
  46. package/template/src/components/ui/checkbox.tsx +38 -38
  47. package/template/src/components/ui/collapsible.tsx +33 -33
  48. package/template/src/components/ui/command.tsx +196 -196
  49. package/template/src/components/ui/dialog.tsx +156 -156
  50. package/template/src/components/ui/dropdown-menu.tsx +280 -280
  51. package/template/src/components/ui/form.tsx +171 -171
  52. package/template/src/components/ui/icons.tsx +167 -167
  53. package/template/src/components/ui/input.tsx +28 -28
  54. package/template/src/components/ui/label.tsx +25 -25
  55. package/template/src/components/ui/motion.tsx +197 -197
  56. package/template/src/components/ui/page-transition.tsx +166 -166
  57. package/template/src/components/ui/popover.tsx +59 -59
  58. package/template/src/components/ui/progress.tsx +32 -32
  59. package/template/src/components/ui/radio-group.tsx +45 -45
  60. package/template/src/components/ui/scroll-area.tsx +63 -63
  61. package/template/src/components/ui/select.tsx +208 -208
  62. package/template/src/components/ui/separator.tsx +28 -28
  63. package/template/src/components/ui/sheet.tsx +170 -170
  64. package/template/src/components/ui/sidebar.tsx +726 -726
  65. package/template/src/components/ui/skeleton.tsx +15 -15
  66. package/template/src/components/ui/slider.tsx +58 -58
  67. package/template/src/components/ui/sonner.tsx +47 -47
  68. package/template/src/components/ui/spinner.tsx +27 -27
  69. package/template/src/components/ui/submit-button.tsx +47 -47
  70. package/template/src/components/ui/switch.tsx +31 -31
  71. package/template/src/components/ui/table.tsx +120 -120
  72. package/template/src/components/ui/tabs.tsx +75 -75
  73. package/template/src/components/ui/textarea.tsx +26 -26
  74. package/template/src/components/ui/tooltip.tsx +70 -70
  75. package/template/src/config/navigation.ts +59 -69
  76. package/template/src/config/roles.ts +27 -0
  77. package/template/src/config/site.ts +12 -12
  78. package/template/src/db/index.ts +12 -12
  79. package/template/src/db/schema/index.ts +1 -1
  80. package/template/src/db/schema/users.ts +16 -16
  81. package/template/src/db/seed.ts +39 -39
  82. package/template/src/hooks/index.ts +3 -3
  83. package/template/src/hooks/use-mobile.ts +21 -21
  84. package/template/src/hooks/useDataTable.ts +82 -82
  85. package/template/src/hooks/useDebounce.ts +49 -49
  86. package/template/src/hooks/useMediaQuery.ts +36 -36
  87. package/template/src/lib/date/config.ts +36 -34
  88. package/template/src/lib/date/formatters.ts +127 -120
  89. package/template/src/lib/date/index.ts +26 -19
  90. package/template/src/lib/excel/exporter.ts +89 -89
  91. package/template/src/lib/excel/index.ts +14 -14
  92. package/template/src/lib/excel/parser.ts +96 -96
  93. package/template/src/lib/query-client.ts +35 -35
  94. package/template/src/lib/supabase/admin.ts +23 -0
  95. package/template/src/lib/supabase/client.ts +11 -11
  96. package/template/src/lib/supabase/proxy.ts +67 -67
  97. package/template/src/lib/supabase/server.ts +38 -38
  98. package/template/src/lib/supabase/types.ts +53 -53
  99. package/template/src/lib/utils.ts +6 -6
  100. package/template/src/lib/validations/common.ts +75 -75
  101. package/template/src/lib/validations/index.ts +20 -20
  102. package/template/src/modules/auth/actions/auth-actions.ts +59 -59
  103. package/template/src/modules/auth/components/login-form.tsx +68 -68
  104. package/template/src/modules/auth/hooks/useAuth.ts +38 -38
  105. package/template/src/modules/auth/hooks/useAuthMutations.ts +43 -43
  106. package/template/src/modules/auth/hooks/useAuthQueries.ts +43 -43
  107. package/template/src/modules/auth/index.ts +12 -12
  108. package/template/src/modules/auth/schemas/auth.schema.ts +32 -32
  109. package/template/src/modules/auth/stores/useAuthStore.ts +37 -37
  110. package/template/src/modules/users/actions/users-actions.ts +166 -94
  111. package/template/src/modules/users/columns.tsx +106 -86
  112. package/template/src/modules/users/components/users-list.tsx +48 -22
  113. package/template/src/modules/users/hooks/useUsers.ts +39 -39
  114. package/template/src/modules/users/hooks/useUsersMutations.ts +55 -55
  115. package/template/src/modules/users/hooks/useUsersQueries.ts +35 -35
  116. package/template/src/modules/users/index.ts +30 -12
  117. package/template/src/modules/users/schemas/users.schema.ts +51 -23
  118. package/template/src/modules/users/stores/useUsersStore.ts +60 -60
  119. package/template/src/modules/users/types/auth-user.types.ts +42 -0
  120. package/template/src/modules/users/utils/user-mapper.ts +32 -0
  121. package/template/src/stores/index.ts +1 -1
  122. package/template/src/stores/useUiStore.ts +55 -55
  123. package/template/src/types/api.ts +28 -28
  124. package/template/src/types/index.ts +2 -2
  125. package/template/src/types/table.ts +34 -34
  126. package/template/supabase/config.toml +94 -94
  127. package/template/tsconfig.json +42 -42
  128. package/template/tsconfig.tsbuildinfo +1 -1
@@ -1,60 +1,60 @@
1
- import { create } from 'zustand'
2
-
3
- interface UsersState {
4
- state: {
5
- selectedUserId: string | null
6
- isFormOpen: boolean
7
- isDeleteDialogOpen: boolean
8
- searchQuery: string
9
- }
10
- actions: {
11
- setSelectedUserId: (id: string | null) => void
12
- openForm: () => void
13
- closeForm: () => void
14
- openDeleteDialog: (id: string) => void
15
- closeDeleteDialog: () => void
16
- setSearchQuery: (query: string) => void
17
- reset: () => void
18
- }
19
- }
20
-
21
- const initialState = {
22
- selectedUserId: null,
23
- isFormOpen: false,
24
- isDeleteDialogOpen: false,
25
- searchQuery: '',
26
- }
27
-
28
- export const useUsersStore = create<UsersState>()((set) => ({
29
- state: initialState,
30
- actions: {
31
- setSelectedUserId: (id) =>
32
- set((state) => ({
33
- state: { ...state.state, selectedUserId: id },
34
- })),
35
- openForm: () =>
36
- set((state) => ({
37
- state: { ...state.state, isFormOpen: true },
38
- })),
39
- closeForm: () =>
40
- set((state) => ({
41
- state: { ...state.state, isFormOpen: false, selectedUserId: null },
42
- })),
43
- openDeleteDialog: (id) =>
44
- set((state) => ({
45
- state: { ...state.state, isDeleteDialogOpen: true, selectedUserId: id },
46
- })),
47
- closeDeleteDialog: () =>
48
- set((state) => ({
49
- state: { ...state.state, isDeleteDialogOpen: false, selectedUserId: null },
50
- })),
51
- setSearchQuery: (query) =>
52
- set((state) => ({
53
- state: { ...state.state, searchQuery: query },
54
- })),
55
- reset: () =>
56
- set(() => ({
57
- state: initialState,
58
- })),
59
- },
60
- }))
1
+ import { create } from 'zustand'
2
+
3
+ interface UsersState {
4
+ state: {
5
+ selectedUserId: string | null
6
+ isFormOpen: boolean
7
+ isDeleteDialogOpen: boolean
8
+ searchQuery: string
9
+ }
10
+ actions: {
11
+ setSelectedUserId: (id: string | null) => void
12
+ openForm: () => void
13
+ closeForm: () => void
14
+ openDeleteDialog: (id: string) => void
15
+ closeDeleteDialog: () => void
16
+ setSearchQuery: (query: string) => void
17
+ reset: () => void
18
+ }
19
+ }
20
+
21
+ const initialState = {
22
+ selectedUserId: null,
23
+ isFormOpen: false,
24
+ isDeleteDialogOpen: false,
25
+ searchQuery: '',
26
+ }
27
+
28
+ export const useUsersStore = create<UsersState>()((set) => ({
29
+ state: initialState,
30
+ actions: {
31
+ setSelectedUserId: (id) =>
32
+ set((state) => ({
33
+ state: { ...state.state, selectedUserId: id },
34
+ })),
35
+ openForm: () =>
36
+ set((state) => ({
37
+ state: { ...state.state, isFormOpen: true },
38
+ })),
39
+ closeForm: () =>
40
+ set((state) => ({
41
+ state: { ...state.state, isFormOpen: false, selectedUserId: null },
42
+ })),
43
+ openDeleteDialog: (id) =>
44
+ set((state) => ({
45
+ state: { ...state.state, isDeleteDialogOpen: true, selectedUserId: id },
46
+ })),
47
+ closeDeleteDialog: () =>
48
+ set((state) => ({
49
+ state: { ...state.state, isDeleteDialogOpen: false, selectedUserId: null },
50
+ })),
51
+ setSearchQuery: (query) =>
52
+ set((state) => ({
53
+ state: { ...state.state, searchQuery: query },
54
+ })),
55
+ reset: () =>
56
+ set(() => ({
57
+ state: initialState,
58
+ })),
59
+ },
60
+ }))
@@ -0,0 +1,42 @@
1
+ import type { User as SupabaseAuthUser } from '@supabase/supabase-js'
2
+ import type { UserRole } from '@/config/roles'
3
+
4
+ // Re-exportar desde config para mantener compatibilidad
5
+ export type { UserRole } from '@/config/roles'
6
+
7
+ export interface UserAppMetadata {
8
+ role: UserRole
9
+ }
10
+
11
+ export interface UserMetadata {
12
+ name: string
13
+ avatar_url?: string | null
14
+ }
15
+
16
+ export interface AuthUserWithMetadata extends SupabaseAuthUser {
17
+ app_metadata: UserAppMetadata
18
+ user_metadata: UserMetadata
19
+ }
20
+
21
+ /**
22
+ * Input para crear usuario via auth.admin.createUser
23
+ */
24
+ export interface CreateAuthUserInput {
25
+ email: string
26
+ password?: string
27
+ name: string
28
+ role?: UserRole
29
+ avatar_url?: string | null
30
+ send_invite?: boolean
31
+ }
32
+
33
+ /**
34
+ * Input para actualizar usuario via auth.admin.updateUserById
35
+ */
36
+ export interface UpdateAuthUserInput {
37
+ email?: string
38
+ password?: string
39
+ name?: string
40
+ role?: UserRole
41
+ avatar_url?: string | null
42
+ }
@@ -0,0 +1,32 @@
1
+ import type { User as SupabaseAuthUser } from '@supabase/supabase-js'
2
+ import type { User } from '../schemas/users.schema'
3
+ import { DEFAULT_ROLE, type UserRole } from '@/config/roles'
4
+
5
+ /**
6
+ * Mapea un usuario de auth.users al tipo User de la aplicación.
7
+ * Extrae datos de app_metadata (role) y user_metadata (name, avatar_url).
8
+ */
9
+ export function mapAuthUserToUser(authUser: SupabaseAuthUser): User {
10
+ const appMetadata = authUser.app_metadata as { role?: UserRole } | undefined
11
+ const userMetadata = authUser.user_metadata as {
12
+ name?: string
13
+ avatar_url?: string | null
14
+ } | undefined
15
+
16
+ return {
17
+ id: authUser.id,
18
+ email: authUser.email ?? '',
19
+ name: userMetadata?.name ?? '',
20
+ role: appMetadata?.role ?? DEFAULT_ROLE,
21
+ avatar_url: userMetadata?.avatar_url ?? null,
22
+ created_at: authUser.created_at ?? new Date().toISOString(),
23
+ updated_at: authUser.updated_at ?? new Date().toISOString(),
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Mapea array de usuarios de auth.users al tipo User[]
29
+ */
30
+ export function mapAuthUsersToUsers(authUsers: SupabaseAuthUser[]): User[] {
31
+ return authUsers.map(mapAuthUserToUser)
32
+ }
@@ -1 +1 @@
1
- export { useUiStore } from './useUiStore'
1
+ export { useUiStore } from './useUiStore'
@@ -1,55 +1,55 @@
1
- import { create } from 'zustand'
2
- import { persist } from 'zustand/middleware'
3
-
4
- interface UiState {
5
- state: {
6
- sidebarOpen: boolean
7
- sidebarCollapsed: boolean
8
- theme: 'light' | 'dark' | 'system'
9
- }
10
- actions: {
11
- toggleSidebar: () => void
12
- setSidebarOpen: (open: boolean) => void
13
- toggleSidebarCollapsed: () => void
14
- setSidebarCollapsed: (collapsed: boolean) => void
15
- setTheme: (theme: 'light' | 'dark' | 'system') => void
16
- }
17
- }
18
-
19
- export const useUiStore = create<UiState>()(
20
- persist(
21
- (set) => ({
22
- state: {
23
- sidebarOpen: true,
24
- sidebarCollapsed: false,
25
- theme: 'system',
26
- },
27
- actions: {
28
- toggleSidebar: () =>
29
- set((state) => ({
30
- state: { ...state.state, sidebarOpen: !state.state.sidebarOpen },
31
- })),
32
- setSidebarOpen: (open) =>
33
- set((state) => ({
34
- state: { ...state.state, sidebarOpen: open },
35
- })),
36
- toggleSidebarCollapsed: () =>
37
- set((state) => ({
38
- state: { ...state.state, sidebarCollapsed: !state.state.sidebarCollapsed },
39
- })),
40
- setSidebarCollapsed: (collapsed) =>
41
- set((state) => ({
42
- state: { ...state.state, sidebarCollapsed: collapsed },
43
- })),
44
- setTheme: (theme) =>
45
- set((state) => ({
46
- state: { ...state.state, theme },
47
- })),
48
- },
49
- }),
50
- {
51
- name: 'ui-storage',
52
- partialize: (state) => ({ state: state.state }),
53
- }
54
- )
55
- )
1
+ import { create } from 'zustand'
2
+ import { persist } from 'zustand/middleware'
3
+
4
+ interface UiState {
5
+ state: {
6
+ sidebarOpen: boolean
7
+ sidebarCollapsed: boolean
8
+ theme: 'light' | 'dark' | 'system'
9
+ }
10
+ actions: {
11
+ toggleSidebar: () => void
12
+ setSidebarOpen: (open: boolean) => void
13
+ toggleSidebarCollapsed: () => void
14
+ setSidebarCollapsed: (collapsed: boolean) => void
15
+ setTheme: (theme: 'light' | 'dark' | 'system') => void
16
+ }
17
+ }
18
+
19
+ export const useUiStore = create<UiState>()(
20
+ persist(
21
+ (set) => ({
22
+ state: {
23
+ sidebarOpen: true,
24
+ sidebarCollapsed: false,
25
+ theme: 'system',
26
+ },
27
+ actions: {
28
+ toggleSidebar: () =>
29
+ set((state) => ({
30
+ state: { ...state.state, sidebarOpen: !state.state.sidebarOpen },
31
+ })),
32
+ setSidebarOpen: (open) =>
33
+ set((state) => ({
34
+ state: { ...state.state, sidebarOpen: open },
35
+ })),
36
+ toggleSidebarCollapsed: () =>
37
+ set((state) => ({
38
+ state: { ...state.state, sidebarCollapsed: !state.state.sidebarCollapsed },
39
+ })),
40
+ setSidebarCollapsed: (collapsed) =>
41
+ set((state) => ({
42
+ state: { ...state.state, sidebarCollapsed: collapsed },
43
+ })),
44
+ setTheme: (theme) =>
45
+ set((state) => ({
46
+ state: { ...state.state, theme },
47
+ })),
48
+ },
49
+ }),
50
+ {
51
+ name: 'ui-storage',
52
+ partialize: (state) => ({ state: state.state }),
53
+ }
54
+ )
55
+ )
@@ -1,28 +1,28 @@
1
- export interface ApiResponse<T = unknown> {
2
- data: T
3
- success: boolean
4
- message?: string
5
- }
6
-
7
- export interface ApiError {
8
- message: string
9
- code?: string
10
- status?: number
11
- details?: Record<string, unknown>
12
- }
13
-
14
- export interface PaginatedResponse<T> {
15
- data: T[]
16
- pagination: {
17
- page: number
18
- pageSize: number
19
- total: number
20
- totalPages: number
21
- }
22
- }
23
-
24
- export interface ActionResult<T = void> {
25
- success: boolean
26
- data?: T
27
- error?: string
28
- }
1
+ export interface ApiResponse<T = unknown> {
2
+ data: T
3
+ success: boolean
4
+ message?: string
5
+ }
6
+
7
+ export interface ApiError {
8
+ message: string
9
+ code?: string
10
+ status?: number
11
+ details?: Record<string, unknown>
12
+ }
13
+
14
+ export interface PaginatedResponse<T> {
15
+ data: T[]
16
+ pagination: {
17
+ page: number
18
+ pageSize: number
19
+ total: number
20
+ totalPages: number
21
+ }
22
+ }
23
+
24
+ export interface ActionResult<T = void> {
25
+ success: boolean
26
+ data?: T
27
+ error?: string
28
+ }
@@ -1,2 +1,2 @@
1
- export * from './api'
2
- export * from './table'
1
+ export * from './api'
2
+ export * from './table'
@@ -1,34 +1,34 @@
1
- import type { ColumnDef, Table, Row } from '@tanstack/react-table'
2
-
3
- export type DataTableColumn<TData, TValue = unknown> = ColumnDef<TData, TValue>
4
-
5
- export interface DataTableProps<TData, TValue> {
6
- columns: DataTableColumn<TData, TValue>[]
7
- data: TData[]
8
- searchKey?: string
9
- searchPlaceholder?: string
10
- }
11
-
12
- export interface DataTablePaginationProps<TData> {
13
- table: Table<TData>
14
- }
15
-
16
- export interface DataTableToolbarProps<TData> {
17
- table: Table<TData>
18
- searchKey?: string
19
- searchPlaceholder?: string
20
- }
21
-
22
- export interface DataTableRowActionsProps<TData> {
23
- row: Row<TData>
24
- }
25
-
26
- export interface DataTableFacetedFilterProps<TData, TValue> {
27
- column?: import('@tanstack/react-table').Column<TData, TValue>
28
- title?: string
29
- options: {
30
- label: string
31
- value: string
32
- icon?: React.ComponentType<{ className?: string }>
33
- }[]
34
- }
1
+ import type { ColumnDef, Table, Row } from '@tanstack/react-table'
2
+
3
+ export type DataTableColumn<TData, TValue = unknown> = ColumnDef<TData, TValue>
4
+
5
+ export interface DataTableProps<TData, TValue> {
6
+ columns: DataTableColumn<TData, TValue>[]
7
+ data: TData[]
8
+ searchKey?: string
9
+ searchPlaceholder?: string
10
+ }
11
+
12
+ export interface DataTablePaginationProps<TData> {
13
+ table: Table<TData>
14
+ }
15
+
16
+ export interface DataTableToolbarProps<TData> {
17
+ table: Table<TData>
18
+ searchKey?: string
19
+ searchPlaceholder?: string
20
+ }
21
+
22
+ export interface DataTableRowActionsProps<TData> {
23
+ row: Row<TData>
24
+ }
25
+
26
+ export interface DataTableFacetedFilterProps<TData, TValue> {
27
+ column?: import('@tanstack/react-table').Column<TData, TValue>
28
+ title?: string
29
+ options: {
30
+ label: string
31
+ value: string
32
+ icon?: React.ComponentType<{ className?: string }>
33
+ }[]
34
+ }
@@ -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"