Compare commits
6 Commits
fbbadd6fbf
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| a5dbf762b6 | |||
| 1ccca077fa | |||
| 5524cabab4 | |||
| d3586f8cab | |||
| 3f73ca3b44 | |||
| 40fb916437 |
@@ -1,3 +1,5 @@
|
||||
# This project is a toy project for training and quality assurance purposes
|
||||
|
||||
# node_task
|
||||
|
||||
1. Clone repo into your github
|
||||
@@ -8,7 +10,7 @@
|
||||
6. Show map widget for airport chosen using latitude and longitude from autocomplete chosen airport. Use this map api https://openlayers.org/doc/quickstart.html
|
||||
7. Create a widget that calculate the distance from artic circle to airport https://stackoverflow.com/questions/27928/calculate-distance-between-two-latitude-longitude-points-haversine-formula
|
||||
|
||||
8. Use bootstrap 4 for ui
|
||||
8. Use tailwindcss for ui
|
||||
|
||||
9. Create db table called analytic (id, create_at, widget_name, browser_type, ). Everytime user clicks on a widget, call api /analytic and send the widget name to log it in the db.
|
||||
|
||||
@@ -16,12 +18,16 @@
|
||||
|
||||
11. Create widget export xml that will export the analytic database as xml file. Create backend route to handle this.
|
||||
|
||||
(b) add route to import the analytic xml file.
|
||||
|
||||
12. Query https://www.reddit.com/r/programming.json and create a reddit widget where we show the top 4 even post as cards in the widget (title, link, who posted it). Create backend route to handle this.
|
||||
|
||||
13. Count # of coin widget. Once user type in a money amount, and click calculate, we show how many bills to add up to the money amount. The bills allowed are: $20 bill, $10 bill, $5 bill, $1 bill, $25 cent, $10 cent, $5 cent, $1 cent. Create backend route to handle this.
|
||||
|
||||
14. Rate limit analytic api to only be able to be called 10 times a minute.
|
||||
|
||||
15. If the rate limit is exceeded, redirect to a page that requires user to pay for the service ($5) with stripe. Free to use stripe checkout or payment element.
|
||||
|
||||
15. Create upload widget where we upload image to server. Save image to db table. Always show the latest image uploaded above upload button.
|
||||
|
||||
16. Read this documentation https://www.npmjs.com/package/speakeasy and implement a modal popup that blocks the dashboard. Unless 2FA is verified, cannot see dashboard.
|
||||
@@ -34,6 +40,12 @@ https://javascript.info/long-polling
|
||||
|
||||
https://www.technouz.com/4879/long-polling-explained-with-an-example/
|
||||
|
||||
Redis:
|
||||
|
||||
https://redis.io/docs/connect/clients/nodejs/
|
||||
|
||||
https://www.npmjs.com/package/redis
|
||||
|
||||
In demo what should happen:
|
||||
If I open 2 browsers to /chat, both users should connect to chat room. Use redis to store state of chatroom.
|
||||
Have basic html ui showing the chat log using UL and single input box with send button to send messages.
|
||||
@@ -41,8 +53,47 @@ When I type a message in send message, call /send POST api to send message to ba
|
||||
All client browsers have an api called /poll that check if chat room on redis is updated. If updated, it will return 200 and frontend
|
||||
need to call GET /chat/all to pull all the messages in chat room which you will update the UL. Have a button called save where it will save the current chat room chat messages to database table chat with fields (id, create_at, chat_messages).
|
||||
|
||||
|
||||
Stripe key:
|
||||
|
||||
pk_test_51IWQUwH8oljXErmdg6L4MhsuB6tDdmumlHFfyNaopty2U27pmRcqMX1c868zn838lGQtU1eYV6bKRSQtMFWf36VT00aNsvnTOE
|
||||
|
||||
sk_test_51IWQUwH8oljXErmds28KftkL6o6jYIcPgYbBdfEmCPSuAlIh0fgoS4NADcCmsIZbdQ3p5nbAeCOcGkSmo38U9BIe00BdOenrqo
|
||||
|
||||
18. ### Simple Flow Builder
|
||||
|
||||
#### Core Features
|
||||
|
||||
##### Flow Creation:
|
||||
|
||||
* Users can create a flow with a name and description.
|
||||
* Each flow consists of one or more tasks (each task should have a default input on creation).
|
||||
* Tasks are executed sequentially (non-branching).
|
||||
|
||||
##### Task Actions:
|
||||
|
||||
* Each task performs a specific action with a single input.
|
||||
* Supported action types:
|
||||
+ Send Test Mail: Sends an email to the provided address.
|
||||
- Input: Email address (e.g., `test@example.com`).
|
||||
+ HTTP GET Request: Performs a GET request to the provided URL.
|
||||
- Input: URL (e.g., `https://api.example.com/data`).
|
||||
+ MySQL Select: Executes a SELECT query on a specified table and ID.
|
||||
- Input: Table name and ID (e.g., `users|123` [select from users where id = 123]).
|
||||
+ Drive Upload: Writes text to a file and uploads it to Google Drive.
|
||||
- Input: Text content (e.g., `Hello, World!`).
|
||||
- Hint: Create a google drive service account, enable drive api, generate credentials and utilize google sdk or api to upload.
|
||||
|
||||
##### Triggers:
|
||||
|
||||
* Webhook Trigger:
|
||||
+ A GET request with the action input in the query parameter called `payload`.
|
||||
+ Example: `localhost:3001?payload=test@example.com` (triggers the "Send Test Mail" action).
|
||||
* Click Trigger:
|
||||
+ On clicking a button, show a popup to receive the action input.
|
||||
+ Example: Click a button, enter `test@example.com`, and trigger the "Send Test Mail" action.
|
||||
|
||||
##### Execution:
|
||||
|
||||
* When a flow is triggered, execute all tasks in sequence.
|
||||
* Log the results of each task execution in a database table (`flow_logs`).
|
||||
File diff suppressed because one or more lines are too long
+2
-1
@@ -3,7 +3,8 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node ./bin/www"
|
||||
"start": "node ./bin/www",
|
||||
"commit": "git add . && git commit -m \"Update Project purpose\" && git push"
|
||||
},
|
||||
"dependencies": {
|
||||
"cookie-parser": "~1.4.4",
|
||||
|
||||
Reference in New Issue
Block a user