Mohsens22 / mobile-training-todo

ToDo List app built with Couchbase Mobile -

Home Page:http://developer.couchbase.com/documentation/mobile/current/training/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started

To run the app, open the folder for the platform of your choice (android, dotnet or ios) and follow the instructions in the respective README.

Starting Sync Gateway

  1. Download Sync Gateway.

  2. Start Sync Gateway with the configuration file in the root of this project.

    ~/Downloads/couchbase-sync-gateway/bin/sync_gateway sync-gateway-config.json
  3. Add lists and tasks and they should be visible on the Sync Gateway Admin UI on http://localhost:4985/_admin/.

Moderators

The configuration file creates a few users by default. Users with the moderator role can:

  • Update/delete any user's list.
  • Have access to all the lists in the system.
  • Can invite any number of users to a list.

The role created in Sync Gateway enforces security in the Sync Function. Couchbase Lite on the other hand can't tell if the user is a moderator. For that reason, the app uses another document of type "moderator" to detect the user's status and permissions. The "moderator" document can be created through the Admin REST API with the following.

curl -X POST 'http://localhost:4985/todo/' \
      -H 'Content-Type: application/json' \
      -d '{"_id": "moderator.mod", "type": "moderator", "username": "mod"}'

About

ToDo List app built with Couchbase Mobile -

http://developer.couchbase.com/documentation/mobile/current/training/index.html


Languages

Language:C# 41.9%Language:JavaScript 30.2%Language:Java 13.3%Language:Swift 12.4%Language:Shell 1.0%Language:Objective-C 0.9%Language:Python 0.3%Language:Ruby 0.2%