📖
CC10045 min
Day 28
Reading from the Database
Let's view those submissions!
Today's Lesson
Read data back from Supabase to display on a page. You'll create a simple admin page where you can see all the messages people have sent through your contact form.
Today's Tasks
- 1Create a simple admin page (not publicly linked)
- 2Fetch and display all contact submissions
- 3Style it as a simple table
Prompt to Use
Create a simple admin page at /admin that: 1. Fetches all contact submissions from Supabase 2. Displays them in a clean table 3. Shows: Name, Email, Message, Date submitted Don't link to it from the navigation - it's a secret page for now.
Expected Outcome
Admin page showing all submissions.
New Terms
- Fetch
- Select
- Server Component
- Data Display
Pro Tip
This "secret page" approach works for simple projects. For real security, you'd add authentication.
Coming Tomorrow
Polish and SEO.
P.S. You can now see who's reaching out to you. That's a real product feature.
Your Study Progress
27%
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Day 28 of 100
Today's Tasks
0/3