GithubHelp home page GithubHelp logo

alexitc / crypto-coin-alerts Goto Github PK

View Code? Open in Web Editor NEW
79.0 9.0 23.0 1.51 MB

An application that let you set alerts for the prices of several cryptocurrencies

License: GNU General Public License v3.0

Scala 73.35% TypeScript 19.18% JavaScript 1.08% HTML 5.57% CSS 0.25% Shell 0.07% TSQL 0.50%
cryptocurrency scala notifications bitcoin ethereum play-framework postgresql anorm bootstrap angular

crypto-coin-alerts's Introduction

Crypto Coin Alerts

Crypto coin alerts is a web application that let you set alerts for the prices of several crypto currencies.

Status

On 2020/Jan/02 The project was taken down, There hasn't been any new development for a year and there is not enough adoption that justifies the costs for keeping it running.

Components

The project is composed of several sub projects, you can navigate to each folder to see the sub project documentation:

  • alerts-server is the RESTful API used by the web application.
  • alerts-ui is the user interface that consumes the RESTful API.

Development

You are more than welcome to improve the project, specificaly the UI.

crypto-coin-alerts's People

Contributors

adobryn avatar alexitc avatar danfoy avatar gitter-badger avatar jacktreble avatar qaemma avatar tg44 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crypto-coin-alerts's Issues

Add the forget password option

There is no way to login if you don't remember the password.

Expected behavior

The users are allowed to reset its password by receiving an email.

Actual behavior

The users are unable to reset its password.

Add support for coinmarketcap

Supporting coinmarketcap would help us to track prices in USD as well as having a wide variety of coins.

There are some things that makes non trivial to integrate it.

Database

Our current currencies table intends to store the currency name representation (like BTC, ETH, etc), sadly, there are collisions in this representation, BTG = Bitgem or Bitcoin Gold.

This new column could be filled with the readable name or the coinmarketcap id, while the id field could be ideal, using the readable name could be more useful for users and we should be able to match it while looking for alerts to trigger.

One approach is to include a new column like currency_name and then, render a currency in the UI using both fields, a big advantage of this approach is that we can avoid possible collisions with other exchanges.

The ideal scenario would be to keep the new column as not nullable but KuCoin is not giving us this field, we could ignore existing data or map the currencies from existing exchanges (when possible) with its name.

Another point is that there is a uniqueness constraint based on market and currency, we'll need it to expand it to include the name, the name could be a CITEXT.

UI

Currently, the UI displays a drop down field to select the currency, coinmarketcap have almost 1500 currencies which could make this flow more awful, it might be good to integrate a component with auto-completion to fill the currency (matching currency or name).

Alerts

  • Include the currency name in the alert messages (when available).
  • Ensure to match alerts by the currency and the name (when available).

Allow links for creating a fixed price alert for a currency pair

After receiving a fixed price alert email, it is not easy to create the same alert with a different price

Expected behavior

On the fixed price alerts email, there is a link for creating another fixed price alert having the same values where we can update the price.

Actual behavior

The fixed price alert email doesn't contain any link to create a similar alert.

Add windows specific steps to test the project

Some user have complained that running the tests is not straightforward on Windows.

Expected behavior

The README.md from the alerts-server project specifies how to run the tests on Windows.

Actual behavior

It is not clear how to run the tests on Windows.

Currency not updated after updates from external services

Currency not updated after updates from external services

Expected behavior

If an external service (like Coinmarketcap) updates the details for a currency, they should be updated in our database.

Actual behavior

The application fails to update the values and it keeps sending alerts about the non-updated currency.

Steps to reproduce the behavior

  1. Seed the database
  2. Choose a currency and update its currency_name
  3. The issue will occur when the currency seeder task run.

One simple way would be to change the insert to upsert.

Integrate scalafmt to format the sources before compiling the project

Integrate scalafmt to format the sources before compiling the project

Expected behavior

The source code is formatted before compiling the project.

Actual behavior

The source code is not formatted before compiling the project,

Please note that this issue asks for the configuration only and no changes to the scala files should be included in the pull request, one way is just to grab this code.

Implement percentage based alerts

We have support for fixed price alerts, which is triggering an alert when a price condition is reached.

This needs the user to give us the price that he is interested in, it is common to compute a percentage manually based on the current price, with this we can get an alert when a currency increased by certain percentage but it is tedious to compute that by ourselves.

In order to simplify this process, we could ask the user to enter a percentage and the price condition and we can compute the fixed price related to the percentage, what is stopping us to add this to the UI is the need to know the current price of the currency.

There are some possible approaches to get the current price:

Call the exchange API from the client

While this has several advantages, like avoiding useless traffic in our server, not all exchanges have Cross-Origin Resource Sharing (CORS) enabled which makes this option harder.

To avoid requiring CORS enabled in the exchanges, we could use nginx the proxy the API calls to the exchanges.

As all exchanges have different API behavior, we would need to implement the logic for every exchange on the client which could be a significant amount of maintenance cost (and code).

Exchange-agnostic API

As we already call the exchanges from our server, we could generate consistent responses for any exchange, this would be the preferred approach which lead us to design a way for retrieving the prices.

Proxy traffic to the exchanges

This is similar to the nginx approach and we could get scaling issues due to rate limits from the exchanges which could be quite bad for us.

Keep the prices in-memory

We could keep the prices in-memory and keep a scheduled job to update the prices frequently, at the moment we keep track of less than 1500 currencies and even adding support for Coinmarketcap would keep the number below 5000, which should not be a problem to store them in-memory.

Using this approach would help us to redesign the tasks sending the alerts to not call the exchanges directly but to use our stored prices, also, we could remove the schedulers for these tasks and use listeners that get notified when the prices are updated, this should avoid us to send repeated requests to the exchanges.

