After maybe 25 hours of learning I have finally decided to start building my first application on bubble. I am sure I will make hundreds of mistakes and I am sure i am going to learn hundreds of things at the same time. But I wanted to start with as little mistakes as possible.
I am building a feedback tool powered by AI. You upload a transcript and it gets analyzed by openai, and generates a report (somehow, haven’t figured this part out yet) with feedback on how to improve your speech, which you can download. You can either buy a monthly subscription of 10 credits or purchase a single credit and every report costs you 1 credit that gets deducted from your account.
I thought deeply of what i need and created an initial design for the database structure that would be the first step of my journey, what would you add/ or change from this design. I want to make something simple first to learn as much as possible, please destroy my design if necessary i wont be offended on the contrary i will be very grateful.
You need a separate Billing Account data type. Each user has a Billing Account. The Billing account stores a customer ID, Subscription, Credit balance, subscription ID. Else, how will your existing structure support enterprise accounts in future, for example? Build it out now to save trouble down the road. You’ll also want a scheduledRenewalWorkflow text field to store the ID of the scheduled API workflow.
Your Subscription plan data type should be called Subscription. These are the plans you have available. It should have the plan name, the number of credits per month, probably its cost, its stripe product ID, the stripe price ID(s)s.