create-atsdc-stack 1.2.0 → 1.3.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.
@@ -5,7 +5,8 @@
5
5
  "Bash(git mv:*)",
6
6
  "Bash(git add:*)",
7
7
  "Bash(test:*)",
8
- "Bash(npm install:*)"
8
+ "Bash(npm install:*)",
9
+ "mcp__ide__getDiagnostics"
9
10
  ]
10
11
  }
11
12
  }
package/CLAUDE.md CHANGED
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
 
5
5
  ## Project Overview
6
6
 
7
- The ATSDC Stack is a full-stack web application framework built with Astro, TypeScript, SCSS, Drizzle ORM, and Clerk. It's designed as both a production-ready template and a CLI tool for scaffolding new projects.
7
+ The ATSDC Stack is a full-stack web application framework built with Astro, TypeScript, SCSS, Drizzle ORM, and BetterAuth. It's designed as both a production-ready template and a CLI tool for scaffolding new projects.
8
8
 
9
9
  This is a monorepo with two main parts:
10
10
 
@@ -53,7 +53,7 @@ npx drizzle-kit studio # Open Drizzle Studio GUI for database
53
53
  - All IDs are `varchar(21)` with `.$defaultFn(() => nanoid())`
54
54
  - TypeScript types are inferred: `typeof posts.$inferSelect` and `typeof posts.$inferInsert`
55
55
  - Zod validation schemas mirror database schemas but add runtime validation
56
- - Use `@vercel/postgres` for connection pooling, wrapped by Drizzle
56
+ - Use `@neondatabase/serverless` for connection pooling, wrapped by Drizzle
57
57
 
58
58
  ### API Routes
59
59
 
@@ -151,12 +151,12 @@ import { posts } from '@/db/schema';
151
151
  import '@/styles/components/card.scss';
152
152
  ```
153
153
 
154
- ### Authentication (Clerk)
154
+ ### Authentication (BetterAuth)
155
155
 
156
- - Pre-configured in `app/astro.config.mjs`
157
- - Middleware: Create `app/src/middleware.ts` with `clerkMiddleware()` to protect routes
156
+ - Configured via `app/src/lib/auth.ts` using the `better-auth` package
157
+ - Auth API routes at `app/src/pages/api/auth/[...all].ts`
158
+ - Middleware: Create `app/src/middleware.ts` using `auth.api.getSession()` to protect routes
158
159
  - User IDs stored as `authorId` in database (varchar 255)
159
- - React components available via `@clerk/clerk-react`
160
160
 
161
161
  ### Progressive Web App (PWA)
162
162
 
@@ -170,8 +170,8 @@ import '@/styles/components/card.scss';
170
170
  **Required:**
171
171
 
172
172
  - `DATABASE_URL` - PostgreSQL connection string
173
- - `PUBLIC_CLERK_PUBLISHABLE_KEY` - Clerk publishable key
174
- - `CLERK_SECRET_KEY` - Clerk secret key
173
+ - `BETTER_AUTH_SECRET` - BetterAuth secret key (min 32 chars)
174
+ - `BETTER_AUTH_URL` - App URL for BetterAuth (e.g. <http://localhost:4321>)
175
175
  - `OPENAI_API_KEY` - OpenAI API key (for AI features)
176
176
 
177
177
  **Setup:** Copy `.env.example` to `.env` and fill in values
@@ -179,7 +179,7 @@ import '@/styles/components/card.scss';
179
179
  ## Key Design Decisions
180
180
 
181
181
  1. **NanoID over UUID/auto-increment:** URL-safe, shorter, equally collision-resistant
182
- 2. **Vercel Postgres over node-postgres:** Better connection pooling for serverless
182
+ 2. **Neon Serverless over node-postgres:** Better connection pooling for serverless/edge
183
183
  3. **Drizzle over Prisma:** Closer to SQL, better TypeScript inference, lighter weight
184
184
  4. **Zod validation separate from schema:** Allows different validation rules for create/update operations
185
185
  5. **SCSS over Tailwind:** Enforces semantic naming, better for large teams and maintainability
package/INSTALLATION.md CHANGED
@@ -44,16 +44,16 @@ npm install astro@latest typescript@latest
44
44
  npm install @astrojs/react@latest @astrojs/vercel@latest @astrojs/check@latest
45
45
  ```