New currencies alert doesn't show the currency name (if available)

New currencies alert doesn't show the currency name (if available)

Expected behavior

While receiving the new currencies, the currency name is displayed (if available).

Actual behavior

The currency name is not being displayed.

Steps to reproduce the behavior

Receive a new currencies alert from COINMARKETCAP, even that the currency name is available, it is not displayed.

The account requirement is not obvious

Improve the UI to make the account requirement more obvious

Expected behavior

Visitors should easily understand that they need to create an account in order to use the application.

A simple idea is to just increase the font size and use a background color where to the new account buttons.

Actual behavior

Based on some feedback from visitors, they said it wasn't obvious that an account was required.

Steps to reproduce the behavior

Go to the main page: https://cryptocoinalerts.net/

Update the logback.xml to log exceptions root cause first

Update the logback.xml to log exceptions root cause first

Expected behavior

When an exception is thrown and it has nested causes, the root cause should be the first displayed exception.

Actual behavior

When an exception is thrown and it has nested causes, the root cause is not the first displayed exception.

Steps to reproduce the behavior

Removing the internet connection and leaving the project running show start displaying exceptions.

Resolve GitHub vulnerability warning related to angular

Resolve github vulnerability warning on the alerts-ui project

Expected behavior

There is no vulnerability warning on the GitHub project page.

Actual behavior

GitHub is displaying a vulnerability warning that seems to be related to the angular build tools.

alerts-ui

Steps to reproduce the behavior

  1. Fork the repository.
  2. Go to the forked repository page.
  3. The warning will be displayed.

Integrate the captcha component with the reactive forms

The captcha component is not integrated with the reactive forms.

Expected behavior

We should be able to keep disabled the submit button on reactive forms is the captcha hasn't been solved.

Actual behavior

The captcha component is not integrated with reactive forms, which implies that it is not considered as a form element, leading to the submit button being clickable even is the captcha hasn't been solved.

Example:
login

As concisely as possible, describe the observed behavior.

Steps to reproduce the behavior

  1. Go to the login page (https://cryptocoinalerts.net/login).
  2. Type a valid email and password.
  3. The login button is enabled while it shouldn't because the captcha isn't solved.Please list all relevant steps to reproduce the observed behavior.

Add support for EOS on HitBTC

EOS market is not supported while HitBTC supports it.

Expected behavior

Our app supports the EOS market on HitBTC.

Actual behavior

While HitBTC supports the EOS market, we don't.

Steps to reproduce the behavior

Just start the application and it will print the following warnings:

2018-09-15 14:43:03,434 [WARN] from com.alexitc.coinalerts.services.external.HitbtcService in application-externalService.dispatcher-33 - Unable to create book from string = [DASHEOS]
2018-09-15 14:43:03,434 [WARN] from com.alexitc.coinalerts.services.external.HitbtcService in application-externalService.dispatcher-33 - Unable to create book from string = [TRXEOS]
2018-09-15 14:43:03,434 [WARN] from com.alexitc.coinalerts.services.external.HitbtcService in application-externalService.dispatcher-33 - Unable to create book from string = [NEOEOS]
2018-09-15 14:43:03,434 [WARN] from com.alexitc.coinalerts.services.external.HitbtcService in application-externalService.dispatcher-33 - Unable to create book from string = [ZECEOS]
2018-09-15 14:43:03,434 [WARN] from com.alexitc.coinalerts.services.external.HitbtcService in application-externalService.dispatcher-33 - Unable to create book from string = [LSKEOS]
2018-09-15 14:43:03,434 [WARN] from com.alexitc.coinalerts.services.external.HitbtcService in application-externalService.dispatcher-33 - Unable to create book from string = [XEMEOS]
2018-09-15 14:43:03,434 [WARN] from com.alexitc.coinalerts.services.external.HitbtcService in application-externalService.dispatcher-33 - Unable to create book from string = [XRPEOS]

Make JsonController reusable on different applications

The JsonController class abstracts some logic to write json APIs in a simpler way, at the moment it is tied to this application, it would be great to make it reusable across applications.

There are some aspects to consider for completing this task:

  • The ApplicationError could probably be a required part to use the JsonController, in this case, the user would be responsible on decorating its error classes with ApplicationError specific sub classes like InputValidationError.
  • JsonController validates the input json, hence, we need the JsonFieldValidationError.
  • We might need to let the user pass a custom JsonErrorRenderer.
  • JsonController is depending on a logger to log internal errors, it might be good to get rid of this and ask the user to implement a custom private error listener / handler.
  • JsonController has a JWT user authenticator, we should let the user handle authentication, it is also depending on the UserId model, the user should be able to use its own model class.
  • JsonController is tied to scalactic Good or Bad results and our ApplicationResult, it would be great to let the user choose between scalactic, scalaz or cats.
  • We might need the user to implement a custom JsonController which specifies all above dependencies.

There might be more things to do in order to make this JsonController generic to more applications.

Align CAPTCHA with the rest of the form

Expected behavior

The reCAPTCHA should be aligned with the form

Actual behavior

The reCAPTCHA is not aligned with the form, as you can see in the image:
unpadded-captcha

Steps to reproduce the behavior

Go to any form requiring a CAPTCHA.

Add spanish support

Currently, the application is prepared for supporting multiple languages while English is the only one being used.

There are some things to do in order to start supporting different languages.

Server side:

  • Add a new API path to update user language, at the moment, we have user preferences stored which contain just the language.
  • Add new translations to the server code.

Client side:

  • Update the UI to let the user switch languages.
  • Update the front-end code to store the language in the local storage.
  • Ensure that all views are using translation texts.
  • Add the translations for the new language.

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.