Giter Site home page Giter Site logo

xebia-functional / nine-cards-v2 Goto Github PK

View Code? Open in Web Editor NEW
181.0 36.0 20.0 51.63 MB

An Open Source Android Launcher built with Scala on Android

Home Page: http://www.9cards.io/

License: Other

Scala 94.26% Java 5.14% Shell 0.01% CSS 0.15% HTML 0.44%
scala android functional-programming launcher monix cats

nine-cards-v2's People

Contributors

anamariamv avatar diesalbla avatar dominv avatar franciscodr avatar hugocf avatar israelperezglez avatar jorgegalindocruces avatar juanpedromoreno avatar maureenelsberry avatar noelmarkham avatar pedrovgs avatar raulraja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nine-cards-v2's Issues

Generate endpoint to create shared collection

We have to create a Spray endpoint that allow to the 9Cards user publish and share a collection with other users. The url of the endpoint should be POST /collections.

The request should contain the info about the collection that the user wants to share.

The response should be:

  • 401 HTTP status code if Google Play authentication is not provided in the headers of the request
  • 400 HTTP status code if the author field is missing
  • 400 HTTP status code if the JSON is malformed
  • 200 HTTP status code with the info of the new shared collection created if the process finished successfully

Create generic persistence class

We need to create a generic persistence class so that the interpreters which do persistence operations can delegate the task in this class.

To do that, we should use doobie, a pure functional JDBC layer for Scala.

Create Processes and Services to get basic profile info in Google Plus

Using scope https://www.googleapis.com/auth/plus.login we can access to basic profile information in Google Plus like:

  • User's full name
  • Profile picture
  • Google+ profile ID
  • Age range
  • Language

We need a new service called PlusLoginServices where we can get basic profile info and a new process called UserProfileProcess where return the information using PlusLoginServices

More info about scopes for use with Google Play services here

Write endpoint to get the list of shared collections published by the user

We have to create a Spray endpoint that returns the public collections of a user. The url of the endpoint should be GET /collections .

The request body doesn't contain any info.

The response should be:

401 HTTP status code if Google Play authentication is not provided in the headers of the request
200 HTTP status code with the info of the shared collections that belong to the user specified in the request headers.

Implement Get Shared Collection by Id process

Once defined the process to get a shared collection by id based on free monads, we should indicate the way to run it by means of the interpreters of the algebras involved in the process.

Reorder cards in collection

The user should be able to sort the cards from Edit Collection screen. We have to implement a drag and swipe of cards in order to sort the cards

The information should be stored in database automatically

This article can help us for this ticket

Create Processes and Services to connect with Google Drive

We should create a new Service called GoogleDriveServces where we can store and download files in Google Drive. Also, we need to create a new Process called SyncProcess where we can store the content of case classes or images, and listing and getting information from different kind of data (for example: user config, wallpapers, etc)

This service and process will be inside app module because because it's necessary Google Services Library. For this ticket is not necessary to ask Google Drive permission in wizard

Implement new concept of header in App Drawer

The new concept of header in App Drawer has several behaviours:

  • Groups for apps and contacts: every tab has a way to grouping apps or contacts. For example, in alphabetical tab the apps or contacts are hightlihgt by his first char. When you change an other groups, the apps or contacts are hightlihgt
  • Search box show selected group: in the left side of search box appears the mark of group. For example in alphabetical tab appears a char and en category tab appear a icon of category

The next image shows the new concept

Check requests and responses in Installations using API V2

We have to verify to all calls to API V2 works fine for User Installations.

These calls are:

POST /installations
PUT /installations/{installationId}

We use these calls in the wizard of application when we select a user configured in cell phone for registering the user in 9Cards and when we receive a new device token from push notification service

Implement Wizard for create shared collection

From menu in the detail of collections the user can click in Make Public and will start a wizard with 3 screens asking information about the collection that you want to share. The information is related to name, category, icon, so on.

When your collection have been published, you can the share link to other users from the last screen

Notes: We should consider to use the new EditText Floating Labels in Android Support Library called TextInputLayout

Implement register user process

Once defined the process to register a new user on NineCards based on free monads, we should indicate the way to run it by means of the interpreters of the algebras involved in the process.

