Skip to content

Commit 421e72a

Browse files
committed
feat: add workshop session page with getstream.io
1 parent c758ae8 commit 421e72a

File tree

16 files changed

+960
-3
lines changed

16 files changed

+960
-3
lines changed

.env.example

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ GITHUB_CLIENT_SECRET=""
1111

1212
# Resend
1313
RESEND_API_KEY="re_"
14-
EMAIL_FROM_ADDRESS="onboarding@resend.dev"
14+
EMAIL_FROM_ADDRESS="onboarding@resend.dev"
15+
16+
#stream-io
17+
NEXT_PUBLIC_STREAM_API_KEY=""
18+
STREAM_SECRET_KEY=""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE "workshops" ADD COLUMN "has_started" boolean DEFAULT false NOT NULL;--> statement-breakpoint
2+
ALTER TABLE "workshops" ADD COLUMN "has_completed" boolean DEFAULT false NOT NULL;
+312
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,312 @@
1+
{
2+
"id": "4a39d447-7057-41a8-9a2e-974b01ed1a6d",
3+
"prevId": "8ffad2dd-f372-4e8d-8e86-57e1473cf678",
4+
"version": "5",
5+
"dialect": "pg",
6+
"tables": {
7+
"registrations": {
8+
"name": "registrations",
9+
"schema": "",
10+
"columns": {
11+
"id": {
12+
"name": "id",
13+
"type": "varchar(30)",
14+
"primaryKey": true,
15+
"notNull": true
16+
},
17+
"workshop_id": {
18+
"name": "workshop_id",
19+
"type": "varchar(30)",
20+
"primaryKey": false,
21+
"notNull": true
22+
},
23+
"registrant_id": {
24+
"name": "registrant_id",
25+
"type": "varchar(30)",
26+
"primaryKey": false,
27+
"notNull": true
28+
},
29+
"registered_at": {
30+
"name": "registered_at",
31+
"type": "timestamp",
32+
"primaryKey": false,
33+
"notNull": true,
34+
"default": "now()"
35+
}
36+
},
37+
"indexes": {},
38+
"foreignKeys": {
39+
"registrations_workshop_id_workshops_id_fk": {
40+
"name": "registrations_workshop_id_workshops_id_fk",
41+
"tableFrom": "registrations",
42+
"tableTo": "workshops",
43+
"columnsFrom": [
44+
"workshop_id"
45+
],
46+
"columnsTo": [
47+
"id"
48+
],
49+
"onDelete": "cascade",
50+
"onUpdate": "no action"
51+
},
52+
"registrations_registrant_id_users_id_fk": {
53+
"name": "registrations_registrant_id_users_id_fk",
54+
"tableFrom": "registrations",
55+
"tableTo": "users",
56+
"columnsFrom": [
57+
"registrant_id"
58+
],
59+
"columnsTo": [
60+
"id"
61+
],
62+
"onDelete": "no action",
63+
"onUpdate": "no action"
64+
}
65+
},
66+
"compositePrimaryKeys": {},
67+
"uniqueConstraints": {
68+
"registrations_workshop_id_unique": {
69+
"name": "registrations_workshop_id_unique",
70+
"nullsNotDistinct": false,
71+
"columns": [
72+
"workshop_id"
73+
]
74+
},
75+
"registrations_registrant_id_unique": {
76+
"name": "registrations_registrant_id_unique",
77+
"nullsNotDistinct": false,
78+
"columns": [
79+
"registrant_id"
80+
]
81+
}
82+
}
83+
},
84+
"sessions": {
85+
"name": "sessions",
86+
"schema": "",
87+
"columns": {
88+
"id": {
89+
"name": "id",
90+
"type": "text",
91+
"primaryKey": true,
92+
"notNull": true
93+
},
94+
"user_id": {
95+
"name": "user_id",
96+
"type": "varchar(30)",
97+
"primaryKey": false,
98+
"notNull": true
99+
},
100+
"expires_at": {
101+
"name": "expires_at",
102+
"type": "timestamp with time zone",
103+
"primaryKey": false,
104+
"notNull": true
105+
}
106+
},
107+
"indexes": {},
108+
"foreignKeys": {
109+
"sessions_user_id_users_id_fk": {
110+
"name": "sessions_user_id_users_id_fk",
111+
"tableFrom": "sessions",
112+
"tableTo": "users",
113+
"columnsFrom": [
114+
"user_id"
115+
],
116+
"columnsTo": [
117+
"id"
118+
],
119+
"onDelete": "no action",
120+
"onUpdate": "no action"
121+
}
122+
},
123+
"compositePrimaryKeys": {},
124+
"uniqueConstraints": {}
125+
},
126+
"users": {
127+
"name": "users",
128+
"schema": "",
129+
"columns": {
130+
"id": {
131+
"name": "id",
132+
"type": "varchar(30)",
133+
"primaryKey": true,
134+
"notNull": true
135+
},
136+
"name": {
137+
"name": "name",
138+
"type": "varchar(50)",
139+
"primaryKey": false,
140+
"notNull": true
141+
},
142+
"github_id": {
143+
"name": "github_id",
144+
"type": "integer",
145+
"primaryKey": false,
146+
"notNull": true
147+
},
148+
"email": {
149+
"name": "email",
150+
"type": "varchar(50)",
151+
"primaryKey": false,
152+
"notNull": true
153+
},
154+
"image": {
155+
"name": "image",
156+
"type": "text",
157+
"primaryKey": false,
158+
"notNull": false
159+
},
160+
"created_at": {
161+
"name": "created_at",
162+
"type": "timestamp",
163+
"primaryKey": false,
164+
"notNull": true,
165+
"default": "now()"
166+
},
167+
"updated_at": {
168+
"name": "updated_at",
169+
"type": "timestamp",
170+
"primaryKey": false,
171+
"notNull": false,
172+
"default": "current_timestamp"
173+
}
174+
},
175+
"indexes": {
176+
"user_github_idx": {
177+
"name": "user_github_idx",
178+
"columns": [
179+
"github_id"
180+
],
181+
"isUnique": false
182+
}
183+
},
184+
"foreignKeys": {},
185+
"compositePrimaryKeys": {},
186+
"uniqueConstraints": {
187+
"users_github_id_unique": {
188+
"name": "users_github_id_unique",
189+
"nullsNotDistinct": false,
190+
"columns": [
191+
"github_id"
192+
]
193+
}
194+
}
195+
},
196+
"workshops": {
197+
"name": "workshops",
198+
"schema": "",
199+
"columns": {
200+
"id": {
201+
"name": "id",
202+
"type": "varchar(30)",
203+
"primaryKey": true,
204+
"notNull": true
205+
},
206+
"organizer_id": {
207+
"name": "organizer_id",
208+
"type": "varchar(30)",
209+
"primaryKey": false,
210+
"notNull": true
211+
},
212+
"title": {
213+
"name": "title",
214+
"type": "varchar(50)",
215+
"primaryKey": false,
216+
"notNull": true
217+
},
218+
"description": {
219+
"name": "description",
220+
"type": "text",
221+
"primaryKey": false,
222+
"notNull": true
223+
},
224+
"date": {
225+
"name": "date",
226+
"type": "timestamp",
227+
"primaryKey": false,
228+
"notNull": true
229+
},
230+
"duration": {
231+
"name": "duration",
232+
"type": "integer",
233+
"primaryKey": false,
234+
"notNull": true
235+
},
236+
"is_public": {
237+
"name": "is_public",
238+
"type": "boolean",
239+
"primaryKey": false,
240+
"notNull": true
241+
},
242+
"access_code": {
243+
"name": "access_code",
244+
"type": "varchar(8)",
245+
"primaryKey": false,
246+
"notNull": true
247+
},
248+
"has_started": {
249+
"name": "has_started",
250+
"type": "boolean",
251+
"primaryKey": false,
252+
"notNull": true,
253+
"default": false
254+
},
255+
"has_completed": {
256+
"name": "has_completed",
257+
"type": "boolean",
258+
"primaryKey": false,
259+
"notNull": true,
260+
"default": false
261+
},
262+
"created_at": {
263+
"name": "created_at",
264+
"type": "timestamp",
265+
"primaryKey": false,
266+
"notNull": true,
267+
"default": "now()"
268+
},
269+
"updated_at": {
270+
"name": "updated_at",
271+
"type": "timestamp",
272+
"primaryKey": false,
273+
"notNull": false,
274+
"default": "current_timestamp"
275+
}
276+
},
277+
"indexes": {},
278+
"foreignKeys": {
279+
"workshops_organizer_id_users_id_fk": {
280+
"name": "workshops_organizer_id_users_id_fk",
281+
"tableFrom": "workshops",
282+
"tableTo": "users",
283+
"columnsFrom": [
284+
"organizer_id"
285+
],
286+
"columnsTo": [
287+
"id"
288+
],
289+
"onDelete": "no action",
290+
"onUpdate": "no action"
291+
}
292+
},
293+
"compositePrimaryKeys": {},
294+
"uniqueConstraints": {
295+
"workshops_access_code_unique": {
296+
"name": "workshops_access_code_unique",
297+
"nullsNotDistinct": false,
298+
"columns": [
299+
"access_code"
300+
]
301+
}
302+
}
303+
}
304+
},
305+
"enums": {},
306+
"schemas": {},
307+
"_meta": {
308+
"columns": {},
309+
"schemas": {},
310+
"tables": {}
311+
}
312+
}

drizzle/migrations/meta/_journal.json

+7
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@
5757
"when": 1718820349734,
5858
"tag": "0007_exotic_shriek",
5959
"breakpoints": true
60+
},
61+
{
62+
"idx": 8,
63+
"version": "5",
64+
"when": 1720002739894,
65+
"tag": "0008_loose_adam_warlock",
66+
"breakpoints": true
6067
}
6168
]
6269
}

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
"@radix-ui/react-slot": "^1.0.2",
3838
"@radix-ui/react-switch": "^1.0.3",
3939
"@react-email/components": "0.0.19",
40+
"@stream-io/node-sdk": "^0.3.0",
41+
"@stream-io/video-react-sdk": "^1.2.11",
4042
"@t3-oss/env-nextjs": "^0.10.1",
4143
"arctic": "^1.8.1",
4244
"class-variance-authority": "^0.7.0",

0 commit comments

Comments
 (0)