@farm.js/create-app 0.1.0-beta.31 → 0.1.0-beta.32
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 +12 -2
- package/dist/index.js +84 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/_integrations/better-auth/preact/farm.config.ts +17 -0
- package/templates/_integrations/better-auth/preact/src/app/dashboard/page.tsx +73 -0
- package/templates/_integrations/better-auth/preact/src/app/layout.tsx +14 -0
- package/templates/_integrations/better-auth/preact/src/app/page.tsx +36 -0
- package/templates/_integrations/better-auth/preact/src/app/sign-in/page.tsx +10 -0
- package/templates/_integrations/better-auth/preact/src/app/sign-up/page.tsx +10 -0
- package/templates/_integrations/better-auth/preact/src/components/auth-form.tsx +92 -0
- package/templates/_integrations/better-auth/preact/src/components/auth-shell.tsx +16 -0
- package/templates/_integrations/better-auth/preact/src/lib/auth-client.ts +5 -0
- package/templates/_integrations/better-auth/solid/farm.config.ts +17 -0
- package/templates/_integrations/better-auth/solid/src/app/dashboard/page.tsx +67 -0
- package/templates/_integrations/better-auth/solid/src/app/layout.tsx +14 -0
- package/templates/_integrations/better-auth/solid/src/app/page.tsx +36 -0
- package/templates/_integrations/better-auth/solid/src/app/sign-in/page.tsx +10 -0
- package/templates/_integrations/better-auth/solid/src/app/sign-up/page.tsx +10 -0
- package/templates/_integrations/better-auth/solid/src/components/auth-form.tsx +91 -0
- package/templates/_integrations/better-auth/solid/src/components/auth-shell.tsx +16 -0
- package/templates/_integrations/better-auth/solid/src/lib/auth-client.ts +5 -0
- package/templates/_integrations/better-auth/svelte/farm.config.ts +17 -0
- package/templates/_integrations/better-auth/svelte/src/app/dashboard/page.svelte +62 -0
- package/templates/_integrations/better-auth/svelte/src/app/layout.svelte +20 -0
- package/templates/_integrations/better-auth/svelte/src/app/page.svelte +32 -0
- package/templates/_integrations/better-auth/svelte/src/app/sign-in/page.svelte +10 -0
- package/templates/_integrations/better-auth/svelte/src/app/sign-up/page.svelte +10 -0
- package/templates/_integrations/better-auth/svelte/src/components/auth-form.svelte +83 -0
- package/templates/_integrations/better-auth/svelte/src/components/auth-shell.svelte +16 -0
- package/templates/_integrations/better-auth/svelte/src/components/resource-links.svelte +47 -0
- package/templates/_integrations/better-auth/svelte/src/lib/auth-client.ts +5 -0
- package/templates/_integrations/better-auth/vue/farm.config.ts +17 -0
- package/templates/_integrations/better-auth/vue/src/app/dashboard/page.vue +62 -0
- package/templates/_integrations/better-auth/vue/src/app/layout.vue +20 -0
- package/templates/_integrations/better-auth/vue/src/app/page.vue +34 -0
- package/templates/_integrations/better-auth/vue/src/app/sign-in/page.vue +12 -0
- package/templates/_integrations/better-auth/vue/src/app/sign-up/page.vue +12 -0
- package/templates/_integrations/better-auth/vue/src/components/auth-form.vue +86 -0
- package/templates/_integrations/better-auth/vue/src/components/auth-shell.vue +15 -0
- package/templates/_integrations/better-auth/vue/src/components/resource-links.vue +43 -0
- package/templates/_integrations/better-auth/vue/src/lib/auth-client.ts +5 -0
- package/templates/_renderers/preact/package.json +2 -2
- package/templates/_renderers/preact/src/app/api/greeting/route.ts +1 -1
- package/templates/_renderers/solid/package.json +2 -2
- package/templates/_renderers/solid/src/app/api/greeting/route.ts +1 -1
- package/templates/_renderers/svelte/farm.config.ts +1 -1
- package/templates/_renderers/svelte/package.json +2 -2
- package/templates/_renderers/svelte/src/app/api/greeting/route.ts +1 -1
- package/templates/_renderers/vue/package.json +2 -2
- package/templates/_renderers/vue/src/app/api/greeting/route.ts +1 -1
- package/templates/auth/package.json +3 -3
- package/templates/basic/package.json +2 -2
- package/templates/better-auth/README.md +5 -3
- package/templates/better-auth/package.json +3 -3
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"type-check": "tsc --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@farm.js/auth": "0.1.0-beta.
|
|
16
|
-
"@farm.js/core": "0.1.0-beta.
|
|
15
|
+
"@farm.js/auth": "0.1.0-beta.32",
|
|
16
|
+
"@farm.js/core": "0.1.0-beta.32",
|
|
17
17
|
"@fontsource-variable/geist": "5.3.0",
|
|
18
18
|
"@fontsource-variable/geist-mono": "5.3.0",
|
|
19
19
|
"better-call": "1.3.2",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-dom": "^19.0.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@farm.js/cli": "0.1.0-beta.
|
|
24
|
+
"@farm.js/cli": "0.1.0-beta.32",
|
|
25
25
|
"@types/node": "20.19.9",
|
|
26
26
|
"@types/react": "^19.0.0",
|
|
27
27
|
"@types/react-dom": "^19.0.0",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"type-check": "tsc --noEmit"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@farm.js/core": "0.1.0-beta.
|
|
13
|
+
"@farm.js/core": "0.1.0-beta.32",
|
|
14
14
|
"@fontsource-variable/geist": "5.3.0",
|
|
15
15
|
"@fontsource-variable/geist-mono": "5.3.0",
|
|
16
16
|
"react": "^19.0.0",
|
|
17
17
|
"react-dom": "^19.0.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@farm.js/cli": "0.1.0-beta.
|
|
20
|
+
"@farm.js/cli": "0.1.0-beta.32",
|
|
21
21
|
"@types/react": "^19.0.0",
|
|
22
22
|
"@types/react-dom": "^19.0.0",
|
|
23
23
|
"tailwindcss": "^4.0.0",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# FARMJS Better Auth Starter
|
|
2
2
|
|
|
3
|
-
A standalone authentication starter built with FARMJS, Better Auth,
|
|
3
|
+
A standalone authentication starter built with FARMJS, Better Auth, your selected UI renderer,
|
|
4
|
+
and Neon Postgres.
|
|
4
5
|
|
|
5
6
|
This project was generated from the Better Auth template included with `@farm.js/create-app`.
|
|
6
7
|
|
|
@@ -18,7 +19,7 @@ This project was generated from the Better Auth template included with `@farm.js
|
|
|
18
19
|
## Quick start
|
|
19
20
|
|
|
20
21
|
```bash
|
|
21
|
-
pnpm create @farm.js/app@beta my-app --template better-auth --typescript
|
|
22
|
+
pnpm create @farm.js/app@beta my-app --template better-auth --renderer solid --typescript
|
|
22
23
|
cd my-app
|
|
23
24
|
cp .env.example .env.local
|
|
24
25
|
```
|
|
@@ -46,7 +47,8 @@ Open [http://localhost:3000](http://localhost:3000), create an account, and cont
|
|
|
46
47
|
- [`src/lib/auth-client.ts`](./src/lib/auth-client.ts) exposes the browser client.
|
|
47
48
|
- [`src/lib/session.ts`](./src/lib/session.ts) resolves the current request session on the server.
|
|
48
49
|
- [`src/app/dashboard/middleware.ts`](./src/app/dashboard/middleware.ts) redirects unauthenticated requests before the dashboard route runs.
|
|
49
|
-
-
|
|
50
|
+
- `src/app/dashboard/page.*` reads the already-authorized session and renders the account UI in the
|
|
51
|
+
selected renderer.
|
|
50
52
|
|
|
51
53
|
FARMJS owns the catch-all integration route, so the starter does not need a manual API route:
|
|
52
54
|
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"type-check": "tsc --noEmit"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@farm.js/better-auth": "0.1.0-beta.
|
|
15
|
-
"@farm.js/core": "0.1.0-beta.
|
|
14
|
+
"@farm.js/better-auth": "0.1.0-beta.32",
|
|
15
|
+
"@farm.js/core": "0.1.0-beta.32",
|
|
16
16
|
"@fontsource-variable/geist": "5.3.0",
|
|
17
17
|
"@fontsource-variable/geist-mono": "5.3.0",
|
|
18
18
|
"better-auth": "1.6.25",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"react-dom": "^19.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@farm.js/cli": "0.1.0-beta.
|
|
25
|
+
"@farm.js/cli": "0.1.0-beta.32",
|
|
26
26
|
"@types/node": "20.19.9",
|
|
27
27
|
"@types/pg": "8.20.0",
|
|
28
28
|
"@types/react": "^19.0.0",
|