Here's the real meat of the operation. With guidance from ChatGPT, I developed code snippets to monitor API calls on a daily and monthly basis. I stored the daily and monthly usage counter on the Clerk user object like this:
I set an overall monthly limit of 5,000 API calls for the entire site. I chose MongoDB Atlas as the tech to use to keep track of this given this part couldn't (and shouldn't) use Clerk user data. MongoDB Atlas is a managed service version of Mongo that allowed me to not have to setup GCP compute or storage infrastructure to run Mongo. I am 100% sure GCP has other NoSQL solutions, but I was most comfortable with Mongo so this is the direction i decided to take. I may refactor later to use a GCP native capability just for fun.
This limit check makes the most sense to be done from the GO code on the server-side as a part of the generate-story api call that i created. This would keep a detailed record of every API call. I used the CountDocuments query that MongoDB provides with a filter of a dateCreated range within the current month. Here is that code and it's a straightforward fast query to check usage has exceed my set limit.
There is also a function for inserting a new record after the call but I did not share that here.
And that's the lowdown on how I tackled user authentication and use limits. Pretty fun on as well.