Git Product home page Git Product logo

financial-analyzer's People

Contributors

shaninalex avatar

Watchers

 avatar

financial-analyzer's Issues

Replace highchart

Replace to something else that just wokrs without console errors:

Warning: /home/alex/projects/financial-analyzer/frontend/node_modules/angular-highcharts/fesm2022/angular-highcharts.mjs depends on 'highcharts'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /home/alex/projects/financial-analyzer/frontend/node_modules/angular-highcharts/fesm2022/angular-highcharts.mjs depends on 'highcharts/highcharts-gantt'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /home/alex/projects/financial-analyzer/frontend/node_modules/angular-highcharts/fesm2022/angular-highcharts.mjs depends on 'highcharts/highmaps'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: /home/alex/projects/financial-analyzer/frontend/node_modules/angular-highcharts/fesm2022/angular-highcharts.mjs depends on 'highcharts/highstock'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Also it should be something much simpler. In this project we need render only line charts.

report creation flow

Creating report has multiple stages and we can't just increment user report count just by 1 request. The stages are:

  • check if user able to request report
  • collect data from api's
  • calculate custom values
  • show data on frontend
    For example if for some reason we do not deliver requested data ( or some part of it ) - it should not be count as complete report and reports count should not be incremented.

So only if we deliver to client ALL requested data - we can increment user report count.

We can use "flow" approach like in kratos. Report flow should be initialized when user submit "ticker" form. Next this flow will be updated by report id on every step. The flow can be like this:

  • initialize report
  • get data from providerA.dataPart1 => save in redis
  • get data from providerA.dataPart2 => save in redis
  • get data from providerB.dataPart1 => save in redis
  • get data from providerB.dataPart2 => save in redis
  • ---- // ----
  • calculate custom values => save in redis
  • ensure frontend receive all data
  • report is done

add demo data

To not distarb real API. Also:

  • data can be corrupted
  • API can not response
  • Can be slow.

Frontend login

I want to try remove kratos-selfservice-ui-node service from infrastructure since it does not following main design and templates are not very customizeble. First step is to create login page.

unpack alphavantage time series data

This request return this kind of values:

{
    "Meta Data": {
        "1. Information": "Monthly Prices (open, high, low, close) and Volumes",
        "2. Symbol": "IBM",
        "3. Last Refreshed": "2023-06-07",
        "4. Time Zone": "US/Eastern"
    },
    "Monthly Time Series": {
        "2023-06-07": {
            "1. open": "128.4400",
            "2. high": "134.4400",
            "3. low": "127.7800",
            "4. close": "134.3800",
            "5. volume": "22575373"
        },
        "2023-05-31": {
            "1. open": "126.3500",
            "2. high": "130.0699",
            "3. low": "120.5500",
            "4. close": "128.5900",
            "5. volume": "95710890"
        }
}

Which is difficult to transform into golang structure.

This is required here: https://github.com/shaninalex/financial-analyzer/blob/4-define-datasources/internal/datasource/service_alphavantage.go#L103

PDF Report

User can return to report and can ask to generate pdf version. Steps:

  • initialize generating pdf
  • complete generating report and save it into file
  • save file into file storage and generate static link
  • notify user with generated report

NOTE: Link sharing and advanced permissions will be in the next milestones.

ory keto for user saved reports

when user create report - by default it is accessable only for owner. But user can share it for some one by email or make it accessable for all with the link. To do this I plan to use Ory Keto

Declare all queues and exchanges

The idea behind this task is to move all declaration code from services into separate script ( simular to kratos migration container ).

router

Manager service is basically requests router. Because it should parse requests from frontend and "understand" which service responsible for particular request.

Also router should store users WS connections to be able to receive messages from "notification" service and send it to particular user. Or broadcast it to all users.

To reseach: if we have tons of user connections, how we manage them all? How we can actualy store them and get it not only from application memory, but from some kind of connections storage?

demo mode

Ability to test without real api calls to datasources

verification form handle different states

Success state:

{
    "id": "e85b3eff-0144-4cdc-916c-9d9d097ff226",
    "type": "browser",
    "expires_at": "2023-11-18T19:41:26.266705Z",
    "issued_at": "2023-11-18T18:41:26.266705Z",
    "request_url": "http://kratos:4433/self-service/registration/browser?return_to=",
    "active": "code",
    "ui": {
        "action": "http://127.0.0.1:4200/app",
        "method": "GET",
        "nodes": [
            {
                "type": "input",
                "group": "default",
                "attributes": {
                    "name": "csrf_token",
                    "type": "hidden",
                    "value": "Rc3RFKyWSQC/o46f+XHZui7J1eBFOnIaFcSCKLZbEWTWEr+K2pnObFa8C/hsI4/mWrG/wC3BR7jolww4QPcmaw==",
                    "required": true,
                    "disabled": false,
                    "node_type": "input"
                },
                "messages": [],
                "meta": {}
            },
            {
                "type": "a",
                "group": "code",
                "attributes": {
                    "href": "http://127.0.0.1:4200/app",
                    "title": {
                        "id": 1070009,
                        "text": "Continue",
                        "type": "info"
                    },
                    "id": "continue",
                    "node_type": "a"
                },
                "messages": [],
                "meta": {
                    "label": {
                        "id": 1070009,
                        "text": "Continue",
                        "type": "info"
                    }
                }
            }
        ],
        "messages": [
            {
                "id": 1080002,
                "text": "You successfully verified your email address.",
                "type": "success"
            }
        ]
    },
    "state": "passed_challenge"
}

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.