Giter VIP home page Giter VIP logo

personal_bot's People

Contributors

geraldzm avatar juanvf avatar

Watchers

 avatar

personal_bot's Issues

Feature: New endpoint for generating the payments.

Dependencies:

Context:

An user or an external trigger must be able to request a new payment endpoint in order to generate its latest payments that comes from its personal email. The user can expect the data that comes from its personal email will be saved in the Payments Table in database.

What is expected to have:

  • A new endpoint /payments/generate with POST method. This method must be protected using the Verify Token Middleware in the apigw/auth file. Also will receive the ID Token from Google OAuth, you can assume this ID Token is in JWT format and if you decode it and verify it, you can get the user email.
{
    "id_token" : "<Google ID Token>"
}
  • A new payment service for this feature, where you at least: decode de ID Token and get the user email, get the user id using that email, get the last thread id readed by the bot, and read the latest emails from the user mail and then process then, so you get a [ ]*Payment type for each new payment, all of them marked as unprocessed.
  • You will use the Open AI service to classify and get the tags for each service. Now this AI will return tags that might not be in DB, is up to you to decide whether to store this new tags and find a way to not repeat them, or change the tags structure. Also, the structure for the prompt is the follow:
payment: <the email data>\ntags:

Then GPT-3 will return the tags possibly, because is an AI, in the next format

tag1, tag2, ..., tagN\n
  • The processed emails to be stored in the DB Payments Table.
  • The endpoint will return an empty body with 200 OK Http Status.

Nice to have:

  • As you can see the service does many request, so the endpoint will be slow. That is an expected behaviour and is OK since this endpoint will be executed once a day, but if you find other workaround to make it faster, that can be discussed.

Feature: Implement the currencies data source.

Spikes for this issue:

Given the implementation flow proposed in the spike, the goal of this issue is to implement it to the project.

What is expected to have:

  • A service where we can get the live value of the currencies given the name of the currency that comes from databse.

Feature: New Endpoint for updating the balances.

Context:

An user will have unprocessed payments to be updated in his general balance. An user or an external trigger must be able to request a new balance endpoint and have a current state of its balance.

What is expected to have:

  • A new endpoint balances/update with POST method. This method must be protected using the Verify Token Middleware in the apigw/auth file. Also will receive the ID Token from Google OAuth, you can assume this ID Token is in JWT format and if you decode it and verify it, you can get the user email.
{
    "id_token" : "<Google ID Token>"
}
  • A new balance service, where you query the unprocessed payments, and update the corresponding user balance in DB.
  • You also must update the new payments to be marked as processed.

spike: research currencies data source

The project currently has two currencies to be supported, CRC and USD. We need to find a data source for getting the current value of the currencies.

What is expected to have:

Nice to have:

  • The core goal of the project is to support multiple payments data sources, so it means the user might have different Costa Rican Banks. So a nice to have might be having the different live currency values from the different Costa Rican Banks.

Feature: Add the unprocessed field to the Payments Table.

Context:

All the current payments are stored in DB, but there is no way to know if they were already processed. The idea is to add a new field to the payments table to be able to mark the payments as processed or unprocessed.

What is expected to have:

  • A new field to mark the payment as processed or unprocessed, by default it should be marked as unprocessed.

Nice to have:

  • Doing this might be slow, so, you are allowed to find other way to identify the unprocessed payments or doing it faster.

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.