Create a specific view for devices info and sync current device

Account tab in Profile Screen contains the differents devices that you have connected with your current Google Account. This screen contains a list of all devices connected and the last time that you synced the current device. If you click in this your device, you'll sync again your device in this moment

Implement fetch user process

Once defined the process to fetch an existing NineCards user based on free monads, we should indicate the way to run it by means of the interpreters of the algebras involved in the process.

Implement update device process

Once defined the process to update an existing device that belongs to a specific NineCards account based on free monads, we should indicate the way to run it by means of the interpreters of the algebras involved in the process.

Create Get Shared Collections by User process

The process should define all the tasks required to get all the shared collections that belong to a specific user.

As part of this job, we should add the necessary methods to the algebras that define the application and, combine them in the processes layer, keeping in mind the business logic.

Edit name, icon and color of collection

When the user drop collection in edit action we can change the icon and color using IconDialogFragment and ColorDialogFragment respectively

From the EditText we can change the name of collection

The information should be stored in database automatically

Implement filter apps from search box

We should use getIterableAppsByKeyWord in DeviceProcess to show only the apps that you are looking for in search box

The FastScroller must be disabled while the user is searching

SPIKE - Migration of shared collections info from v1 to v2

We should define a strategy to migrate all the info about the shared collections from NineCards v1 to v2. We should keep in mind that the info about shared collections is stored in a MongoDB database in the v1, while we'll use PostgreSQL to persist data in v2.

Create new screen for edit collection info

There are 2 ways to reach to edit a collection:

  1. From menu in collection detail: You can click in Edit item in menu
  2. Long press on card in collection detail: you go to Edit Collection screen with the card selected

In this ticket we don't have to implement the actions, only should create a new activity with the diferent areas:

  1. Toolbar: here will appear the different actions that you can do over the selected content
  2. Name of collection: a EditText where we ca change the name of collection
  3. Cards: list of card of the current collection

In this ticket we should create the structure of screen

Generate endpoint to subscribe to a existing shared collection

We have to create a Spray endpoint that allow to subscribe to a share a collection. The url of the endpoint should be PUT /collections/{sharedCollectionId}/subscribe .

The request body doesn't contain any info.

The response should be:

401 HTTP status code if Google Play authentication is not provided in the headers of the request
404 HTTP status code if the shared collection is not found
200 HTTP status code with the info of the shared collection if the process finished successfully

Synchronizing collections automatically when the user changes information

We should be able to sync the collections to Google Drive when the user adds, edits or removes collections in his cell phone.

We have to create an observer in database, when Collection or Card table are changed, we have to launch a background service for collections are syncronized

To improve this background service, we have to fire the service 10 minutes after changes using AlarmManager in Android

Generate endpoint to get a shared collection by id

We have to create a Spray endpoint that returns a existing shared collection by id. The url of the endpoint should be GET /sharedcollections/{sharedCollectionId} .

The request body doesn't contain any info.

The response should be:

401 HTTP status code if Google Play authentication is not provided in the headers of the request
404 HTTP status code if the shared collection is not found.
200 HTTP status code with the info of the shared collection.

Generate endpoint to unsubscribe from a shared collection

We have to create a Spray endpoint that allow to unsubscribe from a share a collection. The url of the endpoint should be DELETE /collections/{sharedCollectionId}/subscribe.

The request body doesn't contain any info.

The response should be:

401 HTTP status code if Google Play authentication is not provided in the headers of the request
404 HTTP status code if the shared collection is not found
200 HTTP status code if the process finished successfully

Implement create installation process

Once defined the process to create a new installation for a NineCards user based on free monads, we should indicate the way to run it by means of the interpreters of the algebras involved in the process.

Use new PullToTabsView to sort apps

Apps list in App Drawer have 3 tabs: Alphabetic, By Category and By Date.

We have to sort the apps using the new PullToTabsView. The FastScrollerView must to show content only in Alphabetic mode and disable fast scroll in other modes

Implement filter contacts from search box

We should use getIterableContactsByKeyWord in DeviceProcess to show only the contacts that you are looking for in search box

The FastScroller must be disabled while the user is searching

