This is a fast written chat app, that is relatively primitive and low on security.
But it's a small example of how it could be done.
Client:
You need parcel or any web pack bundler to run this. 1: npm i -g parcel 2: parcel *.html (inside the client folder)
And in python u need a MongoDB server (atlas or localhosted)
Just do python main.py and see if u'r good to go
Both commands should open port Parcel: 1234 (default unless overridden) Python Fastapi: 3000 (default unless set otherwise in the code)
Enjoy