46
46
 
47
- ### Authentication (Clerk)
47
+ ### Authentication (BetterAuth)
48
48
 
49
49
  ```bash
50
- npm install @clerk/astro@latest @clerk/clerk-react@latest
50
+ npm install better-auth@latest
51
51
  ```
52
52
 
53
53
  ### Database (Drizzle ORM + PostgreSQL)
54
54
 
55
55
  ```bash
56
- npm install drizzle-orm@latest postgres@latest @vercel/postgres@latest
56
+ npm install drizzle-orm@latest @neondatabase/serverless@latest
57
57
  npm install -D drizzle-kit@latest
58
58
  ```
59
59
 
@@ -87,7 +87,7 @@ npm install nanoid@latest
87
87
  npm install -D vite-plugin-pwa@latest @vite-pwa/assets-generator@latest
88
88
  ```
89
89
 
90
- ### React Dependencies (for Clerk components)
90
+ ### React Dependencies
91
91
 
92
92
  ```bash
93
93
  npm install react@latest react-dom@latest
@@ -110,9 +110,8 @@ npm install \
110
110
  @astrojs/react@latest \
111
111
  @astrojs/vercel@latest \
112
112
  @astrojs/check@latest \
113
- @clerk/astro@latest \
114
- @clerk/clerk-react@latest \
115
- @vercel/postgres@latest \
113
+ @neondatabase/serverless@latest \
114
+ better-auth@latest \
116
115
  ai@latest \
117
116
  @ai-sdk/openai@latest \
118
117
  drizzle-orm@latest \
@@ -191,13 +190,12 @@ cat > astro.config.mjs << 'EOF'
191
190
  import { defineConfig } from 'astro/config';
192
191
  import react from '@astrojs/react';
193
192
  import vercel from '@astrojs/vercel/serverless';
194
- import clerk from '@clerk/astro';
195
193
  import { VitePWA } from 'vite-plugin-pwa';
196
194
 
