Can Couchbase use the localstorage API

Hi everyone,
I just started learning about Couchbase (and more generally, about PWAs and mobile local storage), so I hope that my question hasn’t been answered elsewhere and that its answer is not too obvious.

My question is, can Couchbase use the localstorage API?
More background information: I am trying to make an os and devices agnostic application using Ionic and Stenciljs. I have no specific application in mind, however, I want it to be able to use a local database (such as with Couchbase Mobile) in order to sync data from multiple users and between multiple devices.
I would like the user to be able to choose between using a PWA application through a web browser, or a native version of the same application.
The problem is that I am not sure if Couchbase could be used in a PWA application using the localstorage API or if it can only be used in a native Android/iOS one as an installed application.
In the best world, I would have a unique source code that would allow porting to any kind of devices/os.

I have checked all around and while there are some answers that seems to fit my question (such as this one: Couchbase Lite from desktop browser (REST API)), I am still confused.

As I can’t find a similar question anywhere, I feel like the answer is obvious and there is something I miss.
Thanks in advance.

You cannot use Couchbase Lite within a browser app. Depending on what you need, here are a few options if you want to use your browser based app with Couchbase Mobile.

Here are a few other hybrid javascript development options for couchbase lite

Sorry for the late answer @priya.rajagopal and thank you for the links.

I have learned quite a lot during the last week but I am not sure that I understood everything. I summarise what I have learned here and would appreciate it a lot if you could correct me if you see any error.

I decided to go with a PWA application only. My supposition is that it would still be considered as a browser app, wouldn’t it?
In that case it would mean that I couldn’t use Couchbase Lite, but I could could use Couchbase Mobile. My understanding is that Couchbase Mobile was the new name for Couchbase Lite, which wasn’t in use anymore.

Reading from Couchbase Mobile page, I see that Couchbase Mobile also works with native applications, even desktop ones. I suppose that depends on what language you use and what kind of project you are making.

So making a PWA that would work on pretty much any device/os using Couchbase Server (server) + Sync Gateway (middle) + Couchbase Mobile (client) would be possible.

I know I repeat a lot of what was in the links you sent me, I just want to make sure that I understand correctly before investing hours in learning how to make everything work together.

Thanks again and have a good day.

Couchbase Mobile is not a new name for Couchbase Lite.

To clarify terminology, Couchbase Mobile platform is comprised of Couchbase Lite as local embedded storage, Sync Gateway for sync and of course Couchbase Server for backend store. So Couchbase Lite is a part of Couchbase Mobile.

So the response to your question is that you cannot use Couchbase Lite for PWA apps because it is not a JS database. You can use one of the options that I shared earlier for local storage support and interface with REST endpoint exposed by Sync Gateway.

I see that Couchbase Mobile also works with native applications, even desktop ones. I suppose that depends on what language you use and what kind of project you are making.

You can use * Couchbase Lite* within your native , desktop and cross platform apps - for the platforms specified in the links shared earlier.

Wow, was I off!

Your answer clarified things a lot.

I found that module on NPM which would seem to cover my needs. I still have a lot of things to read, but I now have a clearer idea of the next steps.

I will note your answer as a solution, thank you again for your help, and have a good day!