Code Monkey home page Code Monkey logo

hypergroai_assignment's Introduction

Brief

  • This is a Hypergro.ai Assignment.
  • It is an example stock data collector and explorer (practically speaking)

Live

Features

  • API to Add/upload stock data in CSV file format to the server and migrate it into the database
  • API to trigger migration of CSV file in stock data on the server
  • API to get all the migrations logs.
  • Ability to log in/signup with your Google account.
  • API to Query for stocks based on certain options
    • Pagination is available, at /stock?page=<PAGE>&size=<SIZE>
    • Can/Will have to query with date using query params "date", example /stock?date=<DATE>. note: date is here in the format of "DD/MM/YYYY", if there is no data available for your given date, the latest data will be returned as default
    • Can search stock with full name or just with a few starting characters, example /stock?s=<TEXT>
    • Also get top stocks, that is stocks with sort in terms of gain descendingly, at /stock/top. note: this can/will support all the other query parameters.
  • API to add stocks as user favorites, interact with them (read all), or update the user favorites list
  • A ReactJS UI to showcase all of these features and APIs in a great UX. note: the API to upload a stock data CSV file and trigger a migration API can't be triggered with the React UI.

Documentation

  • Check the Postman collection here

Setup

  • Backend Setup

    1. CD into app (server)
        cd app
    
    1. Create ENV file
        cp sample.env .env
    
    1. Setup mongodbDB and Redis instance (Docker needed)
      docker-compose -f ../config/compose.yml up -d
    

    note: You can use other ways too if required.

    1. Setup Google Oauth Client and get credentials, refer to here
    2. Setup Google Cloud Service Account and give Cloud Storage Admin access, refer to here
    3. Add the json key of the service account into the env after converting it into string, and replace \n with %n%.
    4. Run server
        go run main
    
  • Frontend Setup (optional)

    1. CD into client
    cd client
    
    1. Install packages
    yarn
    

    or npm i

    1. Create the "ENV" file.
    cp sample.env .env
    
    1. Run the server
    yarn dev
    

    or npm run dev

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.