197
195
  export default defineConfig({
198
196
  output: 'server',
199
197
  adapter: vercel(),
200
- integrations: [react(), clerk()],
198
+ integrations: [react()],
201
199
  vite: {
202
200
  plugins: [VitePWA({ registerType: 'autoUpdate' })],
203
201
  },
@@ -210,8 +208,8 @@ EOF
210
208
  ```bash
211
209
  cat > .env.example << 'EOF'
212
210
  DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
213
- PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
214
- CLERK_SECRET_KEY="sk_test_..."
211
+ BETTER_AUTH_SECRET="your-secret-key-min-32-chars"
212
+ BETTER_AUTH_URL="http://localhost:4321"
215
213
  OPENAI_API_KEY="sk-..."
216
214
  EOF
217
215
  ```
@@ -319,7 +317,7 @@ npm install
319
317
  1. Review the [README.md](./README.md) for architecture details
320
318
  2. Explore the example code in `src/pages/api/`
321
319
  3. Customize your database schema in `src/db/schema.ts`
322
- 4. Set up your Clerk authentication
320
+ 4. Set up your BetterAuth authentication
323
321
  5. Deploy to Vercel
324
322
 
325
323
  ## Production Deployment
@@ -344,7 +342,8 @@ vercel --prod
344
342
 
345
343
  ```bash
346
344
  vercel env add DATABASE_URL
347
- vercel env add CLERK_SECRET_KEY
345
+ vercel env add BETTER_AUTH_SECRET
346
+ vercel env add BETTER_AUTH_URL
348
347
  vercel env add OPENAI_API_KEY
349
348
  ```
350
349
 
package/README.md CHANGED
@@ -10,7 +10,7 @@ The **ATSDC Stack** is a carefully curated combination of modern web technologie
10
10
  - **T** - [TypeScript](https://www.typescriptlang.org) - Full type safety across your entire application
11
11
  - **S** - [SCSS](https://sass-lang.com) - Powerful styling with variables, mixins, and modules
12
12
  - **D** - [Drizzle ORM](https://orm.drizzle.team) - Type-safe database operations with PostgreSQL
13
- - **C** - [Clerk](https://clerk.com) - Complete authentication and user management
13
+ - **C** - [BetterAuth](https://betterauth.dev) - Complete authentication and user management
14
14
 
15
15
  ### Additional Technologies
16
16
 
@@ -75,8 +75,8 @@ cp .env.example .env
75
75
  Required environment variables:
76
76
 
77
77
  - `DATABASE_URL` - PostgreSQL connection string
78
- - `PUBLIC_CLERK_PUBLISHABLE_KEY` - Clerk publishable key
79
- - `CLERK_SECRET_KEY` - Clerk secret key
78
+ - `BETTER_AUTH_SECRET` - BetterAuth secret key (min 32 chars)
79
+ - `BETTER_AUTH_URL` - App URL for BetterAuth (e.g. http://localhost:4321)
80
80
  - `OPENAI_API_KEY` - OpenAI API key (for AI features)
81
81
 
82
82
  ### 2. Database Setup
@@ -331,13 +331,38 @@ export const POST: APIRoute = async ({ request }) => {
331
331
 
332
332
  ## 🔐 Authentication
333
333
 
334
- Clerk is pre-configured for authentication. Protect routes with middleware:
334
+ BetterAuth is pre-configured for authentication. Set up auth and protect routes:
335
+
336
+ ```typescript
337
+ // src/lib/auth.ts
338
+ import { betterAuth } from 'better-auth';
339
+ import { drizzleAdapter } from 'better-auth/adapters/drizzle';
340
+ import { db } from '@/db/initialize';
341
+
342
+ export const auth = betterAuth({
343
+ database: drizzleAdapter(db, { provider: 'pg' }),
344
+ emailAndPassword: { enabled: true },
345
+ });
346
+ ```
347
+
348
+ ```typescript
349
+ // src/pages/api/auth/[...all].ts
350
+ import type { APIRoute } from 'astro';
351
+ import { auth } from '@/lib/auth';
352
+
353
+ export const ALL: APIRoute = ({ request }) => auth.handler(request);
354
+ ```
335
355
 
336
356
  ```typescript
337
357
  // src/middleware.ts
338
- import { clerkMiddleware } from '@clerk/astro/server';
358
+ import { auth } from '@/lib/auth';
359
+ import { defineMiddleware } from 'astro:middleware';
339
360
 
340
- export const onRequest = clerkMiddleware();
361
+ export const onRequest = defineMiddleware(async (context, next) => {
362
+ const session = await auth.api.getSession({ headers: context.request.headers });
363
+ context.locals.user = session?.user ?? null;
364
+ return next();
365
+ });
341
366
  ```
342
367
 
343
368
  ## 🚀 Deployment
@@ -359,14 +384,15 @@ npx vercel --prod
359
384
  Set these in your Vercel project settings:
360
385
 
361
386
  - `DATABASE_URL`
362
- - `CLERK_SECRET_KEY`
387
+ - `BETTER_AUTH_SECRET`
388
+ - `BETTER_AUTH_URL`
363
389
  - `OPENAI_API_KEY`
364
390
 
365
391
  ## 📚 Documentation
366
392
 
367
393
  - [Astro Documentation](https://docs.astro.build)
368
394
  - [Drizzle ORM Documentation](https://orm.drizzle.team/docs)
369
- - [Clerk Documentation](https://clerk.com/docs)
395
+ - [BetterAuth Documentation](https://betterauth.dev/docs)
370
396
  - [Zero Sync Documentation](https://zero.rocicorp.dev)
371
397
  - [Zod Documentation](https://zod.dev)
372
398
  - [Vercel AI SDK Documentation](https://sdk.vercel.ai/docs)
@@ -398,7 +424,7 @@ Contributions are welcome! Please open an issue or submit a pull request.
398
424
  3. **Real-time Sync** - Zero provides local-first data synchronization for responsive UIs
399
425
  4. **Developer Experience** - Modern tooling with excellent IDE support and automated setup
400
426
  5. **Scalability** - PostgreSQL + serverless architecture scales effortlessly
401
- 6. **Security** - Clerk handles authentication, Zod validates inputs
427
+ 6. **Security** - BetterAuth handles authentication, Zod validates inputs
402
428
  7. **AI-Ready** - Vercel AI SDK integration for modern AI features
403
429
  8. **PWA Support** - Offline-first capabilities with Vite PWA
404
430
  9. **Clean Architecture** - Enforced separation of concerns, especially for styles
package/app/.env.example CHANGED
@@ -1,9 +1,9 @@
1
1
  # Database
2
2
  DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
3
3
 
4
- # Clerk Authentication
5
- PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
6
- CLERK_SECRET_KEY="sk_test_..."
4
+ # BetterAuth
5
+ BETTER_AUTH_SECRET="your-secret-key-min-32-chars"
6
+ BETTER_AUTH_URL="http://localhost:4321"
7
7
 
8
8
  # OpenAI and other AI model providers (for Vercel AI SDK)
9
9
  OPENAI_API_KEY="sk-..."
@@ -14,8 +14,8 @@ on:
14
14
 
15
15
  env:
16
16
  DATABASE_URL: ${{ secrets.DATABASE_URL }}
17
- PUBLIC_CLERK_PUBLISHABLE_KEY: ${{ secrets.PUBLIC_CLERK_PUBLISHABLE_KEY }}
18
- CLERK_SECRET_KEY: ${{ secrets.CLERK_SECRET_KEY }}
17
+ BETTER_AUTH_SECRET: ${{ secrets.BETTER_AUTH_SECRET }}
18
+ BETTER_AUTH_URL: ${{ secrets.BETTER_AUTH_URL }}
19
19
  OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
20
20
  GOOGLE_GENERATIVE_AI_API_KEY: ${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
21
21
  EXA_API_KEY: ${{ secrets.EXA_API_KEY }}
package/app/README.md CHANGED
@@ -8,7 +8,7 @@ This is the main Astro application for the ATSDC Stack.
8
8
 
9
9
  - Node.js >= 18.0.0
10
10
  - PostgreSQL database (Vercel Postgres, Neon, or local)
11
- - API keys for Clerk, OpenAI, and optionally Exa
11
+ - API keys for BetterAuth, OpenAI, and optionally Exa
12
12
 
13
13
  ### Installation
14
14
 
@@ -30,9 +30,9 @@ Create a `.env` file with the following variables:
30
30
  # Database
31
31
  DATABASE_URL="postgresql://user:password@localhost:5432/dbname"
32
32
 
33
- # Clerk Authentication
34
- PUBLIC_CLERK_PUBLISHABLE_KEY="pk_test_..."
35
- CLERK_SECRET_KEY="sk_test_..."
33
+ # BetterAuth
34
+ BETTER_AUTH_SECRET="your-secret-key-min-32-chars"
35
+ BETTER_AUTH_URL="http://localhost:4321"
36
36
 
37
37
  # OpenAI (for Vercel AI SDK)
38
38
  OPENAI_API_KEY="sk-..."
@@ -154,13 +154,17 @@ export const createPostSchema = z.object({
154
154
 
155
155
  ## 🔐 Authentication
156
156
 
157
- Authentication is handled by Clerk. Configure in `astro.config.mjs`:
157
+ Authentication is handled by BetterAuth. Configure in `src/lib/auth.ts`:
158
158
 
159
- ```javascript
160
- clerk({
161
- afterSignInUrl: '/',
162
- afterSignUpUrl: '/',
163
- })
159
+ ```typescript
160
+ import { betterAuth } from 'better-auth';
161
+ import { drizzleAdapter } from 'better-auth/adapters/drizzle';
162
+ import { db } from '@/db/initialize';
163
+
164
+ export const auth = betterAuth({
165
+ database: drizzleAdapter(db, { provider: 'pg' }),
166
+ emailAndPassword: { enabled: true },
167
+ });
164
168
  ```
165
169
 
166
170
  ## 🤖 AI Features
@@ -204,8 +208,8 @@ vercel
204
208
  Make sure to set these environment variables in your Vercel project settings:
205
209
 
206
210
  - `DATABASE_URL`
207
- - `PUBLIC_CLERK_PUBLISHABLE_KEY`
208
- - `CLERK_SECRET_KEY`
211
+ - `BETTER_AUTH_SECRET`
212
+ - `BETTER_AUTH_URL`
209
213
  - `OPENAI_API_KEY`
210
214
  - `EXA_API_KEY` (optional)
211
215
 
@@ -213,7 +217,7 @@ Make sure to set these environment variables in your Vercel project settings:
213
217
 
214
218
  - [Astro Documentation](https://docs.astro.build)
215
219
  - [Drizzle ORM](https://orm.drizzle.team)
216
- - [Clerk](https://clerk.com/docs)
220
+ - [BetterAuth](https://betterauth.dev/docs)
217
221
  - [Vercel AI SDK](https://sdk.vercel.ai/docs)
218
222
  - [Zod](https://zod.dev)
219
223
  - [Exa Search](https://docs.exa.ai)
@@ -1,7 +1,6 @@
1
1
  import { defineConfig } from 'astro/config';
2
2
  import react from '@astrojs/react';
3
3
  import vercel from '@astrojs/vercel';
4
- import clerk from '@clerk/astro';
5
4
  import { VitePWA } from 'vite-plugin-pwa';
6
5
 
7
6
  // https://astro.build/config
@@ -17,10 +16,6 @@ export default defineConfig({
17
16
  },
18
17
  integrations: [
19
18
  react(),
20
- clerk({
21
- afterSignInUrl: '/',
22
- afterSignUpUrl: '/',
23
- }),
24
19
  ],
25
20
  vite: {
26
21
  plugins: [
package/app/package.json CHANGED
@@ -27,10 +27,9 @@
27
27
  "@astrojs/check": "^0.9.6",
28
28
  "@astrojs/react": "^4.4.2",
29
29
  "@astrojs/vercel": "^9.0.2",
30
- "@clerk/astro": "^1.4.3",
31
- "@clerk/clerk-react": "^5.17.3",
30
+ "@neondatabase/serverless": "^0.10.4",
32
31
  "@rocicorp/zero": "^0.2.0",
33
- "@vercel/postgres": "^0.10.0",
32
+ "better-auth": "^1.2.7",
34
33
  "ai": "^5.0.0",
35
34
  "astro": "^5.16.6",
36
35
  "cheerio": "^1.0.0",
@@ -1,14 +1,15 @@
1
- import { sql } from '@vercel/postgres';
2
- import { drizzle } from 'drizzle-orm/vercel-postgres';
1
+ import { neon } from '@neondatabase/serverless';
2
+ import { drizzle } from 'drizzle-orm/neon-http';
3
3
  import * as schema from './schema';
4
4
  import { posts, comments } from './schema';
5
5
 
6
6
  /**
7
7
  * Database client configuration
8
- * Uses Vercel Postgres for production-ready connection pooling
8
+ * Uses Neon serverless for production-ready connection pooling
9
9
  */
10
10
 
11
11
  // Create Drizzle instance with schema
12
+ const sql = neon(process.env.DATABASE_URL!);
12
13
  export const db = drizzle(sql, { schema });
13
14
 
14
15
  // Export schema for convenience
@@ -17,7 +17,7 @@ export const posts = pgTable('posts', {
17
17
  content: text('content').notNull(),
18
18
  excerpt: text('excerpt'),
19
19
 
20
- // Author information (Clerk user ID)
20
+ // Author information (BetterAuth user ID)
21
21
  authorId: varchar('author_id', { length: 255 }).notNull(),
22
22
  authorName: varchar('author_name', { length: 255 }),
23
23
 
@@ -52,7 +52,7 @@ export const comments = pgTable('comments', {
52
52
  // Comment content
53
53
  content: text('content').notNull(),
54
54
 
55
- // Author information (Clerk user ID)
55
+ // Author information (BetterAuth user ID)
56
56
  authorId: varchar('author_id', { length: 255 }).notNull(),
57
57
  authorName: varchar('author_name', { length: 255 }),
58
58
 
@@ -23,7 +23,7 @@ export const siteConfig = {
23
23
  * Full description of the stack
24
24
  */
25
25
  stackDescription:
26
- 'Full-stack application built with Astro, TypeScript, Drizzle, Clerk, and SCSS',
26
+ 'Full-stack application built with Astro, TypeScript, Drizzle, BetterAuth, and SCSS',
27
27
 
28
28
  /**
29
29
  * Docs URL
@@ -41,7 +41,7 @@ import '@/styles/pages/index.scss';
41
41
  </div>
42
42
 
43
43
  <div class="home__feature card">
44
- <h3>🔐 Clerk</h3>
44
+ <h3>🔐 BetterAuth</h3>
45
45
  <p>Complete authentication and user management</p>
46
46
  </div>
47
47
 
package/bin/cli.js CHANGED
@@ -167,7 +167,6 @@ function generateAstroConfig(adapter, integrations = []) {
167
167
  vercel: `import { defineConfig } from 'astro/config';
168
168
  ${integrationImports}
169
169
  import vercel from '@astrojs/vercel';
170
- import clerk from '@clerk/astro';
171
170
  import { VitePWA } from 'vite-plugin-pwa';
172
171
 
173
172
  export default defineConfig({
@@ -182,10 +181,6 @@ export default defineConfig({
182
181
  },
183
182
  integrations: [
184
183
  ${integrationCalls}
185
- clerk({
186
- afterSignInUrl: '/',
187
- afterSignUpUrl: '/',
188
- }),
189
184
  ],
190
185
  vite: {
191
186
  plugins: [
@@ -250,7 +245,6 @@ ${integrationCalls}
250
245
  netlify: `import { defineConfig } from 'astro/config';
251
246
  ${integrationImports}
252
247
  import netlify from '@astrojs/netlify';
253
- import clerk from '@clerk/astro';
254
248
  import { VitePWA } from 'vite-plugin-pwa';
255
249
 
256
250
  export default defineConfig({
@@ -258,10 +252,6 @@ export default defineConfig({
258
252
  adapter: netlify(),
259
253
  integrations: [
260
254
  ${integrationCalls}
261
- clerk({
262
- afterSignInUrl: '/',
263
- afterSignUpUrl: '/',
264
- }),
265
255
  ],
266
256
  vite: {
267
257
  plugins: [
@@ -326,7 +316,6 @@ ${integrationCalls}
326
316
  cloudflare: `import { defineConfig} from 'astro/config';
327
317
  ${integrationImports}
328
318
  import cloudflare from '@astrojs/cloudflare';
329
- import clerk from '@clerk/astro';
330
319
  import { VitePWA } from 'vite-plugin-pwa';
331
320
 
332
321
  export default defineConfig({
@@ -334,10 +323,6 @@ export default defineConfig({
334
323
  adapter: cloudflare(),
335
324
  integrations: [
336
325
  ${integrationCalls}
337
- clerk({
338
- afterSignInUrl: '/',
339
- afterSignUpUrl: '/',
340
- }),
341
326
  ],
342
327
  vite: {
343
328
  plugins: [
@@ -402,7 +387,6 @@ ${integrationCalls}
402
387
  node: `import { defineConfig } from 'astro/config';
403
388
  ${integrationImports}
404
389
  import node from '@astrojs/node';
405
- import clerk from '@clerk/astro';
406
390
  import { VitePWA } from 'vite-plugin-pwa';
407
391
 
408
392
  export default defineConfig({
@@ -412,10 +396,6 @@ export default defineConfig({
412
396
  }),
413
397
  integrations: [
414
398
  ${integrationCalls}
415
- clerk({
416
- afterSignInUrl: '/',
417
- afterSignUpUrl: '/',
418
- }),
419
399
  ],
420
400
  vite: {
421
401
  plugins: [
@@ -479,17 +459,12 @@ ${integrationCalls}
479
459
  `,
480
460
  static: `import { defineConfig } from 'astro/config';
481
461
  ${integrationImports}
482
- import clerk from '@clerk/astro';
483
462
  import { VitePWA } from 'vite-plugin-pwa';
484
463
 
485
464
  export default defineConfig({
486
465
  output: 'static',
487
466
  integrations: [
488
467
  ${integrationCalls}
489
- clerk({
490
- afterSignInUrl: '/',
491
- afterSignUpUrl: '/',
492
- }),
493
468
  ],
494
469
  vite: {
495
470
  plugins: [
@@ -569,7 +544,7 @@ async function setupDatabase(projectDir) {
569
544
  }
570
545
 
571
546
  // Try to run drizzle-kit push
572
- execSync('npm run db:push', {
547
+ execSync('npx drizzle-kit push', {
573
548
  cwd: projectDir,
574
549
  stdio: 'inherit',
575
550
  });
@@ -578,7 +553,7 @@ async function setupDatabase(projectDir) {
578
553
  return true;
579
554
  } catch (error) {
580
555
  logError('Failed to push database schema');
581
- logWarning('Please configure your DATABASE_URL in .env and run: npm run db:push');
556
+ logWarning('Please configure your DATABASE_URL in .env and run: npx drizzle-kit push');
582
557
  console.log(`\nError details: ${error.message}`);
583
558
  return false;
584
559
  }
@@ -777,7 +752,7 @@ async function createProject(projectName, options = {}) {
777
752
  console.log('\nDocumentation:');
778
753
  console.log(` • Astro: ${colors.cyan}https://astro.build${colors.reset}`);
779
754
  console.log(` • Drizzle ORM: ${colors.cyan}https://orm.drizzle.team${colors.reset}`);
780
- console.log(` • Clerk: ${colors.cyan}https://clerk.com/docs${colors.reset}`);
755
+ console.log(` • BetterAuth: ${colors.cyan}https://betterauth.dev/docs${colors.reset}`);
781
756
  console.log(` • Vercel AI SDK: ${colors.cyan}https://sdk.vercel.ai${colors.reset}`);
782
757
  console.log(` • Exa Search: ${colors.cyan}https://docs.exa.ai${colors.reset}`);
783
758
 
@@ -973,7 +948,7 @@ ${colors.bright}${colors.green}TECHNOLOGY STACK${colors.reset}
973
948
  ${colors.cyan}• NanoID${colors.reset} - Secure unique ID generation for records
974
949
 
975
950
  ${colors.bright}Authentication:${colors.reset}
976
- ${colors.cyan}• Clerk${colors.reset} - Complete user management and authentication
951
+ ${colors.cyan}• BetterAuth${colors.reset} - Complete user management and authentication
977
952
  Includes social logins, 2FA, user profiles
978
953
 
979
954
  ${colors.bright}Styling:${colors.reset}
@@ -995,8 +970,8 @@ ${colors.bright}${colors.green}NEXT STEPS AFTER CREATION${colors.reset}
995
970
 
996
971
  ${colors.yellow}2.${colors.reset} Configure environment variables in ${colors.cyan}.env${colors.reset}:
997
972
  • DATABASE_URL - PostgreSQL connection string
998
- PUBLIC_CLERK_PUBLISHABLE_KEY - Get from clerk.com
999
- CLERK_SECRET_KEY - Get from clerk.com
973
+ BETTER_AUTH_SECRET - Random secret (min 32 chars)
974
+ BETTER_AUTH_URL - Your app URL
1000
975
  • OPENAI_API_KEY - Get from platform.openai.com
1001
976
  • EXA_API_KEY - Get from exa.ai (optional)
1002
977
 
@@ -1018,7 +993,7 @@ ${colors.bright}${colors.green}RESOURCES${colors.reset}
1018
993
  ${colors.cyan}Documentation:${colors.reset}
1019
994
  • Astro: https://docs.astro.build
1020
995
  • Drizzle ORM: https://orm.drizzle.team
1021
- Clerk: https://clerk.com/docs
996
+ BetterAuth: https://betterauth.dev/docs
1022
997
  • Zod: https://zod.dev
1023
998
  • Vercel AI: https://sdk.vercel.ai/docs
1024
999
  • Exa Search: https://docs.exa.ai
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-atsdc-stack",
3
- "version": "1.2.0",
4
- "description": "ATSDC Stack - Astro, TypeScript, SCSS, Drizzle, Clerk CLI utility",
3
+ "version": "1.3.1",
4
+ "description": "ATSDC Stack - Astro, TypeScript, SCSS, Drizzle, BetterAuth CLI utility",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "create-atsdc-stack": "./bin/cli.js"
@@ -18,7 +18,7 @@
18
18
  "astro",
19
19
  "typescript",
20
20
  "drizzle",
21
- "clerk",
21
+ "better-auth",
22
22
  "scss",
23
23
  "zod",
24
24
  "vercel-ai",