- This is a Hypergro.ai Assignment.
- It is an example stock data collector and explorer (practically speaking)
- Web App: https://hypergroai.netlify.app
- APIs: https://hypergroaiassignment-production.up.railway.app
- 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.
- Pagination is available, at
- 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.
- Check the Postman collection here
-
Backend Setup
- CD into app (server)
cd app
- Create ENV file
cp sample.env .env
- Setup mongodbDB and Redis instance (Docker needed)
docker-compose -f ../config/compose.yml up -d
note: You can use other ways too if required.
- Setup Google Oauth Client and get credentials, refer to here
- Setup Google Cloud Service Account and give Cloud Storage Admin access, refer to here
- Add the json key of the service account into the env after converting it into string, and replace
\n
with%n%
. - Run server
go run main
-
Frontend Setup (optional)
- CD into client
cd client
- Install packages
yarn
or
npm i
- Create the "ENV" file.
cp sample.env .env
- Run the server
yarn dev
or
npm run dev