I have a bit of conceptual question regarding the structure of users and their documents.
Is it a good practice to give each user within CouchDB their own databa
It’s rather common scenario to create CouchDB bucket (DB) for each user. Although there are some drawbacks:
_info
requests to avoid user list leak (or you must name buckets using hashes).Per-doc read ACL can be implemented using _list
functions, but this approach has some drawbacks and it also requires a proxy, at least a web-server, in front of CouchDB. See CouchDb read authentication using lists for more details.
Also you can try to play with CoverCouch which implements a full per-doc read ACL, keeping original CouchDB API untouched, but it’s in very early beta.