Feature Update: Check-in!
My legion of fans can now talk to me directly
Published: 7/28/2022
Last updated: 7/30/2022
359 words
Checking in
One thing this website is lacking is some real backend functionality. I thought a good way to get a start on this would be to implement a check-in functionality where you can pop me a message. Check out the home page of the site to send a message!
I've used a few things for this. Firstly I've been using Cloudflare Pages Functions, which follows a similar routing pattern structure to Next.js, which I really liked and appreciated, at work the tech stack is such that we try to allow people to work with front-end and back-end systems interchangeably by making the code look similar and borrow similar concepts for both. Having the same routing system for the front-end and back-end is a simple idea but makes visualising the structure of the API simple. I'm also using Workers KV to store messages which has a built-in TTL mechanism. If a user doesn't verify the message in their email inbox within 2 days it'll be deleted from KV.
I used SendGrid to send emails to verify email addresses and send on the messages. SendGrid is owned by Twilio which I've used before a decent amount and I was impressed how easy it was to set up and what tools exist to empower developers and non-developers alike to get the most out of their products, similar to how Twilio Studio worked really well for our previous work.
I've really enjoyed how easy this functionality was to put together and just do in a couple of hours, from never using Cloudflare Functions or SendGrid before, it's been reasonably quick and quite fun to do.
Component Demo!
I also decided to have a component demo page so I can look at the various custom components I've made and see how they look all together and edit them while being able to see how they all fit together, with the overall style of the website.
Maybe I'll make a little component library, although I would recommend using something like Material UI to someone else, it's much more expressive and better supported. I'm just doing it this way because I want to get better at styling and design.