@smicolon/ai-kit 0.3.2 → 0.4.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 (155) hide show
  1. package/README.md +73 -40
  2. package/dist/index.js +260 -126
  3. package/package.json +5 -5
  4. package/.claude-plugin/marketplace.json +0 -369
  5. package/packs/architect/CHANGELOG.md +0 -17
  6. package/packs/architect/README.md +0 -58
  7. package/packs/architect/agents/system-architect.md +0 -768
  8. package/packs/architect/commands/diagram-create.md +0 -300
  9. package/packs/better-auth/.mcp.json +0 -14
  10. package/packs/better-auth/CHANGELOG.md +0 -26
  11. package/packs/better-auth/README.md +0 -125
  12. package/packs/better-auth/agents/auth-architect.md +0 -278
  13. package/packs/better-auth/commands/auth-provider-add.md +0 -265
  14. package/packs/better-auth/commands/auth-setup.md +0 -298
  15. package/packs/better-auth/skills/auth-security/SKILL.md +0 -425
  16. package/packs/better-auth/skills/better-auth-patterns/SKILL.md +0 -455
  17. package/packs/dev-loop/CHANGELOG.md +0 -69
  18. package/packs/dev-loop/README.md +0 -155
  19. package/packs/dev-loop/commands/cancel-dev.md +0 -21
  20. package/packs/dev-loop/commands/dev-loop.md +0 -72
  21. package/packs/dev-loop/commands/dev-plan.md +0 -351
  22. package/packs/dev-loop/hooks/hooks.json +0 -15
  23. package/packs/dev-loop/hooks/stop-hook.sh +0 -178
  24. package/packs/dev-loop/scripts/setup-dev-loop.sh +0 -194
  25. package/packs/dev-loop/skills/tdd-planner/SKILL.md +0 -249
  26. package/packs/dev-loop/skills/tdd-planner/references/framework-patterns.md +0 -874
  27. package/packs/dev-loop/skills/tdd-planner/references/good-example.md +0 -260
  28. package/packs/dev-loop/skills/tdd-planner/references/plan-template.md +0 -275
  29. package/packs/django/CHANGELOG.md +0 -39
  30. package/packs/django/README.md +0 -92
  31. package/packs/django/agents/django-architect.md +0 -182
  32. package/packs/django/agents/django-builder.md +0 -250
  33. package/packs/django/agents/django-feature-based.md +0 -420
  34. package/packs/django/agents/django-reviewer.md +0 -253
  35. package/packs/django/agents/django-tester.md +0 -230
  36. package/packs/django/commands/api-endpoint.md +0 -285
  37. package/packs/django/commands/model-create.md +0 -178
  38. package/packs/django/commands/test-generate.md +0 -325
  39. package/packs/django/rules/migrations.md +0 -138
  40. package/packs/django/rules/models.md +0 -167
  41. package/packs/django/rules/serializers.md +0 -126
  42. package/packs/django/rules/services.md +0 -131
  43. package/packs/django/rules/tests.md +0 -140
  44. package/packs/django/rules/views.md +0 -102
  45. package/packs/django/skills/import-convention-enforcer/SKILL.md +0 -226
  46. package/packs/django/skills/import-convention-enforcer/patterns/django-imports.md +0 -343
  47. package/packs/django/skills/migration-safety-checker/SKILL.md +0 -375
  48. package/packs/django/skills/model-entity-validator/SKILL.md +0 -298
  49. package/packs/django/skills/performance-optimizer/SKILL.md +0 -447
  50. package/packs/django/skills/red-phase-verifier/SKILL.md +0 -180
  51. package/packs/django/skills/security-first-validator/SKILL.md +0 -435
  52. package/packs/django/skills/test-coverage-advisor/SKILL.md +0 -394
  53. package/packs/django/skills/test-validity-checker/SKILL.md +0 -194
  54. package/packs/failure-log/CHANGELOG.md +0 -20
  55. package/packs/failure-log/README.md +0 -168
  56. package/packs/failure-log/commands/failure-add.md +0 -106
  57. package/packs/failure-log/commands/failure-list.md +0 -89
  58. package/packs/failure-log/hooks/hooks.json +0 -16
  59. package/packs/failure-log/hooks/scripts/inject-failures.sh +0 -64
  60. package/packs/failure-log/skills/failure-log-manager/SKILL.md +0 -164
  61. package/packs/flutter/CHANGELOG.md +0 -19
  62. package/packs/flutter/README.md +0 -170
  63. package/packs/flutter/agents/flutter-architect.md +0 -166
  64. package/packs/flutter/agents/flutter-builder.md +0 -303
  65. package/packs/flutter/agents/release-manager.md +0 -355
  66. package/packs/flutter/commands/fastlane-setup.md +0 -188
  67. package/packs/flutter/commands/flutter-build.md +0 -90
  68. package/packs/flutter/commands/flutter-deploy.md +0 -133
  69. package/packs/flutter/commands/flutter-test.md +0 -117
  70. package/packs/flutter/commands/signing-setup.md +0 -209
  71. package/packs/flutter/hooks/hooks.json +0 -17
  72. package/packs/flutter/skills/fastlane-knowledge/SKILL.md +0 -193
  73. package/packs/flutter/skills/flutter-architecture/SKILL.md +0 -127
  74. package/packs/flutter/skills/store-publishing/SKILL.md +0 -163
  75. package/packs/hono/CHANGELOG.md +0 -19
  76. package/packs/hono/README.md +0 -143
  77. package/packs/hono/agents/hono-architect.md +0 -240
  78. package/packs/hono/agents/hono-builder.md +0 -285
  79. package/packs/hono/agents/hono-reviewer.md +0 -279
  80. package/packs/hono/agents/hono-tester.md +0 -346
  81. package/packs/hono/commands/middleware-create.md +0 -223
  82. package/packs/hono/commands/project-init.md +0 -306
  83. package/packs/hono/commands/route-create.md +0 -153
  84. package/packs/hono/commands/rpc-client.md +0 -263
  85. package/packs/hono/skills/cloudflare-bindings/SKILL.md +0 -408
  86. package/packs/hono/skills/hono-patterns/SKILL.md +0 -309
  87. package/packs/hono/skills/rpc-typesafe/SKILL.md +0 -388
  88. package/packs/hono/skills/zod-validation/SKILL.md +0 -332
  89. package/packs/nestjs/CHANGELOG.md +0 -29
  90. package/packs/nestjs/README.md +0 -75
  91. package/packs/nestjs/agents/nestjs-architect.md +0 -402
  92. package/packs/nestjs/agents/nestjs-builder.md +0 -301
  93. package/packs/nestjs/agents/nestjs-tester.md +0 -437
  94. package/packs/nestjs/commands/module-create.md +0 -369
  95. package/packs/nestjs/rules/controllers.md +0 -92
  96. package/packs/nestjs/rules/dto.md +0 -124
  97. package/packs/nestjs/rules/entities.md +0 -102
  98. package/packs/nestjs/rules/services.md +0 -106
  99. package/packs/nestjs/skills/barrel-export-manager/SKILL.md +0 -389
  100. package/packs/nestjs/skills/import-convention-enforcer/SKILL.md +0 -365
  101. package/packs/nextjs/CHANGELOG.md +0 -36
  102. package/packs/nextjs/README.md +0 -76
  103. package/packs/nextjs/agents/frontend-tester.md +0 -680
  104. package/packs/nextjs/agents/frontend-visual.md +0 -820
  105. package/packs/nextjs/agents/nextjs-architect.md +0 -331
  106. package/packs/nextjs/agents/nextjs-modular.md +0 -433
  107. package/packs/nextjs/commands/component-create.md +0 -398
  108. package/packs/nextjs/rules/api-routes.md +0 -129
  109. package/packs/nextjs/rules/components.md +0 -106
  110. package/packs/nextjs/rules/hooks.md +0 -132
  111. package/packs/nextjs/skills/accessibility-validator/SKILL.md +0 -445
  112. package/packs/nextjs/skills/import-convention-enforcer/SKILL.md +0 -399
  113. package/packs/nextjs/skills/react-form-validator/SKILL.md +0 -569
  114. package/packs/nuxtjs/CHANGELOG.md +0 -30
  115. package/packs/nuxtjs/README.md +0 -56
  116. package/packs/nuxtjs/agents/frontend-tester.md +0 -680
  117. package/packs/nuxtjs/agents/frontend-visual.md +0 -820
  118. package/packs/nuxtjs/agents/nuxtjs-architect.md +0 -537
  119. package/packs/nuxtjs/commands/component-create.md +0 -223
  120. package/packs/nuxtjs/rules/components.md +0 -101
  121. package/packs/nuxtjs/rules/composables.md +0 -118
  122. package/packs/nuxtjs/rules/server-routes.md +0 -127
  123. package/packs/nuxtjs/skills/accessibility-validator/SKILL.md +0 -183
  124. package/packs/nuxtjs/skills/import-convention-enforcer/SKILL.md +0 -196
  125. package/packs/nuxtjs/skills/veevalidate-form-validator/SKILL.md +0 -190
  126. package/packs/onboard/CHANGELOG.md +0 -22
  127. package/packs/onboard/README.md +0 -103
  128. package/packs/onboard/agents/onboard-guide.md +0 -118
  129. package/packs/onboard/commands/onboard.md +0 -313
  130. package/packs/onboard/skills/onboard-context-provider/SKILL.md +0 -98
  131. package/packs/tanstack-router/CHANGELOG.md +0 -30
  132. package/packs/tanstack-router/README.md +0 -113
  133. package/packs/tanstack-router/agents/tanstack-architect.md +0 -173
  134. package/packs/tanstack-router/agents/tanstack-builder.md +0 -360
  135. package/packs/tanstack-router/agents/tanstack-tester.md +0 -454
  136. package/packs/tanstack-router/commands/form-create.md +0 -313
  137. package/packs/tanstack-router/commands/query-create.md +0 -263
  138. package/packs/tanstack-router/commands/route-create.md +0 -190
  139. package/packs/tanstack-router/commands/table-create.md +0 -413
  140. package/packs/tanstack-router/skills/ai-patterns/SKILL.md +0 -370
  141. package/packs/tanstack-router/skills/db-patterns/SKILL.md +0 -346
  142. package/packs/tanstack-router/skills/devtools-patterns/SKILL.md +0 -415
  143. package/packs/tanstack-router/skills/form-patterns/SKILL.md +0 -425
  144. package/packs/tanstack-router/skills/pacer-patterns/SKILL.md +0 -341
  145. package/packs/tanstack-router/skills/query-patterns/SKILL.md +0 -359
  146. package/packs/tanstack-router/skills/router-patterns/SKILL.md +0 -285
  147. package/packs/tanstack-router/skills/store-patterns/SKILL.md +0 -351
  148. package/packs/tanstack-router/skills/table-patterns/SKILL.md +0 -531
  149. package/packs/tanstack-router/skills/tanstack-conventions/SKILL.md +0 -428
  150. package/packs/tanstack-router/skills/virtual-patterns/SKILL.md +0 -490
  151. package/packs/worktree/CHANGELOG.md +0 -45
  152. package/packs/worktree/README.md +0 -219
  153. package/packs/worktree/commands/wt.md +0 -93
  154. package/packs/worktree/scripts/wt.sh +0 -957
  155. package/packs/worktree/skills/worktree-manager/SKILL.md +0 -113
