create-better-t-stack 1.1.0 → 1.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.
Files changed (94) hide show
  1. package/README.md +52 -38
  2. package/dist/index.js +66 -60
  3. package/package.json +1 -1
  4. package/template/base/apps/native/_gitignore +24 -0
  5. package/template/base/apps/native/app/(drawer)/(tabs)/_layout.tsx +29 -0
  6. package/template/base/apps/native/app/(drawer)/(tabs)/index.tsx +9 -0
  7. package/template/base/apps/native/app/(drawer)/(tabs)/two.tsx +16 -0
  8. package/template/base/apps/native/app/(drawer)/_layout.tsx +39 -0
  9. package/template/base/apps/native/app/(drawer)/index.tsx +36 -0
  10. package/template/base/apps/native/app/+html.tsx +46 -0
  11. package/template/base/apps/native/app/+not-found.tsx +18 -0
  12. package/template/base/apps/native/app/_layout.tsx +76 -0
  13. package/template/base/apps/native/app/modal.tsx +15 -0
  14. package/template/base/apps/native/app-env.d.ts +2 -0
  15. package/template/base/apps/native/app.json +38 -0
  16. package/template/base/apps/native/assets/adaptive-icon.png +0 -0
  17. package/template/base/apps/native/assets/favicon.png +0 -0
  18. package/template/base/apps/native/assets/icon.png +0 -0
  19. package/template/base/apps/native/assets/splash.png +0 -0
  20. package/template/base/apps/native/babel.config.js +12 -0
  21. package/template/base/apps/native/components/container.tsx +9 -0
  22. package/template/base/apps/native/components/header-button.tsx +31 -0
  23. package/template/base/apps/native/components/tabbar-icon.tsx +15 -0
  24. package/template/base/apps/native/global.css +25 -0
  25. package/template/base/apps/native/lib/android-navigation-bar.tsx +11 -0
  26. package/template/base/apps/native/lib/constants.ts +18 -0
  27. package/template/base/apps/native/lib/use-color-scheme.ts +12 -0
  28. package/template/base/apps/native/metro.config.js +57 -0
  29. package/template/base/apps/native/package.json +47 -0
  30. package/template/base/apps/native/tailwind.config.js +32 -0
  31. package/template/base/apps/native/tsconfig.json +18 -0
  32. package/template/base/apps/native/utils/trpc.ts +19 -0
  33. package/template/base/apps/server/package.json +0 -2
  34. package/template/base/apps/server/tsconfig.json +1 -1
  35. package/template/base/apps/{client → web}/package.json +1 -1
  36. package/template/base/apps/web/src/main.tsx +33 -0
  37. package/template/base/apps/{client → web}/src/routes/__root.tsx +3 -3
  38. package/template/base/apps/{client → web}/src/routes/index.tsx +7 -6
  39. package/template/base/apps/web/src/utils/trpc.ts +33 -0
  40. package/template/base/package.json +2 -1
  41. package/template/{with-drizzle-sqlite/apps/server/src/with-auth-lib/context.ts → with-auth/apps/server/src/lib/with-elysia-context.ts} +4 -4
  42. package/template/{with-drizzle-postgres/apps/server/src/with-auth-lib/context.ts → with-auth/apps/server/src/lib/with-hono-context.ts} +3 -3
  43. package/template/with-auth/apps/server/src/with-elysia-index.ts +38 -0
  44. package/template/with-auth/apps/server/src/{index.ts → with-hono-index.ts} +3 -2
  45. package/template/with-auth/apps/{client → web}/src/routes/dashboard.tsx +2 -1
  46. package/template/with-auth/apps/web/src/utils/trpc.ts +39 -0
  47. package/template/with-elysia/apps/server/src/index.ts +27 -0
  48. package/template/with-elysia/apps/server/src/lib/context.ts +13 -0
  49. package/template/{base → with-hono}/apps/server/src/index.ts +2 -2
  50. package/template/{base → with-hono}/apps/server/src/lib/context.ts +2 -2
  51. package/template/base/apps/client/src/main.tsx +0 -72
  52. package/template/base/apps/client/src/utils/trpc.ts +0 -4
  53. package/template/with-auth/apps/client/src/main.tsx +0 -78
  54. package/template/with-drizzle-postgres/apps/server/src/routers/todo.ts +0 -44
  55. package/template/with-drizzle-postgres/apps/server/src/with-auth-lib/trpc.ts +0 -24
  56. package/template/with-drizzle-sqlite/apps/server/src/with-auth-lib/trpc.ts +0 -24
  57. package/template/with-prisma-postgres/apps/server/src/with-auth-lib/context.ts +0 -18
  58. package/template/with-prisma-postgres/apps/server/src/with-auth-lib/trpc.ts +0 -24
  59. package/template/with-prisma-sqlite/apps/server/src/with-auth-lib/context.ts +0 -18
  60. package/template/with-prisma-sqlite/apps/server/src/with-auth-lib/trpc.ts +0 -24
  61. package/template/base/apps/{client → web}/_gitignore +0 -0
  62. package/template/base/apps/{client → web}/components.json +0 -0
  63. package/template/base/apps/{client → web}/index.html +0 -0
  64. package/template/base/apps/{client → web}/src/components/header.tsx +0 -0
  65. package/template/base/apps/{client → web}/src/components/loader.tsx +0 -0
  66. package/template/base/apps/{client → web}/src/components/mode-toggle.tsx +0 -0
  67. package/template/base/apps/{client → web}/src/components/theme-provider.tsx +0 -0
  68. package/template/base/apps/{client → web}/src/components/ui/button.tsx +0 -0
  69. package/template/base/apps/{client → web}/src/components/ui/card.tsx +0 -0
  70. package/template/base/apps/{client → web}/src/components/ui/checkbox.tsx +0 -0
  71. package/template/base/apps/{client → web}/src/components/ui/dropdown-menu.tsx +0 -0
  72. package/template/base/apps/{client → web}/src/components/ui/input.tsx +0 -0
  73. package/template/base/apps/{client → web}/src/components/ui/label.tsx +0 -0
  74. package/template/base/apps/{client → web}/src/components/ui/skeleton.tsx +0 -0
  75. package/template/base/apps/{client → web}/src/components/ui/sonner.tsx +0 -0
  76. package/template/base/apps/{client → web}/src/index.css +0 -0
  77. package/template/base/apps/{client → web}/src/lib/utils.ts +0 -0
  78. package/template/base/apps/{client → web}/tsconfig.json +0 -0
  79. package/template/base/apps/{client → web}/vite.config.ts +0 -0
  80. package/template/examples/todo/apps/{client → web}/src/routes/todos.tsx +0 -0
  81. package/template/{with-drizzle-postgres/apps/server/src/with-auth-lib → with-auth/apps/server/src/with-drizzle-postgres-lib}/auth.ts +1 -1
  82. /package/template/{with-drizzle-sqlite/apps/server/src/with-auth-lib → with-auth/apps/server/src/with-drizzle-sqlite-lib}/auth.ts +0 -0
  83. /package/template/{with-prisma-postgres/apps/server/src/with-auth-lib → with-auth/apps/server/src/with-prisma-postgres-lib}/auth.ts +0 -0
  84. /package/template/{with-prisma-sqlite/apps/server/src/with-auth-lib → with-auth/apps/server/src/with-prisma-sqlite-lib}/auth.ts +0 -0
  85. /package/template/with-auth/apps/{client → web}/src/components/auth-forms.tsx +0 -0
  86. /package/template/with-auth/apps/{client → web}/src/components/header.tsx +0 -0
  87. /package/template/with-auth/apps/{client → web}/src/components/sign-in-form.tsx +0 -0
  88. /package/template/with-auth/apps/{client → web}/src/components/sign-up-form.tsx +0 -0
  89. /package/template/with-auth/apps/{client → web}/src/components/user-menu.tsx +0 -0
  90. /package/template/with-auth/apps/{client → web}/src/lib/auth-client.ts +0 -0
  91. /package/template/with-auth/apps/{client → web}/src/routes/login.tsx +0 -0
  92. /package/template/with-pwa/apps/{client → web}/public/logo.png +0 -0
  93. /package/template/with-pwa/apps/{client → web}/pwa-assets.config.ts +0 -0
  94. /package/template/with-pwa/apps/{client → web}/vite.config.ts +0 -0
@@ -1,24 +0,0 @@
1
- import { initTRPC, TRPCError } from "@trpc/server";
2
- import type { Context } from "./context";
3
-
4
- export const t = initTRPC.context<Context>().create();
5
-
6
- export const router = t.router;
7
-
8
- export const publicProcedure = t.procedure;
9
-
10
- export const protectedProcedure = t.procedure.use(({ ctx, next }) => {
11
- if (!ctx.session) {
12
- throw new TRPCError({
13
- code: "UNAUTHORIZED",
14
- message: "Authentication required",
15
- cause: "No session",
16
- });
17
- }
18
- return next({
19
- ctx: {
20
- ...ctx,
21
- session: ctx.session,
22
- },
23
- });
24
- });
File without changes
File without changes
File without changes
File without changes
@@ -1,7 +1,7 @@
1
1
  import { betterAuth } from "better-auth";
2
2
  import { drizzleAdapter } from "better-auth/adapters/drizzle";
3
- import * as schema from "../db/schema/auth";
4
3
  import { db } from "../db";
4
+ import * as schema from "../db/schema/auth";
5
5
 
6
6
  export const auth = betterAuth({
7
7
  database: drizzleAdapter(db, {