You can have a professional saas service running on streamlit. Believe me
My streamlit stack
standard st.Page architecture
standard streamlit components : mostly containers
some little html code embedded for some custom buttons rendering
My full saas stack
streamlit for frontEnd (separated from backend)
python for BackEnd
stripe for payments
mongoDB for users connexion and usage database
mailJet for email services
no genAI
Statcounter for usage metrics
The product is raizuum
A resume booster for data experts
It has been live with 99.9% availability and more than 950 users have registered and used it to scan their resume,
Just tried it, nice work!
I’d only suggest streamlining the login process. Once logged in, a user should be automatically redirected to Boost with the login page hidden or disabled
Have you seen any performance hit if the same button is clicked by multiple users at the same time? Are you using RQ and Redis?
Do you have any st.forms in your code? Does it affects the performance?
How do you manage sign in with users and their payments? I’m struggling with storing users credentials to login, remembering usernames and seeing if they are subscribed/active via stripe. There’s a disconnect between logins and stripe so each time member logs in it thinks they didn’t sun ribs to the service yet. Very frustrating.
When a user creates an account, at that stage, create a customer via stripe API and store together with the user’s account credentials.
import stripe
## example code
user_registration_credentials = {"email":"email@example.com", "password":"password", "user_name":"username here", "customer_sub":False, "customer_id":None}
stripe.api_key = 'your-stripe-api-key-here'
payment_customer = stripe.Customer.create(email=user_registration_credentials['email'])
payment_user_id = payment_customer["id"]
user_registration_credentials["customer_id"] = payment_user_id
## store to database
db = database_to_store_user_cred ## I use the firebase user custom claims to store customer_id as part of user object. In this case it will store user_registration_credentials dictionary.
We say customer_sub as False because they just made an account so they are obviously not subscribed.
We can then use this customer_id key to check stripe for subscribed status of user like this.
import stripe
stripe.api_key = 'your-stripe-api-key-here'
customer_id_ = get_db_for_user()["customer_id"] ## function where you get stored user credentials object from database.
simple_product_key = ## the stored product key you made in stripe for user to make purchases.
try:
subscription = stripe.Subscription.list(customer=customer_id_, price=simple_product_key).data[0]
sub_status = {"subscribed": subscription["status"] == "active"}
except IndexError:
sub_status = {"subscribed": False}
if sub_status["subscribed"]:
#give user access
else:
#redirect to free aspect of app or restrict access to certain content.
We can do this because stripe keeps track of the user’s subscription status. So when they click the url to access the subscription page and finalise the payment, stripe updates this automatically. If they do not make a purchase, stripe will be aware. You just have to call it via its api.
Great job. I’m in the process of deploying a apps for around 100 user and I’m wonder what is the VM capability (like ram and CPU) you have chosen for your apps ?
Hi Laurent
Good question
I have chosen the smallest payed option on Render as I don t usually have more than 3 connected users at the same time
2 CPU and 8Gb of RAM
Is there any chance your code for this project is available? I know that you discussed your stack above, but I am curious to see you wired this together. Containerized? MongoDB Atlas? Any recommendations on the signup/login flow on how you achieved that successfully and securely?
I tested your work and it feels great. But i have some issues with the login session. After every browser refresh, it logs me out. And is it possible to add a history section/page, so that I can access the analysed results after refreshing or relogin. Overall, it is a good work that amazed me where u push streamlit into production
Great feedback Yi !
The history session is in the dev roadmap, and could definitely be added,
For login persistance after browser update, I surely need to optimise the st.cache.
Any other technical clue ?
I can t remember getting customer complains if a button is hit by multiple customers at the same time
And based on visitors stat, it is pretty rare I have multiple connected users at the exact same time
Yes, absolutely! What you put together is an inspiration to take several ideas I have had floating around in my head and make them available to see if there is any interest/revenue potential.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.