title: Using FastAPI for socket chat system?
body: <p>How would one implement a comprehensive chat system using sockets within FastAPI. Specifically keeping the following in mind:</p>
  <ul>
  <li>Multiple Chat rooms many-to-many between users</li>
  <li>Storing messages with a SQL or NoSQL database for persistence</li>
  <li>Security: Authentication or possibly encryption</li>
  </ul>
  <p>I've looked at some libraries, but actual useful implementations are far between, regrettably.</p>
  <p>Any advice or redirects towards places for more information will be of great help!</p>