Animation for adding new collection to workspace

We should create an animation for adding new collection from New Collection, My Collections and Public Collections dialog. The choreography will be:

  1. Unreveal dialog
  2. Close menu of collections
  3. Move to last workspace if it's necessary
  4. Scale animation for appear the new collection

Change in the layers of processes and services to adapt them to the new endpoints

In API V2 we have new ways to categorize applications and prioritize applications according to their importance.

The new endpoints are:

POST /apps/categorize
POST /apps/prioritize

We have to do the necessary changes in API and Service module to create the new calls and generate tests

In the other hand, we have to use the new methods in services layer for categorizing the applications in process module when it's necessary. Also, when we create a new collection for the new configuration, we have to sort the applications using the new Prioritize Endpoint, so the user will have the better applications in their collections

Implement Get Shared Collections by User process

Once defined the process to get the shared collections of a user based on free monads, we should indicate the way to run it by means of the interpreters of the algebras involved in the process.

Generate endpoint to get a shared collections by category

We have to create a Spray endpoint that returns a list of existing shared collection by category. The url of the endpoint should be GET /sharedcollections/{top/latest}/{category}.

The request body doesn't contain any info.

The keywords top and latest indicates if the shared collections have to be ordered by the number of installations and views or by date of publishing
The response should be:

401 HTTP status code if Google Play authentication is not provided in the headers of the request
200 HTTP status code with a list of shared collection info.

Implement Create Shared Collection Process

Once defined the process to share a collection based on free monads, we should indicate the way to run it by means of the interpreters of the algebras involved in the process.

Create Subscribe/Unsubscribe Shared Collection Process

The process should define all the tasks required to allow a user to subscribe or unsubscribe to a existing shared collection.

As part of this job, we should add the necessary methods to the algebras that define the application and, combine them in the processes layer, keeping in mind the business logic.

Create animation for every step

According to research in 162 issue, we have to create every animation for the every step of wizard

The animation guide is in the next image

REFACTOR: Consistent renaming imports

We have the same names in a lot of case classes in differents layers. For resolver this problem we use rename imports in every layer for conversions

We should use the same way to naming the alias in all imports.

This ticket has 2 works:

  • Create a new page in wiki with the way to naming alias
  • Refactor all alias in every layer using the new convention

Load previous 9Cards configurations using Google Drive in Wizard

During the wizard, when the user selects his account, we have to show the previous devices that the user synced in Google Drive. If the user selects a device loaded previously, we have to store the information in the local database

We have to consider for a time we must load devices from 9Cards Backend 1.0

If the user doesn't have devices in Google Drive, we should look for previous devices in 9Cards Backend 1.0 and copy all configurations in his Google Drive.

Implement multi-select cards and actions

When you start to select several cards the apparience of Toolbar will be changed with the new actions for these cards. The actions are:

  1. Move to other collection
  2. Delete cards

The main action of Toolbar will change too with the number of the cards selected and you can clear clicking of them.

When you click in a card will be selected/unselected. When there are no selected cards, the Toolbar will change to the default toolbar

Create Get Shared Collection by Id process

The process should define all the tasks required to get a shared collection by id.

As part of this job, we should add the necessary methods to the algebras that define the application and, combine them in the processes layer, keeping in mind the business logic.

Implement update user process

Once defined the process to update an existing NineCards user based on free monads, we should indicate the way to run it by means of the interpreters of the algebras involved in the process.

Create Shared Collection Process

The process should define all the required tasks to be able to publish a collection and so, other users can use it.

As part of this job, we should add the necessary methods to the algebras that define the application and, combine them in the processes layer, keeping in mind the business logic.

Use new PullToTabsView to sort contacts

Contacts list in App Drawer have 3 tabs: Alphabetic, Favorites and Last Calls

We have to sort the apps using the new PullToTabsView. The FastScrollerView must to show content related to used tab. In this ticket we have to create a new adapter for Last Calls list

Check requests and responses in Register Users using API V2

We have to verify to all calls to API V2 works fine for Register Users.

These calls are:

POST /users
GET /users/{userId}

We use these calls in the wizard of application when we select a user configured in cell phone for register the user in 9Cards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.