Background — TL;DR
I have business use cases around license keys for my macOS app so I went with Paddle who has both license keys + payments, for no reason, they’ve suspended my account. Literally, the next step I had taken was to build my own(not a fun thing to do because it is like reinventing the wheel) using Supabase.
This is the app where I am using the License key use-cases: https://zenmode.carrd.co/
- License generation
- License activation
- License de-activation
- License verification
- License re-activation
- License revocation
- Basically generate unique license keys, so I simply went with UUID and in Supabase you can find the property.
- Since this is a macOS app, validate the license key with user details + some magic to ensure the license is activated for the first time user.
- If a user wants to deactivate the license temporarily or switching to a new device then user has to deactivate the license key first before activating to a new device.
- Basically X number of times per week the backend validates with frontend whether the license key is valid or not.
- When a user needs to use the app on their new device, they have to unregister first on their old device and re-activate on new device.
- For any bad reason, revoke the license
- Table to maintain user information
- Table to maintain user license information and activities
- Translated each business use-case as function or functions, behind the scenes Supabase converts each function as an API.
- I’ve pretty much created all the APIs using procedural functions which is just like writing sql queries.
- All functions are automagically converted to APIs
- There is more error prone using procedural functions than writing down in server less functions(hoping supabase launches as soon as they can)
- Because supabase functions are still wip, I can’t integrate with email services to send license keys so I had to manually send license keys to the user email.
You can checkout my app here https://zenmode.carrd.co/