@@ -1,300 +0,0 @@
1
- ---
2
- name: diagram-create
3
- description: Create system architecture diagrams using Eraser.io diagram-as-code
4
- ---
5
-
6
- # System Diagram Creation
7
-
8
- You are an Eraser.io diagram-as-code specialist. Your task is to create professional system architecture diagrams using Eraser.io's DSL.
9
-
10
- ## Core Requirements
11
-
12
- ### Diagram Types Supported
13
- 1. **Entity Relationship Diagrams (ERD)** - Database schemas
14
- 2. **Flowcharts** - Process flows and decision trees
15
- 3. **Cloud Architecture** - AWS, Azure, GCP infrastructure
16
- 4. **Sequence Diagrams** - API interactions and workflows
17
- 5. **BPMN** - Business process modeling
18
-
19
- ## Eraser.io Syntax
20
-
21
- ### Entity Relationship Diagram (ERD)
22
- ```
23
- users [icon: user, color: blue] {
24
- id uuid pk
25
- email string unique
26
- password_hash string
27
- created_at timestamp
28
- updated_at timestamp
29
- is_deleted bool
30
- }
31
-
32
- products [icon: package, color: green] {
33
- id uuid pk
34
- name string
35
- slug string unique
36
- price decimal
37
- stock int
38
- created_by uuid fk
39
- created_at timestamp
40
- updated_at timestamp
41
- is_deleted bool
42
- }
43
-
44
- orders [icon: shopping-cart, color: orange] {
45
- id uuid pk
46
- user_id uuid fk
47
- total decimal
48
- status string
49
- created_at timestamp
50
- updated_at timestamp
51
- }
52
-
53
- order_items [icon: list, color: orange] {
54
- id uuid pk
55
- order_id uuid fk
56
- product_id uuid fk
57
- quantity int
58
- price decimal
59
- }
60
-
61
- // Relationships
62
- users.id < products.created_by
63
- users.id < orders.user_id
64
- orders.id < order_items.order_id
65
- products.id < order_items.product_id
66
- ```
67
-
68
- ### Cloud Architecture Diagram
69
- ```
70
- // AWS E-Commerce Architecture
71
-
72
- // Networking
73
- vpc [icon: aws-vpc, color: blue] {
74
- label: Production VPC
75
- cidr: 10.0.0.0/16
76
- }
77
-
78
- public_subnet [icon: aws-subnet, color: lightblue] {
79
- label: Public Subnet
80
- cidr: 10.0.1.0/24
81
- }
82
-
83
- private_subnet [icon: aws-subnet, color: gray] {
84
- label: Private Subnet
85
- cidr: 10.0.2.0/24
86
- }
87
-
88
- // Load Balancing
89
- alb [icon: aws-elb, color: orange] {
90
- label: Application Load Balancer
91
- }
92
-
93
- // Compute
94
- ecs_cluster [icon: aws-ecs, color: purple] {
95
- label: ECS Cluster
96
- }
97
-
98
- api_service [icon: aws-ecs-service, color: purple] {
99
- label: API Service
100
- count: 3
101
- }
102
-
103
- // Database
104
- rds [icon: aws-rds, color: blue] {
105
- label: PostgreSQL RDS
106
- engine: postgres
107
- instance: db.t3.medium
108
- }
109
-
110
- redis [icon: aws-elasticache, color: red] {
111
- label: Redis Cache
112
- }
113
-
114
- // Storage
115
- s3 [icon: aws-s3, color: green] {
116
- label: S3 Bucket
117
- purpose: Static Assets
118
- }
119
-
120
- // Connections
121
- internet > alb
122
- alb > api_service
123
- api_service > rds
124
- api_service > redis
125
- api_service > s3
126
-
127
- // Grouping
128
- vpc {
129
- public_subnet {
130
- alb
131
- }
132
- private_subnet {
133
- ecs_cluster {
134
- api_service
135
- }
136
- rds
137
- redis
138
- }
139
- }
140
- ```
141
-
142
- ### Sequence Diagram
143
- ```
144
- // User Authentication Flow
145
-
146
- title: User Login Sequence
147
-
148
- Client > API: POST /auth/login {email, password}
149
- API > Database: Query user by email
150
- Database > API: Return user data
151
- API > API: Validate password hash
152
- API > TokenService: Generate JWT
153
- TokenService > API: Return access & refresh tokens
154
- API > Database: Store refresh token
155
- API > Client: Return tokens + user data
156
-
157
- note over Client: Store tokens in secure storage
158
-
159
- Client > API: GET /profile (Authorization: Bearer token)
160
- API > TokenService: Validate JWT
161
- TokenService > API: Token valid
162
- API > Database: Fetch user profile
163
- Database > API: Return profile data
164
- API > Client: Return profile
165
- ```
166
-
167
- ### Flowchart
168
- ```
169
- // E-Commerce Checkout Flow
170
-
171
- start: Start Checkout
172
- start > check_cart: Check Cart Items
173
-
174
- check_cart > cart_empty: Cart Empty?
175
- cart_empty > [Yes] > show_error: Show Error Message
176
- cart_empty > [No] > check_auth: User Authenticated?
177
-
178
- check_auth > [No] > login: Redirect to Login
179
- check_auth > [Yes] > shipping: Enter Shipping Info
180
-
181
- shipping > validate_address: Validate Address
182
- validate_address > address_invalid: Invalid Address?
183
- address_invalid > [Yes] > shipping
184
- address_invalid > [No] > payment: Enter Payment Info
185
-
186
- payment > process_payment: Process Payment
187
- process_payment > payment_failed: Payment Failed?
188
- payment_failed > [Yes] > payment
189
- payment_failed > [No] > create_order: Create Order
190
-
191
- create_order > send_confirmation: Send Email Confirmation
192
- send_confirmation > end: Show Success Page
193
-
194
- show_error > end
195
- login > check_auth
196
- ```
197
-
198
- ### BPMN Diagram
199
- ```
200
- // Order Fulfillment Process
201
-
202
- start [shape: circle, label: Start]
203
- receive_order [shape: task, label: Receive Order]
204
- check_inventory [shape: gateway, label: Check Inventory]
205
- reserve_items [shape: task, label: Reserve Items]
206
- notify_warehouse [shape: task, label: Notify Warehouse]
207
- pick_items [shape: task, label: Pick Items]
208
- pack_order [shape: task, label: Pack Order]
209
- ship_order [shape: task, label: Ship Order]
210
- update_tracking [shape: task, label: Update Tracking]
211
- notify_customer [shape: task, label: Notify Customer]
212
- cancel_order [shape: task, label: Cancel Order]
213
- refund [shape: task, label: Process Refund]
214
- end [shape: circle, label: End]
215
-
216
- start > receive_order
217
- receive_order > check_inventory
218
- check_inventory > [In Stock] > reserve_items
219
- check_inventory > [Out of Stock] > cancel_order
220
- reserve_items > notify_warehouse
221
- notify_warehouse > pick_items
222
- pick_items > pack_order
223
- pack_order > ship_order
224
- ship_order > update_tracking
225
- update_tracking > notify_customer
226
- notify_customer > end
227
- cancel_order > refund
228
- refund > end
229
- ```
230
-
231
- ## Workflow
232
-
233
- 1. **Understand Requirements**: Ask user:
234
- - What system/process to diagram?
235
- - What diagram type?
236
- - Level of detail needed?
237
- - Audience for the diagram?
238
-
239
- 2. **Design Diagram**: Plan:
240
- - Key entities/components
241
- - Relationships/flows
242
- - Grouping and hierarchy
243
- - Colors and icons
244
-
245
- 3. **Generate Code**: Create:
246
- - Eraser.io DSL code
247
- - Proper syntax and formatting
248
- - Clear labels and descriptions
249
-
250
- 4. **Provide Instructions**: Give:
251
- - How to use the code
252
- - Eraser.io URL
253
- - Editing tips
254
-
255
- ## Usage Instructions
256
-
257
- ```bash
258
- # 1. Go to https://app.eraser.io/
259
- # 2. Create a new diagram
260
- # 3. Select "Diagram-as-Code" mode
261
- # 4. Paste the generated code
262
- # 5. The diagram will render automatically
263
- # 6. Customize colors, layout, and styling as needed
264
- ```
265
-
266
- ## Quality Checklist
267
-
268
- - [ ] Correct diagram type for use case
269
- - [ ] All entities/components labeled
270
- - [ ] Relationships clearly defined
271
- - [ ] Appropriate icons and colors
272
- - [ ] Proper grouping/hierarchy
273
- - [ ] Readable and well-organized
274
- - [ ] Includes title/description
275
- - [ ] Follows Eraser.io syntax
276
- - [ ] All required fields included
277
-
278
- ## Examples by Use Case
279
-
280
- ### Database Design
281
- Use: **ERD**
282
- When: Designing data models, showing relationships
283
-
284
- ### System Architecture
285
- Use: **Cloud Architecture Diagram**
286
- When: Showing infrastructure, services, and connections
287
-
288
- ### API Flows
289
- Use: **Sequence Diagram**
290
- When: Documenting API interactions, authentication flows
291
-
292
- ### Business Processes
293
- Use: **Flowchart** or **BPMN**
294
- When: Documenting business logic, decision trees
295
-
296
- ### User Flows
297
- Use: **Flowchart**
298
- When: Showing user journeys, conditional paths
299
-
300
- Now, ask the user what diagram they want to create!
@@ -1,14 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "better-auth": {
4
- "command": "npx",
5
- "args": ["-y", "@nahmanmate/better-auth-mcp-server"],
6
- "env": {
7
- "BETTER_AUTH_PROJECT_ID": "${BETTER_AUTH_PROJECT_ID}",
8
- "BETTER_AUTH_API_KEY": "${BETTER_AUTH_API_KEY}",
9
- "BETTER_AUTH_ENV": "${BETTER_AUTH_ENV:-development}",
10
- "LOG_LEVEL": "${LOG_LEVEL:-info}"
11
- }
12
- }
13
- }
14
- }
@@ -1,26 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to the smi-better-auth plugin will be documented in this file.
4
-
5
- ## [Unreleased]
6
-
7
- ### Changed
8
- - Renamed from `smi-better-auth` to `better-auth` as part of ai-kit migration
9
- - Moved from `plugins/smi-better-auth/` to `packs/better-auth/`
10
-
11
- ## [0.1.0] - 2025-01-02
12
-
13
- ### Added
14
- - Initial release (experimental)
15
- - 1 agent: auth-architect
16
- - 2 commands: auth-setup, auth-provider-add
17
- - 2 skills:
18
- - `better-auth-patterns` - Authentication patterns and client setup
19
- - `auth-security` - Security best practices (rate limiting, CSRF, sessions)
20
- - Better Auth MCP server integration
21
- - Support for:
22
- - Email/password authentication
23
- - Social providers (Google, GitHub, Discord, Apple, Microsoft, etc.)
24
- - Two-factor authentication (2FA)
25
- - Passkeys/WebAuthn
26
- - Session management
@@ -1,125 +0,0 @@
1
- # better-auth
2
-
3
- Better Auth integration with MCP server for comprehensive authentication.
4
-
5
- ## Overview
6
-
7
- This plugin provides comprehensive authentication support using Better Auth, a framework-agnostic TypeScript authentication library. Includes MCP server integration for AI-assisted auth implementation.
8
-
9
- ## Installation
10
-
11
- ```bash
12
- /plugin install better-auth
13
- ```
14
-
15
- ## Features
16
-
17
- ### Core Authentication
18
- - Email/password authentication
19
- - Session management
20
- - Password reset flows
21
-
22
- ### Social Providers
23
- - Google, GitHub, Discord, etc.
24
- - OAuth 2.0 / OpenID Connect
25
-
26
- ### Advanced Security
27
- - Two-factor authentication (2FA)
28
- - Passkeys / WebAuthn
29
- - Rate limiting
30
-
31
- ### Enterprise
32
- - Multi-tenancy
33
- - Single Sign-On (SSO)
34
- - Organization management
35
-
36
- ## MCP Server
37
-
38
- This plugin configures the official Better Auth MCP server for AI-assisted development.
39
-
40
- ### Required Environment Variables
41
- ```bash
42
- # Add to your environment
43
- BETTER_AUTH_SECRET=your-secret-key
44
- DATABASE_URL=your-database-url
45
- ```
46
-
47
- ### MCP Tools Available
48
- - Auth configuration generation
49
- - Provider setup assistance
50
- - Security best practices
51
-
52
- ## Agents
53
-
54
- | Agent | Purpose |
55
- |-------|---------|
56
- | `auth-architect` | Design authentication architecture and flows |
57
-
58
- ## Commands
59
-
60
- | Command | Description |
61
- |---------|-------------|
62
- | `/auth-setup` | Initialize Better Auth with config and optional pages |
63
- | `/auth-provider-add` | Add a new authentication provider |
64
-
65
- ## Usage
66
-
67
- ### Basic Setup
68
- ```bash
69
- /auth-setup
70
- ```
71
-
72
- Options:
73
- - `--with-pages` - Include login/register/forgot-password pages
74
- - `--providers google,github` - Pre-configure social providers
75
- - `--2fa` - Enable two-factor authentication
76
- - `--passkeys` - Enable passkey support
77
-
78
- ### Add Provider
79
- ```bash
80
- /auth-provider-add google
81
- /auth-provider-add github --scopes "user:email,read:org"
82
- ```
83
-
84
- ## Configuration Example
85
-
86
- ```typescript
87
- // auth.ts
88
- import { betterAuth } from 'better-auth'
89
-
90
- export const auth = betterAuth({
91
- database: {
92
- provider: 'postgresql',
93
- url: process.env.DATABASE_URL,
94
- },
95
- emailAndPassword: {
96
- enabled: true,
97
- },
98
- socialProviders: {
99
- google: {
100
- clientId: process.env.GOOGLE_CLIENT_ID!,
101
- clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
102
- },
103
- },
104
- plugins: [
105
- twoFactor(),
106
- passkey(),
107
- ],
108
- })
109
- ```
110
-
111
- ## Integration with TanStack
112
-
113
- Works seamlessly with `tanstack-router`:
114
-
115
- ```typescript
116
- // routes/__root.tsx
117
- import { auth } from '@/lib/auth'
118
-
119
- export const Route = createRootRoute({
120
- beforeLoad: async () => {
121
- const session = await auth.getSession()
122
- return { session }
123
- },
124
- })
125
- ```