@@ -4,7 +4,7 @@ It is a `SaaS` (Software as a Service), `AI Platform`
4
4
5
5
### Stack
6
6
7
- ` Nest.js 14, React, Typescript, OpenAI API, Replicate API, Clerk, Prisma, Zod, Postgres, Supabase, zustand, Stripe, Crisp, Tailwind, Shadcn-ui, Axios, React hook form, React markdown ` .
7
+ ` Nest.js 14, React, Typescript, OpenAI API, Replicate API, Clerk, Prisma, Zod, Postgres, Supabase, zustand, Stripe, Crisp, Tailwind, Shadcn-ui, Axios, React hook form, react hot toast, React markdown ` .
8
8
9
9
## Getting Started
10
10
@@ -24,12 +24,40 @@ bun dev
24
24
25
25
Create:
26
26
27
+ ```
28
+
29
+ CLERK_SECRET_KEY
30
+
31
+ NEXT_PUBLIC_CLERK_SIGN_IN_URL
32
+ NEXT_PUBLIC_CLERK_SIGN_UP_URL
33
+ NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL
34
+ NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL
35
+ NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY
36
+
37
+ OPENAI_API_KEY
38
+
39
+ REPLICATE_API_TOKEN
40
+
41
+ NEXT_PUBLIC_APP_URL
42
+
43
+ DATABASE_URL
44
+ DATABASE_PASS
45
+
46
+ STRIPE_API_KEY
47
+ STRIPE_WEBHOOK_SECRET
48
+
49
+ ```
50
+
27
51
## For prisma
28
52
29
53
``` bash
30
54
# Generate prisma setup
31
55
npx prisma init # than make your changes on prisma schema with your provider and connection string
32
56
57
+ # Generate/Create tables
58
+
59
+ npx prisma generate
60
+
33
61
# Install prisma client
34
62
npm i @prisma/client
35
63
@@ -38,4 +66,19 @@ npx prisma db push
38
66
39
67
# Open prisma studio on localhost
40
68
npx prisma studio
69
+
70
+ # Reset database (You will lose all the data)
71
+ npx prisma migrate reset
41
72
```
73
+
74
+ ## For stripe
75
+
76
+ - Create the connection with the sample endpoint
77
+ - Test in local environment
78
+ - Download cli
79
+ - $ stripe login (check documentation)
80
+ - $ stripe listen --forward-to (localhost:3000/api/webhook)
81
+ now you got the secret, copy it and add it to your .env ` STRIPE_WEBHOOK_SECRET `
82
+ - $ stripe trigger (trigger events with the cli)
83
+ - Keep dev running , prisma and stripe cli bash's
84
+ - Go to stipe website and search customer portal and activate 'Activate test link'
0 commit comments