abdellah0l-stack 1.0.1 → 1.0.2

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 CHANGED
@@ -31,17 +31,19 @@ abdellah0l-stack my-app
31
31
  ```bash
32
32
  cd my-app
33
33
  npm install
34
+ npm install babel-plugin-react-compiler --save-dev
34
35
 
35
36
  # Set up your .env file with:
36
37
  # - DATABASE_URL
38
+ # - BETTER_AUTH_URL
37
39
  # - BETTER_AUTH_SECRET
38
40
  # - GITHUB_CLIENT_ID & GITHUB_CLIENT_SECRET
39
41
  # - GOOGLE_CLIENT_ID & GOOGLE_CLIENT_SECRET
40
- # - ARCJET_KEY
42
+ # - ARCJET_KEY (if using rate limiting)
41
43
  # - AI_GATEWAY_API_KEY (if using AI)
42
44
  # - UPLOADTHING_TOKEN (if using uploads)
43
45
 
44
- npm run db:push
46
+ npm run build
45
47
  npm run dev
46
48
  ```
47
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abdellah0l-stack",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Scaffold a Next.js project with TypeScript, tRPC, Drizzle, Better-Auth, Arcjet, and Vercel AI SDK",
5
5
  "bin": {
6
6
  "abdellah0l-stack": "./bin/cli.js"
@@ -0,0 +1,30 @@
1
+ # Database (Neon PostgreSQL)
2
+ DATABASE_URL=
3
+
4
+ # Node Environment
5
+ NODE_ENV="development"
6
+
7
+ # Better Auth
8
+ BETTER_AUTH_SECRET=
9
+ BETTER_AUTH_URL=http://localhost:3000
10
+
11
+ # GitHub OAuth
12
+ GITHUB_CLIENT_ID=
13
+ GITHUB_CLIENT_SECRET=
14
+
15
+ # Google OAuth
16
+ GOOGLE_CLIENT_ID=
17
+ GOOGLE_CLIENT_SECRET=
18
+
19
+ # Arcjet (Rate Limiting)
20
+ ARCJET_KEY=
21
+
22
+ # AI Configuration
23
+ AI_GATEWAY_API_KEY=
24
+
25
+
26
+ # UploadThing (File Uploads)
27
+ UPLOADTHING_TOKEN=
28
+
29
+ # App URL
30
+ NEXT_PUBLIC_APP_URL=http://localhost:3000
@@ -2,10 +2,10 @@ import Link from "next/link";
2
2
 
3
3
  export default function Home() {
4
4
  return (
5
- <main className="min-h-screen bg-gradient-to-b from-zinc-900 to-black text-white">
5
+ <main className="min-h-screen bg-linear-to-b from-zinc-900 to-black text-white">
6
6
  <div className="container mx-auto px-4 py-20">
7
7
  <div className="text-center space-y-8">
8
- <h1 className="text-5xl font-bold bg-gradient-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent">
8
+ <h1 className="text-5xl font-bold bg-linear-to-r from-blue-400 to-purple-500 bg-clip-text text-transparent">
9
9
  Welcome to Abdellah0l-Stack
10
10
  </h1>
11
11
  <p className="text-xl text-zinc-400 max-w-2xl mx-auto">
@@ -3,6 +3,7 @@ import { router, publicProcedure, protectedProcedure } from "../trpc";
3
3
  import { db } from "@/drizzle/db";
4
4
  import { user } from "@/drizzle/schema/auth-schema";
5
5
  import { eq } from "drizzle-orm";
6
+ import { session } from '../../drizzle/schema/auth-schema';
6
7
 
7
8
  // this is an example router file for managing users
8
9
  // the ctx in protectedProcedure contains the authenticated user's session info
@@ -14,7 +15,7 @@ export const usersRouter = router({
14
15
  const [profile] = await db
15
16
  .select()
16
17
  .from(user)
17
- .where(eq(user.id, ctx.user.id));
18
+ .where(eq(user.id, ctx.session.user.id));
18
19
  return profile ?? null;
19
20
  }),
20
21
 
@@ -49,7 +50,7 @@ export const usersRouter = router({
49
50
  ...(input.name && { name: input.name }),
50
51
  ...(input.image && { image: input.image }),
51
52
  })
52
- .where(eq(user.id, ctx.user.id))
53
+ .where(eq(user.id, ctx.session.user.id))
53
54
  .returning();
54
55
  return updated;
55
56
  }),