{"id":45157394,"url":"https://github.com/couchbase-examples/cap-cbl-travel","last_synced_at":"2026-02-20T05:02:34.936Z","repository":{"id":262888700,"uuid":"888677745","full_name":"couchbase-examples/cap-cbl-travel","owner":"couchbase-examples","description":"Ionic Capacitor based React app that uses cbl-ionic and the Travel-Sample bucket dataset with the hotels and landmark collections","archived":false,"fork":false,"pushed_at":"2025-05-06T09:34:57.000Z","size":593,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-06T10:47:38.286Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/couchbase-examples.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-14T20:14:06.000Z","updated_at":"2025-05-06T09:35:01.000Z","dependencies_parsed_at":"2024-11-14T21:23:00.643Z","dependency_job_id":"bb59088f-38b7-4cbc-ba71-4ac70e2ba897","html_url":"https://github.com/couchbase-examples/cap-cbl-travel","commit_stats":null,"previous_names":["couchbase-examples/cap-cbl-travel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/couchbase-examples/cap-cbl-travel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fcap-cbl-travel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fcap-cbl-travel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fcap-cbl-travel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fcap-cbl-travel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/couchbase-examples","download_url":"https://codeload.github.com/couchbase-examples/cap-cbl-travel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/couchbase-examples%2Fcap-cbl-travel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29641929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T03:21:14.183Z","status":"ssl_error","status_checked_at":"2026-02-20T03:18:24.455Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-20T05:02:34.242Z","updated_at":"2026-02-20T05:02:34.930Z","avatar_url":"https://github.com/couchbase-examples.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Couchbase Lite Ionic Capacitor - Travel Sample App 👋\n\n# Overview\n\nThis is an example app of a simple Ionic Capacitor React app that uses the [Couchbase Lite](https://www.couchbase.com/products/lite) database. The app lists a set of Landmarks and Hotels that are provided as part of the [Couchbase Travel-Sample](https://docs.couchbase.com/cloud/get-started/run-first-queries.html) dataset. \n\nThis app assumes you have a Capella Free Tier operational cluster with the travel-sample dataset installed.  To find out more information about the free tier, please visit this blog post [Couchbase Cloud](https://www.couchbase.com/blog/free-tier-capella-dev-available/).\n\n## App Services Setup\nLog into your Capella Free-Tier account.  A listing of Operational Clusters should appear.  Click on your demo-cluster in the listing.  This should bring up the Home page for your cluster.\n\n### Create a new App Service\nOn the Home tab under the `Explore your cluster` section find the section `Try App Services` and click on the link `Deploy App Services`.\n\nOn the main App Services page click the `Create App Service` button.  The Create App Services page should appear.\n\nOn the Create App Services page, give your app service a name.  You can name it anything you like, for example `demo-app-service`.  Under the Linked Cluster section select `demo-cluster` from the pull-down select list.  Finally, you can click the `Create App Service` button.\n\nIt will take between 5 and 25 minutes for your new App Service to be created. \n\n### Creating a new Endpoint\n\nOnce your cluster is created and the status is listed as `Healthy`, click on the newly created App Service name in the list , i.e. `demo-app-service`.\n\nOne the App Endpoints screen, click the `Create App Endpoint` button to create a new Endpoint.\n\nOn the Create App Endpoint page, enter the name `locations` in the App Endpoint Name field.  In the Bucket selection list, select the `travel-sample` bucket.  In the Scope selection list, select the `inventory` scope.\n\nUnder the `Chose collections to link` section, click the `Link` switch for both the `landmark` and `hotel` collections.  This will link those two collections to this App Endpoint allow us to sync data from those collections to our mobile app.  \n\nFinally, click the `Create App Endpoint` button.  The App Endpoints listing page should appear.\n\n### Setup App Endpoint Security\nOn the App Endpoints listing page, click on the newly created endpoint `locations`.  This will bring up the App Endpoint section of Capella App Services. \n\nOn the Security page the Access and Validation screen should appear.  A message on this page states that the App Endpoint is paused.  Click the `Resume app endpoint` link to resume the endpoint.   This may take a few seconds to complete.\n\nWe are going to use the default  Access Control and Data Validation scripts, so click the `App Users` tab from the navigation menu on the left.\n\nOn the App Users page, click the `Create App User` button.  This will bring up the Create App User page.  Enter a username and password for the new user.  For this example, you can use `demo@example.com` for the username and `P@ssw0rd12` for the password which are hard coded in the mobile app code.  \n\nClick the `Configure Access Grants` link to expand the grants section.  Under the `Assign Channels` section locate the `hotel` listing under `LINKED COLLECTIONS`  and add an Admin Channel name of `hotel` and hit the enter key. It should show the name in a chip format.  Now locate the `landmark` listing under `LINKED COLLECTIONS` and add an Admin Channel name of `landmark` and hit the enter key.  It should show the name in a chip format.  This will give the new user access to the `hotel` and `landmark` collections.\nClick the `Create App User` button to create the new user.\n\n### Setup Delta Sync (optional)\nClick on the `Settings` tab on the top navigation menu.  Fom the `App Endpoint Settings` screen click on the `Delta Sync` tab located in the CONFIGURATION menu on the left side of the page.  \n\nClick the `Enable Delta Sync` switch to enable Delta Sync.  Click the `Save` button to save the changes.\n\n### Get the Endpoint URL \n\nClick on the `Connect` tab on the navigation menu in the header of the page.  The Connect page should appear.  The URL for the App Endpoint is listed in the `Public Connection` section.  You will need this URL to connect the mobile app to the App Endpoint.  Click the two sheets of paper (copy) button next to the public connection string in order to copy the URL to your clipboard on your computer.  We can then paste in the URL into the code.\n\n## Pull down the code\nFrom a terminal you can use the git command to pull down the code from the repository:\n\n```bash\ngit clone https://github.com/couchbase-examples/cap-cbl-travel\ncd cap-cbl-travel\n````\n\n## Set up the Mobile App \n\nTo set up the mobile app, first install the npm dependencies from the terminal:\n\n```bash\nnpm install\n```\n\n### Update the configuration\nOpen the `services/database.service.ts` file and locate the `setupReplicator` function.  You will be required to update the `targetUrl` variable with the connection string to your Couchbase App Services Endpoint connection string.  Paste in the value that you copied from the directions above into the `targetUrl` variable string value.  \n\n```typescript \nconst targetUrl = new URLEndpoint('wss://xxxxxx.apps.cloud.couchbase.com:4984/travel-location');\n```\n\n### Running the app\nTo run an Capacitor app, you can use the following command:\n\n```shell\nnpm install\n\nnpm build\n\nnpm cap sync\n```\n\niOS:\n```shell\nionic capacitor run ios --external -l\n```\n\n```shell\nionic capacitor run android -l --external \n```\nIn the output, you'll find options to open the app in a iOS simulator, or Android emulator.\n\nMore Information on developing mobile apps with Capacitor can be found in the links below:\n- [Capacitor Documentation](https://capacitorjs.com/docs)\n- [Android](https://capacitorjs.com/docs/android)\n- [iOS](https://capacitorjs.com/docs/ios)\n\n## Learn more\n\nTo learn more about Couchbase Lite and the Capacitor plugin, look at the following resources:\n- [cbl-ionic documentation](https://cbl-ionic.dev/)\n\nJoin our community of developers \n\n- [Discord community](https://bit.ly/3NbK5vg): Chat with Couchbase developers and ask questions.\n- [Stack Overflow community](https://stackoverflow.com/tags/couchbase/info/): Ask questions.\n- [Developer Portal](https://www.couchbase.com/developer): more information including tutorials and learning paths. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchbase-examples%2Fcap-cbl-travel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcouchbase-examples%2Fcap-cbl-travel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcouchbase-examples%2Fcap-cbl-travel/lists"}