In my last commercial project I used raw sql in the javascript code in a safe controlled way. I described it here: https://medium.com/@unodgs/sql-on-the-frontend-react-postgre... Very refreshing experience. I'll add summary post when my project is done.