From the course: Build with AI: Create a Follow-Up App with React, Supabase, and Cursor
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Queueing and rate-limiting logic
From the course: Build with AI: Create a Follow-Up App with React, Supabase, and Cursor
Queueing and rate-limiting logic
- [Instructor] In this lesson, we'll add two essential features, rate limiting, form submissions by IP to prevent abuse, and a follow-up email queue, so we can batch, or try to, outgoing emails. To implement this feature, we need to track each submission's IP and timestamp. So we need to create a form_submissions table, and it needs to have the following columns, ID, the IP address, and submitted_at. So next, tell Cursor what to do. We want to implement rate limiting and queue. So we need a new table, form_submissions, containing ID, IP address, then submitted_at. There's some redundancy in some of the tables that have been created, because the list tables will contain IP address, but we want to separate the concerns. That is why we are creating this new table. We can also leverage the current table, which is delete, but there'll be too much hitting on a particular table. So if you could remember, there's also an IP…