Every limit in Nakodo is counted since the start of the current billing period. There is no job that resets anything at midnight on the 1st, and no counter column to zero. The period is rolled forward by whoever reads it next.
src/lib/subscription.ts is 70 lines and this is the function that does it:
export async function getSubscription ( userId : string , exec : Executor = db ) { const now = new Date (); let sub = await exec . query . subscriptions . findFirst ({ where : eq ( subscriptions . userId , userId ) }); if ( ! sub ) { await exec . insert ( subscriptions ) . values ({ userId , plan : " free " , currentPeriodStart : now , currentPeriodEnd : addMonths ( now , 1 ) }) . onConflictDoNothing (); sub = ( await exec . query . subscriptions . findFirst ({ where : eq ( subscriptions . userId , userId ) })) ! ; } if ( sub . currentPeriodEnd <= now ) { let start = sub . currentPeriodStart ; let end = sub .…