Tracking Quota w/ Convex
Hello. I'm implementing feature limits inside my SaaS. Attached image for reference.
@convex-dev/rate-limiter
looks promising, however I can't display the remaining quota to the user - is there a solution for this?
2 Replies
Im pretty sure this is possible. I havent done enough with the rate limiter yet to know for sure tho. @ian should be able to help you tho.
There's a new
useRateLimit
hook that returns the value at a given timestamp - https://www.convex.dev/components/rate-limiter#using-the-react-hookConvex
Rate Limiter
Define and use application-layer rate limits. Type-safe, transactional, fair, safe, and configurable sharding to scale.