In my opinion, anyone can use couchDB directly with your frontend without having to design intermediate backend service. I would like to highlight the things you need to do at least. I am not an expert though, and one should give it a second thought too.
- Create user in couchdb for every user of the application with desired role.
- Of course, you should only add this user to database as a member so that they won't be able to modify design documents which will contain the validation data.
- In my scenario, I want a user to access only his/her own document only. For which, we have validation documents so that I can check whether user's document in built-in _users database has the documentId s/he is authorized for. If so, he can write to the document or modify it. And of course, he can only modify the existing one which I can verify by comparing the _id of the document which must be same as before.
So, I guess, if a user can only read and write to his own document, it is safe. However, either you will have to create such users in database yourself or a secure API which will use an admin password to modify design documents and add to _users database. Another idea would be to create a admin dashboard to accept a user creation request. You can of course create an admin user for yourself, and whenever someone creates an account, you will simply click Allow to do some changes in _users databases with your created admin user in couchDB.