create-better-t-stack 3.13.2 → 3.14.1
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/dist/cli.mjs +1 -1
- package/dist/index.d.mts +29 -33
- package/dist/index.mjs +2 -2
- package/dist/{src-kvJQuDe_.mjs → src-CSz9J82Z.mjs} +432 -3588
- package/dist/virtual.d.mts +4 -0
- package/dist/virtual.mjs +4 -0
- package/package.json +9 -5
- package/templates/addons/biome/biome.json.hbs +0 -96
- package/templates/addons/husky/.husky/pre-commit +0 -1
- package/templates/addons/pwa/apps/web/next/public/favicon/apple-touch-icon.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/favicon-96x96.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/favicon.svg +0 -6
- package/templates/addons/pwa/apps/web/next/public/favicon/site.webmanifest.hbs +0 -21
- package/templates/addons/pwa/apps/web/next/public/favicon/web-app-manifest-192x192.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/web-app-manifest-512x512.png +0 -0
- package/templates/addons/pwa/apps/web/next/src/app/manifest.ts.hbs +0 -26
- package/templates/addons/pwa/apps/web/vite/public/logo.png +0 -0
- package/templates/addons/pwa/apps/web/vite/pwa-assets.config.ts.hbs +0 -12
- package/templates/addons/ruler/.ruler/bts.md.hbs +0 -142
- package/templates/addons/ruler/.ruler/ruler.toml.hbs +0 -80
- package/templates/addons/turborepo/turbo.json.hbs +0 -74
- package/templates/addons/ultracite/biome.json.hbs +0 -26
- package/templates/api/orpc/fullstack/next/src/app/api/rpc/[[...rest]]/route.ts.hbs +0 -50
- package/templates/api/orpc/fullstack/tanstack-start/src/routes/api/rpc/$.ts.hbs +0 -58
- package/templates/api/orpc/native/utils/orpc.ts.hbs +0 -39
- package/templates/api/orpc/server/_gitignore +0 -34
- package/templates/api/orpc/server/package.json.hbs +0 -15
- package/templates/api/orpc/server/src/context.ts.hbs +0 -148
- package/templates/api/orpc/server/src/index.ts.hbs +0 -21
- package/templates/api/orpc/server/src/routers/index.ts.hbs +0 -55
- package/templates/api/orpc/server/tsconfig.json.hbs +0 -10
- package/templates/api/orpc/web/nuxt/app/plugins/orpc.ts.hbs +0 -32
- package/templates/api/orpc/web/nuxt/app/plugins/vue-query.ts.hbs +0 -44
- package/templates/api/orpc/web/react/base/src/utils/orpc.ts.hbs +0 -113
- package/templates/api/orpc/web/solid/src/utils/orpc.ts.hbs +0 -30
- package/templates/api/orpc/web/svelte/src/lib/orpc.ts.hbs +0 -30
- package/templates/api/trpc/fullstack/next/src/app/api/trpc/[trpc]/route.ts.hbs +0 -14
- package/templates/api/trpc/fullstack/tanstack-start/src/routes/api/trpc/$.ts.hbs +0 -22
- package/templates/api/trpc/native/utils/trpc.ts.hbs +0 -37
- package/templates/api/trpc/server/_gitignore +0 -34
- package/templates/api/trpc/server/package.json.hbs +0 -14
- package/templates/api/trpc/server/src/context.ts.hbs +0 -148
- package/templates/api/trpc/server/src/index.ts.hbs +0 -26
- package/templates/api/trpc/server/src/routers/index.ts.hbs +0 -55
- package/templates/api/trpc/server/tsconfig.json.hbs +0 -10
- package/templates/api/trpc/web/react/base/src/utils/trpc.ts.hbs +0 -97
- package/templates/auth/better-auth/convex/backend/convex/auth.config.ts.hbs +0 -6
- package/templates/auth/better-auth/convex/backend/convex/auth.ts.hbs +0 -68
- package/templates/auth/better-auth/convex/backend/convex/http.ts.hbs +0 -12
- package/templates/auth/better-auth/convex/backend/convex/privateData.ts.hbs +0 -17
- package/templates/auth/better-auth/convex/native/bare/components/sign-in.tsx.hbs +0 -127
- package/templates/auth/better-auth/convex/native/bare/components/sign-up.tsx.hbs +0 -138
- package/templates/auth/better-auth/convex/native/base/lib/auth-client.ts.hbs +0 -18
- package/templates/auth/better-auth/convex/native/unistyles/components/sign-in.tsx.hbs +0 -127
- package/templates/auth/better-auth/convex/native/unistyles/components/sign-up.tsx.hbs +0 -145
- package/templates/auth/better-auth/convex/native/uniwind/components/sign-in.tsx.hbs +0 -73
- package/templates/auth/better-auth/convex/native/uniwind/components/sign-up.tsx.hbs +0 -85
- package/templates/auth/better-auth/convex/web/react/next/src/app/api/auth/[...all]/route.ts.hbs +0 -3
- package/templates/auth/better-auth/convex/web/react/next/src/app/dashboard/page.tsx.hbs +0 -40
- package/templates/auth/better-auth/convex/web/react/next/src/components/sign-in-form.tsx.hbs +0 -129
- package/templates/auth/better-auth/convex/web/react/next/src/components/sign-up-form.tsx.hbs +0 -154
- package/templates/auth/better-auth/convex/web/react/next/src/components/user-menu.tsx.hbs +0 -48
- package/templates/auth/better-auth/convex/web/react/next/src/lib/auth-client.ts.hbs +0 -6
- package/templates/auth/better-auth/convex/web/react/next/src/lib/auth-server.ts.hbs +0 -16
- package/templates/auth/better-auth/convex/web/react/tanstack-router/src/components/sign-in-form.tsx.hbs +0 -133
- package/templates/auth/better-auth/convex/web/react/tanstack-router/src/components/sign-up-form.tsx.hbs +0 -158
- package/templates/auth/better-auth/convex/web/react/tanstack-router/src/components/user-menu.tsx.hbs +0 -52
- package/templates/auth/better-auth/convex/web/react/tanstack-router/src/lib/auth-client.ts.hbs +0 -11
- package/templates/auth/better-auth/convex/web/react/tanstack-router/src/routes/dashboard.tsx.hbs +0 -43
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/components/sign-in-form.tsx.hbs +0 -133
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/components/sign-up-form.tsx.hbs +0 -158
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/components/user-menu.tsx.hbs +0 -47
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/lib/auth-client.ts.hbs +0 -6
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/lib/auth-server.ts.hbs +0 -13
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/routes/api/auth/$.ts.hbs +0 -11
- package/templates/auth/better-auth/convex/web/react/tanstack-start/src/routes/dashboard.tsx.hbs +0 -43
- package/templates/auth/better-auth/fullstack/next/src/app/api/auth/[...all]/route.ts.hbs +0 -4
- package/templates/auth/better-auth/fullstack/tanstack-start/src/routes/api/auth/$.ts.hbs +0 -15
- package/templates/auth/better-auth/native/bare/app/(drawer)/index.tsx.hbs +0 -186
- package/templates/auth/better-auth/native/bare/components/sign-in.tsx.hbs +0 -131
- package/templates/auth/better-auth/native/bare/components/sign-up.tsx.hbs +0 -150
- package/templates/auth/better-auth/native/base/lib/auth-client.ts.hbs +0 -16
- package/templates/auth/better-auth/native/unistyles/app/(drawer)/index.tsx.hbs +0 -187
- package/templates/auth/better-auth/native/unistyles/components/sign-in.tsx.hbs +0 -139
- package/templates/auth/better-auth/native/unistyles/components/sign-up.tsx.hbs +0 -157
- package/templates/auth/better-auth/native/uniwind/app/(drawer)/index.tsx.hbs +0 -123
- package/templates/auth/better-auth/native/uniwind/components/sign-in.tsx.hbs +0 -87
- package/templates/auth/better-auth/native/uniwind/components/sign-up.tsx.hbs +0 -128
- package/templates/auth/better-auth/server/base/_gitignore +0 -34
- package/templates/auth/better-auth/server/base/package.json.hbs +0 -14
- package/templates/auth/better-auth/server/base/src/index.ts.hbs +0 -304
- package/templates/auth/better-auth/server/base/tsconfig.json.hbs +0 -10
- package/templates/auth/better-auth/server/db/drizzle/mysql/src/schema/auth.ts.hbs +0 -100
- package/templates/auth/better-auth/server/db/drizzle/postgres/src/schema/auth.ts.hbs +0 -93
- package/templates/auth/better-auth/server/db/drizzle/sqlite/src/schema/auth.ts.hbs +0 -107
- package/templates/auth/better-auth/server/db/mongoose/mongodb/src/models/auth.model.ts.hbs +0 -68
- package/templates/auth/better-auth/server/db/prisma/mongodb/prisma/schema/auth.prisma.hbs +0 -62
- package/templates/auth/better-auth/server/db/prisma/mysql/prisma/schema/auth.prisma.hbs +0 -62
- package/templates/auth/better-auth/server/db/prisma/postgres/prisma/schema/auth.prisma.hbs +0 -62
- package/templates/auth/better-auth/server/db/prisma/sqlite/prisma/schema/auth.prisma.hbs +0 -62
- package/templates/auth/better-auth/web/nuxt/app/components/SignInForm.vue.hbs +0 -82
- package/templates/auth/better-auth/web/nuxt/app/components/SignUpForm.vue.hbs +0 -91
- package/templates/auth/better-auth/web/nuxt/app/components/UserMenu.vue.hbs +0 -42
- package/templates/auth/better-auth/web/nuxt/app/middleware/auth.ts.hbs +0 -14
- package/templates/auth/better-auth/web/nuxt/app/pages/dashboard.vue.hbs +0 -99
- package/templates/auth/better-auth/web/nuxt/app/pages/login.vue.hbs +0 -27
- package/templates/auth/better-auth/web/nuxt/app/plugins/auth-client.ts.hbs +0 -21
- package/templates/auth/better-auth/web/react/base/src/lib/auth-client.ts.hbs +0 -16
- package/templates/auth/better-auth/web/react/next/src/app/dashboard/dashboard.tsx.hbs +0 -60
- package/templates/auth/better-auth/web/react/next/src/app/dashboard/page.tsx.hbs +0 -42
- package/templates/auth/better-auth/web/react/next/src/app/login/page.tsx.hbs +0 -16
- package/templates/auth/better-auth/web/react/next/src/components/sign-in-form.tsx.hbs +0 -135
- package/templates/auth/better-auth/web/react/next/src/components/sign-up-form.tsx.hbs +0 -160
- package/templates/auth/better-auth/web/react/next/src/components/user-menu.tsx.hbs +0 -62
- package/templates/auth/better-auth/web/react/react-router/src/components/sign-in-form.tsx.hbs +0 -135
- package/templates/auth/better-auth/web/react/react-router/src/components/sign-up-form.tsx.hbs +0 -160
- package/templates/auth/better-auth/web/react/react-router/src/components/user-menu.tsx.hbs +0 -61
- package/templates/auth/better-auth/web/react/react-router/src/routes/dashboard.tsx.hbs +0 -80
- package/templates/auth/better-auth/web/react/react-router/src/routes/login.tsx.hbs +0 -13
- package/templates/auth/better-auth/web/react/tanstack-router/src/components/sign-in-form.tsx.hbs +0 -135
- package/templates/auth/better-auth/web/react/tanstack-router/src/components/sign-up-form.tsx.hbs +0 -160
- package/templates/auth/better-auth/web/react/tanstack-router/src/components/user-menu.tsx.hbs +0 -63
- package/templates/auth/better-auth/web/react/tanstack-router/src/routes/dashboard.tsx.hbs +0 -71
- package/templates/auth/better-auth/web/react/tanstack-router/src/routes/login.tsx.hbs +0 -18
- package/templates/auth/better-auth/web/react/tanstack-start/src/components/sign-in-form.tsx.hbs +0 -135
- package/templates/auth/better-auth/web/react/tanstack-start/src/components/sign-up-form.tsx.hbs +0 -160
- package/templates/auth/better-auth/web/react/tanstack-start/src/components/user-menu.tsx.hbs +0 -63
- package/templates/auth/better-auth/web/react/tanstack-start/src/functions/get-user.ts.hbs +0 -6
- package/templates/auth/better-auth/web/react/tanstack-start/src/middleware/auth.ts.hbs +0 -31
- package/templates/auth/better-auth/web/react/tanstack-start/src/routes/dashboard.tsx.hbs +0 -84
- package/templates/auth/better-auth/web/react/tanstack-start/src/routes/login.tsx.hbs +0 -18
- package/templates/auth/better-auth/web/solid/src/components/sign-in-form.tsx.hbs +0 -124
- package/templates/auth/better-auth/web/solid/src/components/sign-up-form.tsx.hbs +0 -148
- package/templates/auth/better-auth/web/solid/src/components/user-menu.tsx.hbs +0 -55
- package/templates/auth/better-auth/web/solid/src/lib/auth-client.ts.hbs +0 -12
- package/templates/auth/better-auth/web/solid/src/routes/dashboard.tsx.hbs +0 -67
- package/templates/auth/better-auth/web/solid/src/routes/login.tsx.hbs +0 -23
- package/templates/auth/better-auth/web/svelte/src/components/SignInForm.svelte.hbs +0 -109
- package/templates/auth/better-auth/web/svelte/src/components/SignUpForm.svelte.hbs +0 -142
- package/templates/auth/better-auth/web/svelte/src/components/UserMenu.svelte.hbs +0 -52
- package/templates/auth/better-auth/web/svelte/src/lib/auth-client.ts.hbs +0 -12
- package/templates/auth/better-auth/web/svelte/src/routes/dashboard/+page.svelte.hbs +0 -59
- package/templates/auth/better-auth/web/svelte/src/routes/login/+page.svelte.hbs +0 -12
- package/templates/auth/clerk/convex/backend/convex/auth.config.ts.hbs +0 -12
- package/templates/auth/clerk/convex/backend/convex/privateData.ts.hbs +0 -16
- package/templates/auth/clerk/convex/native/base/app/(auth)/_layout.tsx.hbs +0 -12
- package/templates/auth/clerk/convex/native/base/app/(auth)/sign-in.tsx.hbs +0 -67
- package/templates/auth/clerk/convex/native/base/app/(auth)/sign-up.tsx.hbs +0 -110
- package/templates/auth/clerk/convex/native/base/components/sign-out-button.tsx.hbs +0 -27
- package/templates/auth/clerk/convex/web/react/next/src/app/dashboard/page.tsx.hbs +0 -29
- package/templates/auth/clerk/convex/web/react/next/src/middleware.ts.hbs +0 -12
- package/templates/auth/clerk/convex/web/react/react-router/src/routes/dashboard.tsx.hbs +0 -32
- package/templates/auth/clerk/convex/web/react/tanstack-router/src/routes/dashboard.tsx.hbs +0 -37
- package/templates/auth/clerk/convex/web/react/tanstack-start/src/routes/dashboard.tsx.hbs +0 -37
- package/templates/auth/clerk/convex/web/react/tanstack-start/src/start.ts.hbs +0 -8
- package/templates/backend/convex/packages/backend/_gitignore +0 -2
- package/templates/backend/convex/packages/backend/convex/README.md +0 -90
- package/templates/backend/convex/packages/backend/convex/convex.config.ts.hbs +0 -17
- package/templates/backend/convex/packages/backend/convex/healthCheck.ts.hbs +0 -7
- package/templates/backend/convex/packages/backend/convex/schema.ts.hbs +0 -11
- package/templates/backend/convex/packages/backend/convex/tsconfig.json.hbs +0 -25
- package/templates/backend/convex/packages/backend/package.json.hbs +0 -15
- package/templates/backend/server/base/_gitignore +0 -55
- package/templates/backend/server/base/package.json.hbs +0 -17
- package/templates/backend/server/base/tsconfig.json.hbs +0 -13
- package/templates/backend/server/base/tsdown.config.ts.hbs +0 -9
- package/templates/backend/server/elysia/src/index.ts.hbs +0 -122
- package/templates/backend/server/express/src/index.ts.hbs +0 -126
- package/templates/backend/server/fastify/src/index.ts.hbs +0 -187
- package/templates/backend/server/hono/src/index.ts.hbs +0 -171
- package/templates/base/_gitignore +0 -50
- package/templates/base/package.json.hbs +0 -10
- package/templates/base/tsconfig.json.hbs +0 -3
- package/templates/db/base/_gitignore +0 -35
- package/templates/db/base/package.json.hbs +0 -14
- package/templates/db/base/tsconfig.json.hbs +0 -10
- package/templates/db/drizzle/base/src/schema/index.ts.hbs +0 -7
- package/templates/db/drizzle/mysql/drizzle.config.ts.hbs +0 -19
- package/templates/db/drizzle/mysql/src/index.ts.hbs +0 -54
- package/templates/db/drizzle/postgres/drizzle.config.ts.hbs +0 -19
- package/templates/db/drizzle/postgres/src/index.ts.hbs +0 -44
- package/templates/db/drizzle/sqlite/drizzle.config.ts.hbs +0 -28
- package/templates/db/drizzle/sqlite/src/index.ts.hbs +0 -39
- package/templates/db/mongoose/mongodb/src/index.ts.hbs +0 -10
- package/templates/db/prisma/mongodb/prisma/schema/schema.prisma.hbs +0 -19
- package/templates/db/prisma/mongodb/prisma.config.ts.hbs +0 -18
- package/templates/db/prisma/mongodb/src/index.ts.hbs +0 -5
- package/templates/db/prisma/mysql/prisma/schema/schema.prisma.hbs +0 -21
- package/templates/db/prisma/mysql/prisma.config.ts.hbs +0 -21
- package/templates/db/prisma/mysql/src/index.ts.hbs +0 -55
- package/templates/db/prisma/postgres/prisma/schema/schema.prisma.hbs +0 -21
- package/templates/db/prisma/postgres/prisma.config.ts.hbs +0 -21
- package/templates/db/prisma/postgres/src/index.ts.hbs +0 -69
- package/templates/db/prisma/sqlite/prisma/schema/schema.prisma.hbs +0 -18
- package/templates/db/prisma/sqlite/prisma.config.ts.hbs +0 -25
- package/templates/db/prisma/sqlite/src/index.ts.hbs +0 -25
- package/templates/db-setup/docker-compose/mongodb/docker-compose.yml.hbs +0 -23
- package/templates/db-setup/docker-compose/mysql/docker-compose.yml.hbs +0 -24
- package/templates/db-setup/docker-compose/postgres/docker-compose.yml.hbs +0 -23
- package/templates/examples/ai/convex/packages/backend/convex/agent.ts.hbs +0 -9
- package/templates/examples/ai/convex/packages/backend/convex/chat.ts.hbs +0 -67
- package/templates/examples/ai/fullstack/next/src/app/api/ai/route.ts.hbs +0 -20
- package/templates/examples/ai/fullstack/tanstack-start/src/routes/api/ai/$.ts.hbs +0 -36
- package/templates/examples/ai/native/bare/app/(drawer)/ai.tsx.hbs +0 -586
- package/templates/examples/ai/native/bare/polyfills.js +0 -25
- package/templates/examples/ai/native/unistyles/app/(drawer)/ai.tsx.hbs +0 -588
- package/templates/examples/ai/native/unistyles/polyfills.js +0 -22
- package/templates/examples/ai/native/uniwind/app/(drawer)/ai.tsx.hbs +0 -331
- package/templates/examples/ai/native/uniwind/polyfills.js +0 -22
- package/templates/examples/ai/web/nuxt/app/pages/ai.vue.hbs +0 -54
- package/templates/examples/ai/web/react/next/src/app/ai/page.tsx.hbs +0 -267
- package/templates/examples/ai/web/react/react-router/src/routes/ai.tsx.hbs +0 -235
- package/templates/examples/ai/web/react/tanstack-router/src/routes/ai.tsx.hbs +0 -242
- package/templates/examples/ai/web/react/tanstack-start/src/routes/ai.tsx.hbs +0 -243
- package/templates/examples/ai/web/svelte/src/routes/ai/+page.svelte.hbs +0 -107
- package/templates/examples/todo/convex/packages/backend/convex/todos.ts.hbs +0 -42
- package/templates/examples/todo/native/bare/app/(drawer)/todos.tsx.hbs +0 -521
- package/templates/examples/todo/native/unistyles/app/(drawer)/todos.tsx.hbs +0 -340
- package/templates/examples/todo/native/uniwind/app/(drawer)/todos.tsx.hbs +0 -282
- package/templates/examples/todo/server/drizzle/base/src/routers/todo.ts.hbs +0 -75
- package/templates/examples/todo/server/drizzle/mysql/src/schema/todo.ts +0 -7
- package/templates/examples/todo/server/drizzle/postgres/src/schema/todo.ts +0 -7
- package/templates/examples/todo/server/drizzle/sqlite/src/schema/todo.ts +0 -7
- package/templates/examples/todo/server/mongoose/base/src/routers/todo.ts.hbs +0 -66
- package/templates/examples/todo/server/mongoose/mongodb/src/models/todo.model.ts.hbs +0 -24
- package/templates/examples/todo/server/prisma/base/src/routers/todo.ts.hbs +0 -116
- package/templates/examples/todo/server/prisma/mongodb/prisma/schema/todo.prisma.hbs +0 -7
- package/templates/examples/todo/server/prisma/mysql/prisma/schema/todo.prisma.hbs +0 -7
- package/templates/examples/todo/server/prisma/postgres/prisma/schema/todo.prisma.hbs +0 -7
- package/templates/examples/todo/server/prisma/sqlite/prisma/schema/todo.prisma.hbs +0 -7
- package/templates/examples/todo/web/nuxt/app/pages/todos.vue.hbs +0 -220
- package/templates/examples/todo/web/react/next/src/app/todos/page.tsx.hbs +0 -245
- package/templates/examples/todo/web/react/react-router/src/routes/todos.tsx.hbs +0 -242
- package/templates/examples/todo/web/react/tanstack-router/src/routes/todos.tsx.hbs +0 -247
- package/templates/examples/todo/web/react/tanstack-start/src/routes/todos.tsx.hbs +0 -272
- package/templates/examples/todo/web/solid/src/routes/todos.tsx.hbs +0 -132
- package/templates/examples/todo/web/svelte/src/routes/todos/+page.svelte.hbs +0 -317
- package/templates/extras/_npmrc.hbs +0 -5
- package/templates/extras/bunfig.toml.hbs +0 -6
- package/templates/extras/pnpm-workspace.yaml +0 -3
- package/templates/frontend/native/bare/_gitignore +0 -18
- package/templates/frontend/native/bare/app/(drawer)/(tabs)/_layout.tsx.hbs +0 -41
- package/templates/frontend/native/bare/app/(drawer)/(tabs)/index.tsx.hbs +0 -43
- package/templates/frontend/native/bare/app/(drawer)/(tabs)/two.tsx.hbs +0 -43
- package/templates/frontend/native/bare/app/(drawer)/_layout.tsx.hbs +0 -90
- package/templates/frontend/native/bare/app/(drawer)/index.tsx.hbs +0 -234
- package/templates/frontend/native/bare/app/+not-found.tsx.hbs +0 -65
- package/templates/frontend/native/bare/app/_layout.tsx.hbs +0 -165
- package/templates/frontend/native/bare/app/modal.tsx.hbs +0 -34
- package/templates/frontend/native/bare/app.json.hbs +0 -50
- package/templates/frontend/native/bare/components/container.tsx.hbs +0 -25
- package/templates/frontend/native/bare/components/header-button.tsx.hbs +0 -47
- package/templates/frontend/native/bare/components/tabbar-icon.tsx.hbs +0 -9
- package/templates/frontend/native/bare/lib/android-navigation-bar.tsx.hbs +0 -12
- package/templates/frontend/native/bare/lib/constants.ts.hbs +0 -19
- package/templates/frontend/native/bare/lib/use-color-scheme.ts.hbs +0 -20
- package/templates/frontend/native/bare/metro.config.js.hbs +0 -9
- package/templates/frontend/native/bare/package.json.hbs +0 -51
- package/templates/frontend/native/bare/tsconfig.json.hbs +0 -11
- package/templates/frontend/native/base/assets/images/android-icon-background.png +0 -0
- package/templates/frontend/native/base/assets/images/android-icon-foreground.png +0 -0
- package/templates/frontend/native/base/assets/images/android-icon-monochrome.png +0 -0
- package/templates/frontend/native/base/assets/images/favicon.png +0 -0
- package/templates/frontend/native/base/assets/images/icon.png +0 -0
- package/templates/frontend/native/base/assets/images/partial-react-logo.png +0 -0
- package/templates/frontend/native/base/assets/images/react-logo.png +0 -0
- package/templates/frontend/native/base/assets/images/react-logo@2x.png +0 -0
- package/templates/frontend/native/base/assets/images/react-logo@3x.png +0 -0
- package/templates/frontend/native/base/assets/images/splash-icon.png +0 -0
- package/templates/frontend/native/unistyles/_gitignore +0 -24
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/_layout.tsx.hbs +0 -39
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/index.tsx.hbs +0 -37
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/two.tsx.hbs +0 -37
- package/templates/frontend/native/unistyles/app/(drawer)/_layout.tsx.hbs +0 -87
- package/templates/frontend/native/unistyles/app/(drawer)/index.tsx.hbs +0 -333
- package/templates/frontend/native/unistyles/app/+not-found.tsx.hbs +0 -65
- package/templates/frontend/native/unistyles/app/_layout.tsx.hbs +0 -169
- package/templates/frontend/native/unistyles/app/modal.tsx.hbs +0 -33
- package/templates/frontend/native/unistyles/app.json.hbs +0 -49
- package/templates/frontend/native/unistyles/babel.config.js.hbs +0 -21
- package/templates/frontend/native/unistyles/breakpoints.ts.hbs +0 -9
- package/templates/frontend/native/unistyles/components/container.tsx.hbs +0 -15
- package/templates/frontend/native/unistyles/components/header-button.tsx.hbs +0 -36
- package/templates/frontend/native/unistyles/components/tabbar-icon.tsx.hbs +0 -8
- package/templates/frontend/native/unistyles/index.js.hbs +0 -2
- package/templates/frontend/native/unistyles/metro.config.js.hbs +0 -5
- package/templates/frontend/native/unistyles/package.json.hbs +0 -51
- package/templates/frontend/native/unistyles/theme.ts.hbs +0 -98
- package/templates/frontend/native/unistyles/tsconfig.json.hbs +0 -12
- package/templates/frontend/native/unistyles/unistyles.ts.hbs +0 -27
- package/templates/frontend/native/uniwind/_gitignore +0 -21
- package/templates/frontend/native/uniwind/app/(drawer)/(tabs)/_layout.tsx.hbs +0 -46
- package/templates/frontend/native/uniwind/app/(drawer)/(tabs)/index.tsx.hbs +0 -15
- package/templates/frontend/native/uniwind/app/(drawer)/(tabs)/two.tsx.hbs +0 -15
- package/templates/frontend/native/uniwind/app/(drawer)/_layout.tsx.hbs +0 -91
- package/templates/frontend/native/uniwind/app/(drawer)/index.tsx.hbs +0 -191
- package/templates/frontend/native/uniwind/app/+not-found.tsx.hbs +0 -27
- package/templates/frontend/native/uniwind/app/_layout.tsx.hbs +0 -132
- package/templates/frontend/native/uniwind/app/modal.tsx.hbs +0 -37
- package/templates/frontend/native/uniwind/app.json.hbs +0 -19
- package/templates/frontend/native/uniwind/components/container.tsx.hbs +0 -33
- package/templates/frontend/native/uniwind/components/theme-toggle.tsx.hbs +0 -35
- package/templates/frontend/native/uniwind/contexts/app-theme-context.tsx.hbs +0 -62
- package/templates/frontend/native/uniwind/global.css +0 -5
- package/templates/frontend/native/uniwind/metro.config.js.hbs +0 -13
- package/templates/frontend/native/uniwind/package.json.hbs +0 -54
- package/templates/frontend/native/uniwind/tsconfig.json.hbs +0 -14
- package/templates/frontend/nuxt/_gitignore +0 -27
- package/templates/frontend/nuxt/app/app.config.ts.hbs +0 -15
- package/templates/frontend/nuxt/app/app.vue.hbs +0 -17
- package/templates/frontend/nuxt/app/assets/css/main.css +0 -2
- package/templates/frontend/nuxt/app/components/Header.vue.hbs +0 -40
- package/templates/frontend/nuxt/app/layouts/default.vue.hbs +0 -10
- package/templates/frontend/nuxt/app/pages/index.vue.hbs +0 -97
- package/templates/frontend/nuxt/nuxt.config.ts.hbs +0 -29
- package/templates/frontend/nuxt/package.json.hbs +0 -24
- package/templates/frontend/nuxt/public/favicon.ico +0 -0
- package/templates/frontend/nuxt/public/robots.txt +0 -2
- package/templates/frontend/nuxt/server/tsconfig.json +0 -3
- package/templates/frontend/nuxt/tsconfig.json.hbs +0 -18
- package/templates/frontend/react/next/next-env.d.ts.hbs +0 -5
- package/templates/frontend/react/next/next.config.ts.hbs +0 -22
- package/templates/frontend/react/next/package.json.hbs +0 -34
- package/templates/frontend/react/next/postcss.config.mjs.hbs +0 -5
- package/templates/frontend/react/next/src/app/favicon.ico +0 -0
- package/templates/frontend/react/next/src/app/layout.tsx.hbs +0 -76
- package/templates/frontend/react/next/src/app/page.tsx.hbs +0 -79
- package/templates/frontend/react/next/src/components/mode-toggle.tsx.hbs +0 -37
- package/templates/frontend/react/next/src/components/providers.tsx.hbs +0 -89
- package/templates/frontend/react/next/src/components/theme-provider.tsx.hbs +0 -11
- package/templates/frontend/react/next/tsconfig.json.hbs +0 -41
- package/templates/frontend/react/react-router/package.json.hbs +0 -42
- package/templates/frontend/react/react-router/public/favicon.ico +0 -0
- package/templates/frontend/react/react-router/react-router.config.ts +0 -6
- package/templates/frontend/react/react-router/src/components/mode-toggle.tsx.hbs +0 -29
- package/templates/frontend/react/react-router/src/components/theme-provider.tsx.hbs +0 -11
- package/templates/frontend/react/react-router/src/root.tsx.hbs +0 -190
- package/templates/frontend/react/react-router/src/routes/_index.tsx.hbs +0 -85
- package/templates/frontend/react/react-router/src/routes.ts +0 -4
- package/templates/frontend/react/react-router/tsconfig.json.hbs +0 -27
- package/templates/frontend/react/react-router/vite.config.ts.hbs +0 -12
- package/templates/frontend/react/tanstack-router/index.html.hbs +0 -13
- package/templates/frontend/react/tanstack-router/package.json.hbs +0 -41
- package/templates/frontend/react/tanstack-router/src/components/mode-toggle.tsx.hbs +0 -29
- package/templates/frontend/react/tanstack-router/src/components/theme-provider.tsx.hbs +0 -11
- package/templates/frontend/react/tanstack-router/src/main.tsx.hbs +0 -90
- package/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs +0 -103
- package/templates/frontend/react/tanstack-router/src/routes/index.tsx.hbs +0 -85
- package/templates/frontend/react/tanstack-router/tsconfig.json.hbs +0 -18
- package/templates/frontend/react/tanstack-router/vite.config.ts.hbs +0 -21
- package/templates/frontend/react/tanstack-start/package.json.hbs +0 -43
- package/templates/frontend/react/tanstack-start/public/robots.txt +0 -3
- package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +0 -144
- package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +0 -208
- package/templates/frontend/react/tanstack-start/src/routes/index.tsx.hbs +0 -85
- package/templates/frontend/react/tanstack-start/tsconfig.json.hbs +0 -28
- package/templates/frontend/react/tanstack-start/vite.config.ts.hbs +0 -22
- package/templates/frontend/react/web-base/_gitignore +0 -60
- package/templates/frontend/react/web-base/components.json +0 -24
- package/templates/frontend/react/web-base/src/components/header.tsx.hbs +0 -78
- package/templates/frontend/react/web-base/src/components/loader.tsx.hbs +0 -9
- package/templates/frontend/react/web-base/src/components/ui/button.tsx.hbs +0 -57
- package/templates/frontend/react/web-base/src/components/ui/card.tsx.hbs +0 -103
- package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx.hbs +0 -26
- package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx.hbs +0 -262
- package/templates/frontend/react/web-base/src/components/ui/input.tsx.hbs +0 -20
- package/templates/frontend/react/web-base/src/components/ui/label.tsx.hbs +0 -20
- package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx.hbs +0 -13
- package/templates/frontend/react/web-base/src/components/ui/sonner.tsx.hbs +0 -44
- package/templates/frontend/react/web-base/src/index.css.hbs +0 -131
- package/templates/frontend/react/web-base/src/lib/utils.ts.hbs +0 -6
- package/templates/frontend/solid/_gitignore +0 -11
- package/templates/frontend/solid/index.html +0 -13
- package/templates/frontend/solid/package.json.hbs +0 -24
- package/templates/frontend/solid/public/robots.txt +0 -3
- package/templates/frontend/solid/src/components/header.tsx.hbs +0 -38
- package/templates/frontend/solid/src/components/loader.tsx +0 -9
- package/templates/frontend/solid/src/main.tsx.hbs +0 -41
- package/templates/frontend/solid/src/routes/__root.tsx.hbs +0 -34
- package/templates/frontend/solid/src/routes/index.tsx.hbs +0 -72
- package/templates/frontend/solid/src/styles.css +0 -5
- package/templates/frontend/solid/tsconfig.json.hbs +0 -29
- package/templates/frontend/solid/vite.config.ts.hbs +0 -21
- package/templates/frontend/svelte/_gitignore +0 -24
- package/templates/frontend/svelte/_npmrc +0 -1
- package/templates/frontend/svelte/package.json.hbs +0 -27
- package/templates/frontend/svelte/src/app.css +0 -5
- package/templates/frontend/svelte/src/app.d.ts +0 -13
- package/templates/frontend/svelte/src/app.html +0 -12
- package/templates/frontend/svelte/src/components/Header.svelte.hbs +0 -40
- package/templates/frontend/svelte/src/lib/index.ts +0 -2
- package/templates/frontend/svelte/src/routes/+layout.svelte.hbs +0 -54
- package/templates/frontend/svelte/src/routes/+page.svelte.hbs +0 -92
- package/templates/frontend/svelte/static/favicon.png +0 -0
- package/templates/frontend/svelte/svelte.config.js.hbs +0 -18
- package/templates/frontend/svelte/tsconfig.json.hbs +0 -19
- package/templates/frontend/svelte/vite.config.ts.hbs +0 -7
- package/templates/packages/config/package.json.hbs +0 -5
- package/templates/packages/config/tsconfig.base.json.hbs +0 -33
- package/templates/packages/env/env.d.ts.hbs +0 -16
- package/templates/packages/env/package.json.hbs +0 -7
- package/templates/packages/env/src/native.ts.hbs +0 -21
- package/templates/packages/env/src/server.ts.hbs +0 -39
- package/templates/packages/env/src/web.ts.hbs +0 -98
- package/templates/packages/env/tsconfig.json.hbs +0 -3
- package/templates/packages/infra/alchemy.run.ts.hbs +0 -271
- package/templates/packages/infra/package.json.hbs +0 -10
- package/templates/payments/polar/server/base/src/lib/payments.ts.hbs +0 -7
- package/templates/payments/polar/web/nuxt/app/pages/success.vue.hbs +0 -11
- package/templates/payments/polar/web/react/next/src/app/success/page.tsx.hbs +0 -15
- package/templates/payments/polar/web/react/react-router/src/routes/success.tsx.hbs +0 -13
- package/templates/payments/polar/web/react/tanstack-router/src/routes/success.tsx.hbs +0 -19
- package/templates/payments/polar/web/react/tanstack-start/src/functions/get-payment.ts.hbs +0 -15
- package/templates/payments/polar/web/react/tanstack-start/src/routes/success.tsx.hbs +0 -19
- package/templates/payments/polar/web/solid/src/routes/success.tsx.hbs +0 -23
- package/templates/payments/polar/web/svelte/src/routes/success/+page.svelte.hbs +0 -12
- /package/dist/{chunk-Dt3mZKp0.mjs → chunk-DPg_XC7m.mjs} +0 -0
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { authClient } from "@/lib/auth-client";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import {
|
|
4
|
-
ActivityIndicator,
|
|
5
|
-
Text,
|
|
6
|
-
TextInput,
|
|
7
|
-
TouchableOpacity,
|
|
8
|
-
View,
|
|
9
|
-
StyleSheet,
|
|
10
|
-
} from "react-native";
|
|
11
|
-
import { useColorScheme } from "@/lib/use-color-scheme";
|
|
12
|
-
import { NAV_THEME } from "@/lib/constants";
|
|
13
|
-
|
|
14
|
-
function SignUp() {
|
|
15
|
-
const { colorScheme } = useColorScheme();
|
|
16
|
-
const theme = colorScheme === "dark" ? NAV_THEME.dark : NAV_THEME.light;
|
|
17
|
-
const [name, setName] = useState("");
|
|
18
|
-
const [email, setEmail] = useState("");
|
|
19
|
-
const [password, setPassword] = useState("");
|
|
20
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
21
|
-
const [error, setError] = useState<string | null>(null);
|
|
22
|
-
|
|
23
|
-
async function handleSignUp() {
|
|
24
|
-
setIsLoading(true);
|
|
25
|
-
setError(null);
|
|
26
|
-
|
|
27
|
-
await authClient.signUp.email(
|
|
28
|
-
{
|
|
29
|
-
name,
|
|
30
|
-
email,
|
|
31
|
-
password,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
onError(error) {
|
|
35
|
-
setError(error.error?.message || "Failed to sign up");
|
|
36
|
-
setIsLoading(false);
|
|
37
|
-
},
|
|
38
|
-
onSuccess() {
|
|
39
|
-
setName("");
|
|
40
|
-
setEmail("");
|
|
41
|
-
setPassword("");
|
|
42
|
-
},
|
|
43
|
-
onFinished() {
|
|
44
|
-
setIsLoading(false);
|
|
45
|
-
},
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<View style={[styles.card, { backgroundColor: theme.card, borderColor: theme.border }]}>
|
|
52
|
-
<Text style={[styles.title, { color: theme.text }]}>Create Account</Text>
|
|
53
|
-
|
|
54
|
-
{error ? (
|
|
55
|
-
<View style={[styles.errorContainer, { backgroundColor: theme.notification + "20" }]}>
|
|
56
|
-
<Text style={[styles.errorText, { color: theme.notification }]}>{error}</Text>
|
|
57
|
-
</View>
|
|
58
|
-
) : null}
|
|
59
|
-
|
|
60
|
-
<TextInput
|
|
61
|
-
style={[styles.input, { color: theme.text, borderColor: theme.border, backgroundColor: theme.background }]}
|
|
62
|
-
placeholder="Name"
|
|
63
|
-
placeholderTextColor={theme.text}
|
|
64
|
-
value={name}
|
|
65
|
-
onChangeText={setName}
|
|
66
|
-
/>
|
|
67
|
-
|
|
68
|
-
<TextInput
|
|
69
|
-
style={[styles.input, { color: theme.text, borderColor: theme.border, backgroundColor: theme.background }]}
|
|
70
|
-
placeholder="Email"
|
|
71
|
-
placeholderTextColor={theme.text}
|
|
72
|
-
value={email}
|
|
73
|
-
onChangeText={setEmail}
|
|
74
|
-
keyboardType="email-address"
|
|
75
|
-
autoCapitalize="none"
|
|
76
|
-
/>
|
|
77
|
-
|
|
78
|
-
<TextInput
|
|
79
|
-
style={[styles.input, { color: theme.text, borderColor: theme.border, backgroundColor: theme.background }]}
|
|
80
|
-
placeholder="Password"
|
|
81
|
-
placeholderTextColor={theme.text}
|
|
82
|
-
value={password}
|
|
83
|
-
onChangeText={setPassword}
|
|
84
|
-
secureTextEntry
|
|
85
|
-
/>
|
|
86
|
-
|
|
87
|
-
<TouchableOpacity
|
|
88
|
-
onPress={handleSignUp}
|
|
89
|
-
disabled={isLoading}
|
|
90
|
-
style={[styles.button, { backgroundColor: theme.primary, opacity: isLoading ? 0.5 : 1 }]}
|
|
91
|
-
>
|
|
92
|
-
{isLoading ? (
|
|
93
|
-
<ActivityIndicator size="small" color="#ffffff" />
|
|
94
|
-
) : (
|
|
95
|
-
<Text style={styles.buttonText}>Sign Up</Text>
|
|
96
|
-
)}
|
|
97
|
-
</TouchableOpacity>
|
|
98
|
-
</View>
|
|
99
|
-
);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const styles = StyleSheet.create({
|
|
103
|
-
card: {
|
|
104
|
-
marginTop: 16,
|
|
105
|
-
padding: 16,
|
|
106
|
-
borderWidth: 1,
|
|
107
|
-
},
|
|
108
|
-
title: {
|
|
109
|
-
fontSize: 18,
|
|
110
|
-
fontWeight: "bold",
|
|
111
|
-
marginBottom: 12,
|
|
112
|
-
},
|
|
113
|
-
errorContainer: {
|
|
114
|
-
marginBottom: 12,
|
|
115
|
-
padding: 8,
|
|
116
|
-
},
|
|
117
|
-
errorText: {
|
|
118
|
-
fontSize: 14,
|
|
119
|
-
},
|
|
120
|
-
input: {
|
|
121
|
-
borderWidth: 1,
|
|
122
|
-
padding: 12,
|
|
123
|
-
fontSize: 16,
|
|
124
|
-
marginBottom: 12,
|
|
125
|
-
},
|
|
126
|
-
button: {
|
|
127
|
-
padding: 12,
|
|
128
|
-
alignItems: "center",
|
|
129
|
-
justifyContent: "center",
|
|
130
|
-
},
|
|
131
|
-
buttonText: {
|
|
132
|
-
color: "#ffffff",
|
|
133
|
-
fontSize: 16,
|
|
134
|
-
},
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
export { SignUp };
|
|
138
|
-
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createAuthClient } from "better-auth/react";
|
|
2
|
-
import { convexClient } from "@convex-dev/better-auth/client/plugins";
|
|
3
|
-
import { expoClient } from "@better-auth/expo/client";
|
|
4
|
-
import Constants from "expo-constants";
|
|
5
|
-
import * as SecureStore from "expo-secure-store";
|
|
6
|
-
import { env } from "@{{projectName}}/env/native";
|
|
7
|
-
|
|
8
|
-
export const authClient = createAuthClient({
|
|
9
|
-
baseURL: env.EXPO_PUBLIC_CONVEX_SITE_URL,
|
|
10
|
-
plugins: [
|
|
11
|
-
expoClient({
|
|
12
|
-
scheme: Constants.expoConfig?.scheme as string,
|
|
13
|
-
storagePrefix: Constants.expoConfig?.scheme as string,
|
|
14
|
-
storage: SecureStore,
|
|
15
|
-
}),
|
|
16
|
-
convexClient(),
|
|
17
|
-
],
|
|
18
|
-
});
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { authClient } from "@/lib/auth-client";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import {
|
|
4
|
-
ActivityIndicator,
|
|
5
|
-
Text,
|
|
6
|
-
TextInput,
|
|
7
|
-
TouchableOpacity,
|
|
8
|
-
View,
|
|
9
|
-
} from "react-native";
|
|
10
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
11
|
-
|
|
12
|
-
export function SignIn() {
|
|
13
|
-
const [email, setEmail] = useState("");
|
|
14
|
-
const [password, setPassword] = useState("");
|
|
15
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
16
|
-
const [error, setError] = useState<string | null>(null);
|
|
17
|
-
|
|
18
|
-
const handleLogin = async () => {
|
|
19
|
-
setIsLoading(true);
|
|
20
|
-
setError(null);
|
|
21
|
-
|
|
22
|
-
await authClient.signIn.email(
|
|
23
|
-
{
|
|
24
|
-
email,
|
|
25
|
-
password,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
onError: (error) => {
|
|
29
|
-
setError(error.error?.message || "Failed to sign in");
|
|
30
|
-
setIsLoading(false);
|
|
31
|
-
},
|
|
32
|
-
onSuccess: () => {
|
|
33
|
-
setEmail("");
|
|
34
|
-
setPassword("");
|
|
35
|
-
},
|
|
36
|
-
onFinished: () => {
|
|
37
|
-
setIsLoading(false);
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return (
|
|
44
|
-
<View style={styles.container}>
|
|
45
|
-
<Text style={styles.title}>Sign In</Text>
|
|
46
|
-
|
|
47
|
-
{error && (
|
|
48
|
-
<View style={styles.errorContainer}>
|
|
49
|
-
<Text style={styles.errorText}>{error}</Text>
|
|
50
|
-
</View>
|
|
51
|
-
)}
|
|
52
|
-
|
|
53
|
-
<TextInput
|
|
54
|
-
style={styles.input}
|
|
55
|
-
placeholder="Email"
|
|
56
|
-
value={email}
|
|
57
|
-
onChangeText={setEmail}
|
|
58
|
-
keyboardType="email-address"
|
|
59
|
-
autoCapitalize="none"
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<TextInput
|
|
63
|
-
style={styles.input}
|
|
64
|
-
placeholder="Password"
|
|
65
|
-
value={password}
|
|
66
|
-
onChangeText={setPassword}
|
|
67
|
-
secureTextEntry
|
|
68
|
-
/>
|
|
69
|
-
|
|
70
|
-
<TouchableOpacity
|
|
71
|
-
onPress={handleLogin}
|
|
72
|
-
disabled={isLoading}
|
|
73
|
-
style={styles.button}
|
|
74
|
-
>
|
|
75
|
-
{isLoading ? (
|
|
76
|
-
<ActivityIndicator size="small" color="#fff" />
|
|
77
|
-
) : (
|
|
78
|
-
<Text style={styles.buttonText}>Sign In</Text>
|
|
79
|
-
)}
|
|
80
|
-
</TouchableOpacity>
|
|
81
|
-
</View>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const styles = StyleSheet.create((theme) => ({
|
|
86
|
-
container: {
|
|
87
|
-
marginTop: 24,
|
|
88
|
-
padding: 16,
|
|
89
|
-
borderRadius: 8,
|
|
90
|
-
borderWidth: 1,
|
|
91
|
-
borderColor: theme.colors.border,
|
|
92
|
-
},
|
|
93
|
-
title: {
|
|
94
|
-
fontSize: 18,
|
|
95
|
-
fontWeight: "600",
|
|
96
|
-
color: theme.colors.typography,
|
|
97
|
-
marginBottom: 16,
|
|
98
|
-
},
|
|
99
|
-
errorContainer: {
|
|
100
|
-
marginBottom: 16,
|
|
101
|
-
padding: 12,
|
|
102
|
-
borderRadius: 6,
|
|
103
|
-
},
|
|
104
|
-
errorText: {
|
|
105
|
-
color: theme.colors.destructive,
|
|
106
|
-
fontSize: 14,
|
|
107
|
-
},
|
|
108
|
-
input: {
|
|
109
|
-
marginBottom: 12,
|
|
110
|
-
padding: 16,
|
|
111
|
-
borderRadius: 6,
|
|
112
|
-
color: theme.colors.typography,
|
|
113
|
-
borderWidth: 1,
|
|
114
|
-
borderColor: theme.colors.border,
|
|
115
|
-
},
|
|
116
|
-
button: {
|
|
117
|
-
backgroundColor: theme.colors.primary,
|
|
118
|
-
padding: 16,
|
|
119
|
-
borderRadius: 6,
|
|
120
|
-
flexDirection: "row",
|
|
121
|
-
justifyContent: "center",
|
|
122
|
-
alignItems: "center",
|
|
123
|
-
},
|
|
124
|
-
buttonText: {
|
|
125
|
-
fontWeight: "500",
|
|
126
|
-
},
|
|
127
|
-
}));
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { authClient } from "@/lib/auth-client";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import {
|
|
4
|
-
ActivityIndicator,
|
|
5
|
-
Text,
|
|
6
|
-
TextInput,
|
|
7
|
-
TouchableOpacity,
|
|
8
|
-
View,
|
|
9
|
-
} from "react-native";
|
|
10
|
-
import { StyleSheet } from "react-native-unistyles";
|
|
11
|
-
|
|
12
|
-
export function SignUp() {
|
|
13
|
-
const [name, setName] = useState("");
|
|
14
|
-
const [email, setEmail] = useState("");
|
|
15
|
-
const [password, setPassword] = useState("");
|
|
16
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
17
|
-
const [error, setError] = useState<string | null>(null);
|
|
18
|
-
|
|
19
|
-
const handleSignUp = async () => {
|
|
20
|
-
setIsLoading(true);
|
|
21
|
-
setError(null);
|
|
22
|
-
|
|
23
|
-
await authClient.signUp.email(
|
|
24
|
-
{
|
|
25
|
-
name,
|
|
26
|
-
email,
|
|
27
|
-
password,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
onError: (error) => {
|
|
31
|
-
setError(error.error?.message || "Failed to sign up");
|
|
32
|
-
setIsLoading(false);
|
|
33
|
-
},
|
|
34
|
-
onSuccess: () => {
|
|
35
|
-
setName("");
|
|
36
|
-
setEmail("");
|
|
37
|
-
setPassword("");
|
|
38
|
-
},
|
|
39
|
-
onFinished: () => {
|
|
40
|
-
setIsLoading(false);
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<View style={styles.container}>
|
|
48
|
-
<Text style={styles.title}>Create Account</Text>
|
|
49
|
-
|
|
50
|
-
{error && (
|
|
51
|
-
<View style={styles.errorContainer}>
|
|
52
|
-
<Text style={styles.errorText}>{error}</Text>
|
|
53
|
-
</View>
|
|
54
|
-
)}
|
|
55
|
-
|
|
56
|
-
<TextInput
|
|
57
|
-
style={styles.input}
|
|
58
|
-
placeholder="Name"
|
|
59
|
-
value={name}
|
|
60
|
-
onChangeText={setName}
|
|
61
|
-
/>
|
|
62
|
-
|
|
63
|
-
<TextInput
|
|
64
|
-
style={styles.input}
|
|
65
|
-
placeholder="Email"
|
|
66
|
-
value={email}
|
|
67
|
-
onChangeText={setEmail}
|
|
68
|
-
keyboardType="email-address"
|
|
69
|
-
autoCapitalize="none"
|
|
70
|
-
/>
|
|
71
|
-
|
|
72
|
-
<TextInput
|
|
73
|
-
style={styles.inputLast}
|
|
74
|
-
placeholder="Password"
|
|
75
|
-
value={password}
|
|
76
|
-
onChangeText={setPassword}
|
|
77
|
-
secureTextEntry
|
|
78
|
-
/>
|
|
79
|
-
|
|
80
|
-
<TouchableOpacity
|
|
81
|
-
onPress={handleSignUp}
|
|
82
|
-
disabled={isLoading}
|
|
83
|
-
style={styles.button}
|
|
84
|
-
>
|
|
85
|
-
{isLoading ? (
|
|
86
|
-
<ActivityIndicator size="small" color="#fff" />
|
|
87
|
-
) : (
|
|
88
|
-
<Text style={styles.buttonText}>Sign Up</Text>
|
|
89
|
-
)}
|
|
90
|
-
</TouchableOpacity>
|
|
91
|
-
</View>
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const styles = StyleSheet.create((theme) => ({
|
|
96
|
-
container: {
|
|
97
|
-
marginTop: 24,
|
|
98
|
-
padding: 16,
|
|
99
|
-
borderRadius: 8,
|
|
100
|
-
borderWidth: 1,
|
|
101
|
-
borderColor: theme.colors.border,
|
|
102
|
-
},
|
|
103
|
-
title: {
|
|
104
|
-
fontSize: 18,
|
|
105
|
-
fontWeight: "600",
|
|
106
|
-
color: theme.colors.typography,
|
|
107
|
-
marginBottom: 16,
|
|
108
|
-
},
|
|
109
|
-
errorContainer: {
|
|
110
|
-
marginBottom: 16,
|
|
111
|
-
padding: 12,
|
|
112
|
-
borderRadius: 6,
|
|
113
|
-
},
|
|
114
|
-
errorText: {
|
|
115
|
-
color: theme.colors.destructive,
|
|
116
|
-
fontSize: 14,
|
|
117
|
-
},
|
|
118
|
-
input: {
|
|
119
|
-
marginBottom: 12,
|
|
120
|
-
padding: 16,
|
|
121
|
-
borderRadius: 6,
|
|
122
|
-
color: theme.colors.typography,
|
|
123
|
-
borderWidth: 1,
|
|
124
|
-
borderColor: theme.colors.border,
|
|
125
|
-
},
|
|
126
|
-
inputLast: {
|
|
127
|
-
marginBottom: 16,
|
|
128
|
-
padding: 16,
|
|
129
|
-
borderRadius: 6,
|
|
130
|
-
color: theme.colors.typography,
|
|
131
|
-
borderWidth: 1,
|
|
132
|
-
borderColor: theme.colors.border,
|
|
133
|
-
},
|
|
134
|
-
button: {
|
|
135
|
-
backgroundColor: theme.colors.primary,
|
|
136
|
-
padding: 16,
|
|
137
|
-
borderRadius: 6,
|
|
138
|
-
flexDirection: "row",
|
|
139
|
-
justifyContent: "center",
|
|
140
|
-
alignItems: "center",
|
|
141
|
-
},
|
|
142
|
-
buttonText: {
|
|
143
|
-
fontWeight: "500",
|
|
144
|
-
},
|
|
145
|
-
}));
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { authClient } from "@/lib/auth-client";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Text, View } from "react-native";
|
|
4
|
-
import { Button, ErrorView, Spinner, Surface, TextField } from "heroui-native";
|
|
5
|
-
|
|
6
|
-
export function SignIn() {
|
|
7
|
-
const [email, setEmail] = useState("");
|
|
8
|
-
const [password, setPassword] = useState("");
|
|
9
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
10
|
-
const [error, setError] = useState<string | null>(null);
|
|
11
|
-
|
|
12
|
-
const handleLogin = async () => {
|
|
13
|
-
setIsLoading(true);
|
|
14
|
-
setError(null);
|
|
15
|
-
|
|
16
|
-
await authClient.signIn.email(
|
|
17
|
-
{
|
|
18
|
-
email,
|
|
19
|
-
password,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
onError: (error) => {
|
|
23
|
-
setError(error.error?.message || "Failed to sign in");
|
|
24
|
-
setIsLoading(false);
|
|
25
|
-
},
|
|
26
|
-
onSuccess: () => {
|
|
27
|
-
setEmail("");
|
|
28
|
-
setPassword("");
|
|
29
|
-
},
|
|
30
|
-
onFinished: () => {
|
|
31
|
-
setIsLoading(false);
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<Surface variant="secondary" className="p-4 rounded-lg">
|
|
39
|
-
<Text className="text-foreground font-medium mb-4">Sign In</Text>
|
|
40
|
-
|
|
41
|
-
<ErrorView isInvalid={!!error} className="mb-3">
|
|
42
|
-
{error}
|
|
43
|
-
</ErrorView>
|
|
44
|
-
|
|
45
|
-
<View className="gap-3">
|
|
46
|
-
<TextField>
|
|
47
|
-
<TextField.Label>Email</TextField.Label>
|
|
48
|
-
<TextField.Input
|
|
49
|
-
value={email}
|
|
50
|
-
onChangeText={setEmail}
|
|
51
|
-
placeholder="email@example.com"
|
|
52
|
-
keyboardType="email-address"
|
|
53
|
-
autoCapitalize="none"
|
|
54
|
-
/>
|
|
55
|
-
</TextField>
|
|
56
|
-
|
|
57
|
-
<TextField>
|
|
58
|
-
<TextField.Label>Password</TextField.Label>
|
|
59
|
-
<TextField.Input
|
|
60
|
-
value={password}
|
|
61
|
-
onChangeText={setPassword}
|
|
62
|
-
placeholder="••••••••"
|
|
63
|
-
secureTextEntry
|
|
64
|
-
/>
|
|
65
|
-
</TextField>
|
|
66
|
-
|
|
67
|
-
<Button onPress={handleLogin} isDisabled={isLoading} className="mt-1">
|
|
68
|
-
{isLoading ? <Spinner size="sm" color="default" /> : <Button.Label>Sign In</Button.Label>}
|
|
69
|
-
</Button>
|
|
70
|
-
</View>
|
|
71
|
-
</Surface>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { authClient } from "@/lib/auth-client";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { Text, View } from "react-native";
|
|
4
|
-
import { Button, ErrorView, Spinner, Surface, TextField } from "heroui-native";
|
|
5
|
-
|
|
6
|
-
export function SignUp() {
|
|
7
|
-
const [name, setName] = useState("");
|
|
8
|
-
const [email, setEmail] = useState("");
|
|
9
|
-
const [password, setPassword] = useState("");
|
|
10
|
-
const [isLoading, setIsLoading] = useState(false);
|
|
11
|
-
const [error, setError] = useState<string | null>(null);
|
|
12
|
-
|
|
13
|
-
const handleSignUp = async () => {
|
|
14
|
-
setIsLoading(true);
|
|
15
|
-
setError(null);
|
|
16
|
-
|
|
17
|
-
await authClient.signUp.email(
|
|
18
|
-
{
|
|
19
|
-
name,
|
|
20
|
-
email,
|
|
21
|
-
password,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
onError: (error) => {
|
|
25
|
-
setError(error.error?.message || "Failed to sign up");
|
|
26
|
-
setIsLoading(false);
|
|
27
|
-
},
|
|
28
|
-
onSuccess: () => {
|
|
29
|
-
setName("");
|
|
30
|
-
setEmail("");
|
|
31
|
-
setPassword("");
|
|
32
|
-
},
|
|
33
|
-
onFinished: () => {
|
|
34
|
-
setIsLoading(false);
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<Surface variant="secondary" className="p-4 rounded-lg">
|
|
42
|
-
<Text className="text-foreground font-medium mb-4">Create Account</Text>
|
|
43
|
-
|
|
44
|
-
<ErrorView isInvalid={!!error} className="mb-3">
|
|
45
|
-
{error}
|
|
46
|
-
</ErrorView>
|
|
47
|
-
|
|
48
|
-
<View className="gap-3">
|
|
49
|
-
<TextField>
|
|
50
|
-
<TextField.Label>Name</TextField.Label>
|
|
51
|
-
<TextField.Input value={name} onChangeText={setName} placeholder="John Doe" />
|
|
52
|
-
</TextField>
|
|
53
|
-
|
|
54
|
-
<TextField>
|
|
55
|
-
<TextField.Label>Email</TextField.Label>
|
|
56
|
-
<TextField.Input
|
|
57
|
-
value={email}
|
|
58
|
-
onChangeText={setEmail}
|
|
59
|
-
placeholder="email@example.com"
|
|
60
|
-
keyboardType="email-address"
|
|
61
|
-
autoCapitalize="none"
|
|
62
|
-
/>
|
|
63
|
-
</TextField>
|
|
64
|
-
|
|
65
|
-
<TextField>
|
|
66
|
-
<TextField.Label>Password</TextField.Label>
|
|
67
|
-
<TextField.Input
|
|
68
|
-
value={password}
|
|
69
|
-
onChangeText={setPassword}
|
|
70
|
-
placeholder="••••••••"
|
|
71
|
-
secureTextEntry
|
|
72
|
-
/>
|
|
73
|
-
</TextField>
|
|
74
|
-
|
|
75
|
-
<Button onPress={handleSignUp} isDisabled={isLoading} className="mt-1">
|
|
76
|
-
{isLoading ? (
|
|
77
|
-
<Spinner size="sm" color="default" />
|
|
78
|
-
) : (
|
|
79
|
-
<Button.Label>Create Account</Button.Label>
|
|
80
|
-
)}
|
|
81
|
-
</Button>
|
|
82
|
-
</View>
|
|
83
|
-
</Surface>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import SignInForm from "@/components/sign-in-form";
|
|
4
|
-
import SignUpForm from "@/components/sign-up-form";
|
|
5
|
-
import UserMenu from "@/components/user-menu";
|
|
6
|
-
import { api } from "@{{projectName}}/backend/convex/_generated/api";
|
|
7
|
-
import {
|
|
8
|
-
Authenticated,
|
|
9
|
-
AuthLoading,
|
|
10
|
-
Unauthenticated,
|
|
11
|
-
useQuery,
|
|
12
|
-
} from "convex/react";
|
|
13
|
-
import { useState } from "react";
|
|
14
|
-
|
|
15
|
-
export default function DashboardPage() {
|
|
16
|
-
const [showSignIn, setShowSignIn] = useState(false);
|
|
17
|
-
const privateData = useQuery(api.privateData.get);
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<>
|
|
21
|
-
<Authenticated>
|
|
22
|
-
<div>
|
|
23
|
-
<h1>Dashboard</h1>
|
|
24
|
-
<p>privateData: {privateData?.message}</p>
|
|
25
|
-
<UserMenu />
|
|
26
|
-
</div>
|
|
27
|
-
</Authenticated>
|
|
28
|
-
<Unauthenticated>
|
|
29
|
-
{showSignIn ? (
|
|
30
|
-
<SignInForm onSwitchToSignUp={() => setShowSignIn(false)} />
|
|
31
|
-
) : (
|
|
32
|
-
<SignUpForm onSwitchToSignIn={() => setShowSignIn(true)} />
|
|
33
|
-
)}
|
|
34
|
-
</Unauthenticated>
|
|
35
|
-
<AuthLoading>
|
|
36
|
-
<div>Loading...</div>
|
|
37
|
-
</AuthLoading>
|
|
38
|
-
</>
|
|
39
|
-
);
|
|
40
|
-
}
|