Show HN: Userbase – Auth and E2E encrypted storage in a few lines of code
Hi HN,<p>Userbase is a tool for developers to build secure and private apps. We launched 1 year ago [1], and have worked hard to widen its use cases. Userbase offers built-in user accounts and authentication, an end-to-end encrypted zero-management database, file storage, streaming and sharing, and logic to process and manage subscriptions (via Stripe). All Userbase features are accessible through a simple JavaScript SDK, directly from the client. 100% open source, and all platforms are supported (browser, iOS, Android, desktop).<p>Today, Userbase can be used in apps that don’t require end-to-end encryption, for those who like that Userbase can handle authentication, data storage and real-time syncing in a few lines of code.<p>We also completed a security review by an independent team [2], and wrote up a comprehensive specification of our architecture [3].<p>Personally I joined in working on Userbase to store end-to-end encrypted data in a performant way for an accounting app. Under the hood, each write to a Userbase database is an append-only transaction to a log stored in DynamoDB (therefore constant time), which is then pushed to connected clients over a Web Socket. Each client then decrypts and applies this transaction to its local state of the database in memory (real-time syncing is provided out of the box). In this process, the server ensures each client receives transactions in a consistent order, 100% of the time. This is unlike some of the (very awesome) decentralized alternatives that exist today (OrbitDB, GunDB, Scuttlebot), which generally rely on CRDTs to stay in sync, and CRDTs can be pushed in any order. For certain applications, the consistent ordering guarantee a central server provides may be extremely useful (such as in an accounting app), on top of the added reliability and performance.<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22145168" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22145168</a><p>[2] <a href="https:&#x2F;&#x2F;userbase.com&#x2F;announcements&#x2F;#1-security-review" rel="nofollow">https:&#x2F;&#x2F;userbase.com&#x2F;announcements&#x2F;#1-security-review</a><p>[3] <a href="https:&#x2F;&#x2F;github.com&#x2F;smallbets&#x2F;userbase&#x2F;blob&#x2F;master&#x2F;docs&#x2F;userbase_architecture.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;smallbets&#x2F;userbase&#x2F;blob&#x2F;master&#x2F;docs&#x2F;userb...</a>