My saas is 100% streamlit and it survived 1000 connected users and 4months without a service fail

Go build your microSaas idea
You can go in production with streamlit :rocket:
Really !

No js no react no java
Nothing else than python and API

https://raizuum.onrender.com/

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,

Check yourself here : https://raizuum.onrender.com/

Any tech questions, let me know!

15 Likes

love it <3 nicely done

2 Likes

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

Tha nks for support !

That s clever
Added to backlog
Many thanks for your support

1 Like

Awesome work :+1: ! I wonder how you customized your domain ahah ?

1 Like

Thanks for the support,
I deployed the app with RENDER,
it is very similar to streamlit cloud with these differences:

  • you can deploy a private repository from github
  • you can manage your VM (and pay for more memory and CPU)
  • you have no downtime if nobody comes visiting your site
  • there is a free version and a payed version
  • you can link to your domain name (I did not)

(note: I dont have any relationship with Render team)

4 Likes

congrats! Interesting to know that streamlite can be used for commercial purpose !!!

1 Like

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?

1 Like

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.

This is a common dilemna but very solvable.

  1. 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.

  1. 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.

Very simple.

1 Like

Thanks for the question
I have used a simple strategy

  1. A mongoDB database with a users table
  2. In user table, a User object has attributes like login, hashed password, and payed
  3. MongoDB API puts the user if he does not exist
  4. If user pays, i have coded a routine to pass the user as payed = True or do nothing if it is not the 1dt payment
  5. On raizuum, user buy credits, so I have a routine to compute remaining credits as a function of the number of past use and the number of past payments

Everything built from scratch to make it fit to my need

Hello !

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 ?

1 Like

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

1 Like

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?

:tophat: tip

1 Like

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

1 Like

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

No redis
No st.form

Very good question
I am planning to make a boiler plate code for microsaas with python and streamlit
Q1 2025
Any interest?

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.