Giter Site home page Giter Site logo

ff14-advanced-market-search / saddlebag-with-pockets Goto Github PK

View Code? Open in Web Editor NEW
22.0 7.0 12.0 4.22 MB

This is the Frontend for the FF14 Marketplace

Home Page: https://saddlebagexchange.com/

License: Apache License 2.0

TypeScript 97.00% JavaScript 0.30% CSS 2.68% Shell 0.01% Dockerfile 0.01%

saddlebag-with-pockets's Introduction

saddlebag-with-pockets

The frontend of https://saddlebagexchange.com/

Last updated for FFXIV 6.51

Frontend for Aetheryte API

Prerequisites

  • Node 20.3.0

Getting Started

Install the dependencies:

yarn install

Run Server:

yarn run dev

For Windows:

yarn dev

This starts your app in development mode, rebuilding assets on file changes. Check your terminal for the address, the default is http://127.0.0.1:8788

FFXIV Items list

You can fetch and update the ffxiv items list if you find items are missing using:

yarn run write-items
prettier -w app/utils/items/items.ts

Testing

We have just started to use Vitest to run unit tests.

We are currently using the .test.ts ending to mark our test files for the test runner. For any route level testing, such as action files or loaders keep your test files in the app/test/routes folder. For other files try to keep your test files in the same folder as the file your testing. If this gets out of hand we can try to manage the test files into the test folder too. We'll see how it goes.

You can run all unit tests by running:

yarn test

You can run a single unit test file by running

yarn test testFile

You can set vite into watch mode by passing the watch arguement:

yarn test watch

Deployment

Commit to master. Auto deploys to CloudFlare.

https://dash.cloudflare.com/131d3ef77f51b43d39c70f2e5b65c34c/pages/view/saddlebag-with-pockets

Architecture

For those interested, we're using the following in the front-end architecture:

saddlebag-with-pockets's People

Contributors

acen avatar cchen26 avatar cohenaj194 avatar dependabot[bot] avatar fabiantorrestech avatar helloabhii avatar jackoliver avatar krz0001 avatar luan-dev avatar luckytopdev103 avatar oldben87 avatar p-a-u-l-i-e avatar spatiag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

saddlebag-with-pockets's Issues

Create Reducer

This is the mechanism for storing values into the Redux Store.

e.g. using redux tools createReducer helper:

const todosReducer = createReducer([], (builder) => {
  builder
    .addCase('ADD_TODO', (state, action) => {
      // "mutate" the array by calling push()
      state.push(action.payload)
    })
    .addCase('TOGGLE_TODO', (state, action) => {
      const todo = state[action.payload.index]
      // "mutate" the object by overwriting a field
      todo.completed = !todo.completed
    })
    .addCase('REMOVE_TODO', (state, action) => {
      // Can still return an immutably-updated value if we want to
      return state.filter((todo, i) => i !== action.payload.index)
    })
})

EU and NA wow data

So we now have EU data in the site which means 2 changes.

Addition of EU server names.

I got this working and merged to master

  • Theres a new list of server names to ids for the eu dataset. Note that all the ints for the ids are unique but some names are reused. For example theres a Thrall server for the NA and EU.
  • The list of names to ids is here:
    eu-wow-connected-realm-ids.json.zip~~
  • there are no other major changes for the single or full-scan apis it works the same way there are only more numbers now
  • for the full-scan we should limit it so people can only pick 2 servers from the same region

The server selection on the FE will need a fix. We should let users pick the region first and then select a server from the list. A different list should be used for both EU and NA because there are some duplicate names.

region is added to commodities

  • theres a new region input for the api that will be either NA or EU
  • we will also need to update the server selection here too, but thats just for the oribos exchange link

example of new commodity api json:

{
    "desired_avg_price": 20,
    "desired_sales_per_day": 40,
    "desired_price_increase": 50,
    "desired_sell_price": 200,
    "flip_risk_limit": 100,

    "itemQuality": -1,
    "item_class": -1,
    "item_subclass": -1,
    "region": "NA"
}

WoW Commodity Shortage finder

ref https://github.com/ff14-advanced-market-search/Aetheryte/pull/101

I have a shortage finder in a PR in the api and we should go over how the data is going to look and what the outputs of the api will be. This one is really complex so we should talk about it before doing anything.

new apis

there are 2 new apis, they are very similar but have slightly different inputs, the outputs are structured the same way:

http://api.saddlebagexchange.com/api/wow/commodity

{
    "desired_avg_price": 30,
    "desired_sales_per_day": 40,
    "desired_price_increase": 50,
    "desired_sell_price": 200,
    "flip_risk_limit": 100,

    "itemQuality": 1,
    "item_class": -1,
    "item_subclass": -1
}

http://api.saddlebagexchange.com/api/wow/single

 {
    "homeRealmId": 160,
    "desired_avg_price": 40,
    "desired_sales_per_day": 4,
    "desired_price_increase": 100,
    "desired_sell_price": 500,
    "flip_risk_limit": 100,

    "itemQuality": 1,
    "required_level": -1,
    "item_class": -1,
    "item_subclass": -1,
    "ilvl": -1
}

example output data

  • increases are where we increase the price but dont totally buy everything out, they all have flip_price_levels and may have more than 1 level. They will also all have a max_sane_flip_level which is the highest price they should go and the price to go over that limit. price_reset_info will be empty.
  • reset is where we want users to buy out everythingprice_reset_info is the important one to display. They may have flip_price_levels or they may be empty, but we dont care about that data and idk if we need to display it. max_sane_flip_level will be empty.
{
    "increase": [
        {
            "avg_price": 284,
            "flip_price_levels": [
                {
                    "listing_price_level": {
                        "from_price_level": 300.0,
                        "to_price_level": 359.85
                    },
                    "total_price": 300
                }
            ],
            "item_id": 128542,
            "max_sane_flip_level": {
                "cost_to_level": 15774,
                "cost_to_next_level": 39526,
                "listing_price_level": {
                    "from_price_level": 359.85,
                    "to_price_level": 359.89
                }
            },
            "name": "Enchant Ring - Binding of Haste",
            "price_reset": false,
            "price_reset_info": {},
            "sales_per_day": 44,
            "sales_per_hour": 1.83
        },
        {
            "avg_price": 160,
            "flip_price_levels": [
                {
                    "listing_price_level": {
                        "from_price_level": 100.98,
                        "to_price_level": 200.98
                    },
                    "total_price": 100
                },
                {
                    "listing_price_level": {
                        "from_price_level": 200.98,
                        "to_price_level": 274.98
                    },
                    "total_price": 502
                }
            ],
            "item_id": 189152,
            "max_sane_flip_level": {
                "cost_to_level": 502,
                "cost_to_next_level": 17276,
                "listing_price_level": {
                    "from_price_level": 274.98,
                    "to_price_level": 274.98
                }
            },
            "name": "Tarachnid Lattice",
            "price_reset": false,
            "price_reset_info": {},
            "sales_per_day": 509,
            "sales_per_hour": 21.21
        }
    ],
    "reset": [
        {
            "avg_price": 70.5005,
            "flip_price_levels": [],
            "item_id": 147869,
            "max_sane_flip_level": {},
            "name": "Fel Meteorite",
            "price_reset": true,
            "price_reset_info": {
                "recommend_price": 7050.05,
                "total_price": 6208.74
            },
            "sales_per_day": 41,
            "sales_per_hour": 1.71
        },
        {
            "avg_price": 209.0,
            "flip_price_levels": [],
            "item_id": 187812,
            "max_sane_flip_level": {},
            "name": "Empty Kettle",
            "price_reset": true,
            "price_reset_info": {
                "recommend_price": 20900.0,
                "total_price": 8974.0
            },
            "sales_per_day": 40,
            "sales_per_hour": 1.67
        }
    ]
}

vendor items should link to finalfantasyxiv.com/lodestone/ with vendor details

each item from our marketable item list has a value called uid

this value directly links to https://na.finalfantasyxiv.com/lodestone/ where we got the data and then it goes on the end of this url https://na.finalfantasyxiv.com/lodestone/playguide/db/item/{$UID}. For example https://na.finalfantasyxiv.com/lodestone/playguide/db/item/063b7ca4f6b shows the vendor info for Weathered Shortsword

When you select the vendor option the api will sometimes return the Sold by Vendor - None value. When this is the case we should add a link similar to universalis for that item.

Alternatively @Acen if its easier I can return the url needed for the sold by vendor item.

Select all on filters

Make a button on the filters to select all, sometimes people want to search all filters then unselect them

also this should unselect everything

Re-enable Dependabot

This is not recommended until we're using release branches.

But why, might you ask?
It recommended a depdency update.
I tested the preview branch which worked and then merged it into master.

Master went down.

And thus, someone either needs to spend time working out why this happened and fix it, or wait until we're using release branches which build as production.

Quick-Fill Search parameters

Add some buttons to pre-fill some recommended query variables, put em on the query page like this:

image

Then when you click on one they all do the same /api/scan operation just wit different values:

Additional Detail: https://github.com/ff14-advanced-market-search/saddlebag.exchange/issues/54

  1. High Value Search (sort by profit amt)

image

  1. Fast Sale Rate Search (sort by sale rate)

image

3.) Commodities Search (say this is anything that is sold in stacks of more than 1 and has almost no wearable gear)(sort by sale rate)
image

  1. NPC Vendor Item Search (sort by profit amt)

image

  1. Beginner Out of Stock Search
  • (also include that its low level requirement, low risk, low price, low effort, low competition, high profit margins, but slow sale rates)
  • (tell them this works when you buy multiple different cheap items that are out of stock on your servers market board but can be purchased for under 3k (the best ones can be found for less than 200gil) and sell them for around 70,000 to 100,000 gil. Almost anything will sell for that price range. Not everything is guaranteed to sell before competition shows up, so its best when selling 5 or more different kinds of out of stock items at once. If one kind of item doesn't sell, it doesn't matter because you only need 1 or 2 sales to make a profit)
  • (auto sort by lowest price)
  • (link to a webpage with tutorial links)(link to the old tutorial for now, then we will switch when the new one is up)
  • (add a note telling people to make sure to double check universalis and their local marketboard before buying, data in our system or universalis may be out of date if no one has check the marketboard recently, to update data please search the marketboard with dalamud plugins ffxiv installed)

image

  1. Low Quality Out of Stock

image

  • Search for out of stock NQ with "filters": [ -3, -2, 1, 2, 3, 4, 7], basically searching all NQ stuff except for Materials and Meals and Medicine.

add in amazon ads

Acen can we add my amazon ads in somewhere to the sites pages. It actually is worth about $10 a month so I would like to keep it in unless we are aiming to get approved by adsense somehow.

      <h3 class="c-white heading">Amazon Ads Help Keep the Server Running</h3>

      <div class="flex">
        <div class="col card">
            <a target="_blank" class="primary-btn" href="https://www.amazon.com/best-sellers-video-games/zgbs/videogames?_encoding=UTF8&linkCode=ib1&tag=ff14advancedm-20&linkId=e9fc3b6346a319e96288b98cbf3e688d&ref_=ihub_curatedcontent_c0e2eb7b-31db-4cc7-a427-b5f5f75b09db">Best Sellers in Video Games</a>
        </div>

        <div class="col card">
            <a target="_blank" class="primary-btn" href="https://www.amazon.com/deal/590c1721?_encoding=UTF8&linkCode=ib1&tag=ff14advancedm-20&linkId=42be2239289ce43353bcf6a9702a2efd&ref_=ihub_deals-promotions_590c1721">Video Game Accessories</a>
        </div>

        <div class="col card">
          <a target="_blank" class="primary-btn" href="https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics?_encoding=UTF8&linkCode=ib1&tag=ff14advancedm-20&linkId=2d456819badb061450b7200abf42b1cf&ref_=ihub_curatedcontent_c71c4a67-0a56-4af2-a5a5-78ab26623653">Best Sellers in Electronics</a>
        </div>

        <div class="col card">
          <a target="_blank" class="primary-btn" href="https://www.amazon.com/Best-Sellers-Computers-Accessories/zgbs/pc?_encoding=UTF8&linkCode=ib1&tag=ff14advancedm-20&linkId=d5510f37e5ba06b34988212672d6e470&ref_=ihub_curatedcontent_cc03e16d-0d64-46fc-ba03-79623230ca5e">Best Sellers in Computers & Accessories</a>
        </div>
      </div>

Dark Mode

Enable through two methods,

option in configuration alongside world/data center selection flag.

Load default theme from the OS default via window.matchMedia('(prefers-color-scheme: etc

Add Universalis List UID option for search, but lock it for non patreons

https://github.com/ff14-advanced-market-search/Aetheryte/issues/61

There is one item from the search that we are not using universalis_list_uid. Right now we just send an empty string that tells the api to ignore it. What I would like to show is the text box with some kind of locked symbol that prevents normal users from using it and then when a patreon user is logged in then when a patreon user is logged in then you can fill in the text box and use the custom lists, by filling in the value.


Even better if we can somehow get all the users lists and let them select through them instead of needing the uid
image

it doesnt look like anything is in the api that lets us do that though

https://docs.universalis.app/#user-lists

add new scan api inputs

Making a ticket for this. We have 2 api input changes that need to go into the frontend. These arent hard and need to go in asap so I can merge the api changes.

  1. filters will now accept a list of ints instead of an int so "filters": 0, is now "filters": [0],. We can also send multiple filters like "filters": [1,2], but I just need it to at least send it as a list instead of an int. Example: #45
  2. universalis_list_uid is a new input for universalis lists, for now we can just send an empty. Example string #44

Below is an example of a working test with all new filters. I have this setup on https://api.saddlebag.exchange that can be used for testing.

{
    "preferred_roi": 50, 
    "min_profit_amount": 100,
    "min_desired_avg_ppu": 100,
    "min_stack_size": 1,
    "hours_ago": 48,
    "min_sales": 1,
    "hq": false,
    "home_server": "Famfrit",
    "filters": [0],
    "region_wide": false,
    "include_vendor": false,
    "show_out_stock": true,
    "universalis_list_uid": "d2419b20-64ba-4ac5-8cfd-b93cef45d97d"
}

This also works.

{
    "preferred_roi": 50, 
    "min_profit_amount": 10000,
    "min_desired_avg_ppu": 10000,
    "min_stack_size": 1,
    "hours_ago": 24,
    "min_sales": 5,
    "hq": false,
    "home_server": "Famfrit",
    "filters": [0],
    "region_wide": false,
    "include_vendor": false,
    "show_out_stock": true,
    "universalis_list_uid": ""
}

Note:

  • we dont want anyone using universalis_list_uid in the main scan right now because we will add that in for a patreon only section of the site we build down the line #49
  • for now we can just send the same filter number we send now in an array so instead of "filters": 0, we send "filters": [0], #49
  • the api now has the capability to filter multiple items at once, so eventually we should change the filters dropdown to let you select multiple filters.

Add link to status page on side navigation

Label:
Status

Link:
https://saddlebagexchange.onlineornot.com/

Icon:
Hero Icons
check-badge

alt SVG:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5">
  <path fill-rule="evenodd" d="M16.403 12.652a3 3 0 000-5.304 3 3 0 00-3.75-3.751 3 3 0 00-5.305 0 3 3 0 00-3.751 3.75 3 3 0 000 5.305 3 3 0 003.75 3.751 3 3 0 005.305 0 3 3 0 003.751-3.75zm-2.546-4.46a.75.75 0 00-1.214-.883l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd" />
</svg>

item id lookup

should be easy to add this in let people search a name and then return any item ids that match the substring of what is given

Here is our item ids to english names file that we can base it off of

id_to_item.json.txt

Add WoW Arbitrage Search Page

We have a new api up and we should build a page around it:

url: http://api.saddlebagexchange.com/api/wow/scan
json body:

{
    "homeRealmId": 61,
    "newRealmId": 3678,
    "min_historic_price": 10000,
    "desired_roi": 50,
    "sale_per_day": 0
}

The users decide the price, roi and sales inputs. The Realm Id's are determined from a list, I have made the first list here:

https://gist.githubusercontent.com/cohenaj194/0b59e7c719678dbbe6e49d856680c3c0/raw/0d645e8a22d76bc88692404680e0d58889a6474b/wow-server-name-to-id.json

Users will pick server names from the keys of that json in the ui, then react can change that into the correct int. How it works in WoW is that multiple servers share the same market in a "connected realm." Thats why a lot of servers share the same realm id with a bunch of others.

We should hardcode that json data into saddlebag somewhere.


The response will be 4 values in the json, all will be lists:

  • out_of_stock
  • out_w_sales
  • profit_w_sales
  • profitable_items

The w_sales may or may not be empty, if you try a very low min price or roi you may get some.

  • out_w_sales is the same syntax as out_of_stock data.
  • profit_w_sales is the same syntax as profitable_items data.

Output example:

{
    "out_of_stock": [
        {
            "historicPrice": 9999999.99,
            "itemID": 6198,
            "name": "Jurassic Wristguards",
            "price": 8999999.64,
            "salesPerDay": 0
        },
        {
            "historicPrice": 9999999.99,
            "itemID": 36687,
            "name": "Illuminated Scepter",
            "price": 43219.69,
            "salesPerDay": 0
        },
        {
            "historicPrice": 9999999.99,
            "itemID": 55604,
            "name": "Frayfeather Helm",
            "price": 401507.97,
            "salesPerDay": 0
        },
        {
            "historicPrice": 9461484.52,
            "itemID": 55721,
            "name": "Galardell Robe",
            "price": 520676.95,
            "salesPerDay": 0
        },
        {
            "historicPrice": 8694444.01,
            "itemID": 49282,
            "name": "Big Battle Bear",
            "price": 5666666.0,
            "salesPerDay": 0
        },
        {
            "historicPrice": 6130937.01,
            "itemID": 4476,
            "name": "Beastwalker Robe",
            "price": 6888118.03,
            "salesPerDay": 0
        },
        {
            "historicPrice": 4000000.0,
            "itemID": 20030,
            "name": "Pet Rock",
            "price": 2222222.24,
            "salesPerDay": 0
        },
        {
            "historicPrice": 3180099.0,
            "itemID": 23476,
            "name": "Squire's Shirt",
            "price": 9999999.99,
            "salesPerDay": 0
        },
        {
            "historicPrice": 2718347.26,
            "itemID": 20673,
            "name": "Abyssal Plate Girdle",
            "price": 3322911.61,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1500000.01,
            "itemID": 18665,
            "name": "The Eye of Shadow",
            "price": 499999.01,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1495347.25,
            "itemID": 18704,
            "name": "Mature Blue Dragon Sinew",
            "price": 500000.0,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1369082.365,
            "itemID": 2166,
            "name": "Foreman's Leggings",
            "price": 1414627.91,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1300000.0,
            "itemID": 6139,
            "name": "Novice's Robe",
            "price": 9999999.99,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1124707.0,
            "itemID": 18360,
            "name": "Harnessing Shadows",
            "price": 9999999.01,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1054534.415,
            "itemID": 97826,
            "name": "Latent Kor'kron Chestpiece",
            "price": 2654377.75,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1013010.165,
            "itemID": 2105,
            "name": "Thug Shirt",
            "price": 7444132.04,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1010191.645,
            "itemID": 97831,
            "name": "Latent Kor'kron Spaulders",
            "price": 1832349.23,
            "salesPerDay": 0
        }
    ],
    "out_w_sales": [],
    "profit_w_sales": [],
    "profitable_items": [
        {
            "historicPrice": 9999999.99,
            "home_price": 95000.0,
            "itemID": 55379,
            "name": "Sorrowmurk Crystal",
            "new_price": 9999999.99,
            "profit": 9404999.9905,
            "roi": 98,
            "salesPerDay": 0
        },
        {
            "historicPrice": 7636375.895,
            "home_price": 3000000.0,
            "itemID": 13519,
            "name": "Recipe: Flask of the Titans",
            "new_price": 9999999.99,
            "profit": 6499999.990499999,
            "roi": 68,
            "salesPerDay": 0
        },
        {
            "historicPrice": 6109286.385,
            "home_price": 3423380.6,
            "itemID": 36603,
            "name": "Archaic Longspear",
            "new_price": 9999999.99,
            "profit": 6076619.3905,
            "roi": 63,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1765297.78,
            "home_price": 400000.0,
            "itemID": 4448,
            "name": "Husk of Naraxis",
            "new_price": 2727786.68,
            "profit": 2191397.346,
            "roi": 84,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1097388.9775,
            "home_price": 40000.0,
            "itemID": 36615,
            "name": "Expert's Longbow",
            "new_price": 1586178.96,
            "profit": 1466870.012,
            "roi": 97,
            "salesPerDay": 0
        },
        {
            "historicPrice": 1066274.0675,
            "home_price": 500000.01,
            "itemID": 38089,
            "name": "Ruby Shades",
            "new_price": 1500000.0,
            "profit": 924999.99,
            "roi": 64,
            "salesPerDay": 0
        }
    ]
}

Seller id and Undercut bot json generator

We should add something to the website that lets users create the json needed for undercuts.

We could make something that dynamically generates the json needed for the undercut bot. We can add in a handler that finds the seller id.

  • Finding seller id: Ask for user input on an item name and a retainer name, our lookup function finds the item id like it does for listing or history
  • Finding add ids: ask user for input on any items they are selling to insure they are monitored (can be done with our item name to id functions)
  • Finding ignore ids: ask user for input on any items they want to ignore and not be alerted on (can be done with our item name to id functions)
{
    "seller_id": "<add function in to add this>",
    "server": "<gets this from the settings>",
    "add_ids": [<add item id lookup by name generator in here>],
    "ignore_ids": [<add item id lookup by name generator in here>],
    "hq_only": <True or False>
}

We also add in instructions that these results will be used for undercut alerts and if someone wants it they need to become a patreon, with an extra link to the patreon profile.

Switch from Cloudflare Pages to Cloudflare Workers

There are three reasons for this.
1.) Pages is now GA and is no longer free.
2.) Remix Run + Pages has an issue with how the [[path]] function is being rendered in that it's needing an export which is in turn generating invalid ECMAscript and throwing a metric shit ton of errors into the log, making it genuinely slow to work on.
3.) Pages doesn't support Durable Objects out of the box, and workers does.

I'll be footing the bill for the system once we've gotten a branch working.

Add Lint Validation

Validate effective prettier linting for PRs or commits via a Github Action.

This is a low priority until we're happy with the style laid out by the existing prettier config.

clean up search query

there are several parts of the scan query that we can fix

the filters needs to be a better dropdown, maybe something with check boxes like the mobile version would be better

image

the npc vendor info should not show a link when an item has an empty string as its npc_vendor_info value, that means it is not a vendor item. this one is done

image

we should also change the vendor png to this instead as right now its just reusing the universalis one

image

also in the vendor items we dont need to show the uuid there does not need to be text in the button it can be small

image

we really need to fix the columns too, right now all the column titles are on one line, if we can put it on multiple lines that will make the table less wide

image

Out of stock items always show 0 as the home server price and 99999999999 as the profit amount. Instead of 0 we should have the table say No Listings instead of 0 and instead of 99999999999 However the table should still read that in as 99999999999 behind the scenes so clicking the profit column always puts out of stock items at the top.

image

Fix the Dashboard and sidebar

  • We should fix the dashboard. Instead of going to queries it should have a 3 buttons:
  • "FFXIV Marketboard Tools"
  • "Legacy FFXIV Marketboard Tools"
  • "WoW Auction House Tools"

For the side bar I'm thinking of 2 options.

  1. The side bar Could show all of our features:
  • queries, history and listing under a FFXIV dropdown.
  • The legacy site can have a dropdown with each of its links.
  • The WoW we can dropdown to "WoW Trading Search" and "WoW Commodity Shortage Search"
  1. We can do a top bar dropdown like icv viens: https://www.icy-veins.com/
  • When you click on any option then the side bar only shows the links for that category.
  • i.e. click on the wow tab and the sidebar only shows "WoW Trading Search" and "WoW Commodity Shortage Search"

Include Out of Stock cannot be set to false in FE

For some reason when you uncheck the Include Out of Stock box it will still send this value out as being True. I unchecked it in the api in this call then in the logs I still see that it was sent as true:

[11][2022-09-16 18:23:37,131] [app] [INFO] /api/scan/ params: {'preferred_roi': 99, 'min_profit_amount': 10000, 'min_desired_avg_ppu': 10000, 'min_stack_size': 1, 'hours_ago': 99, 'min_sales': 2, 'hq': False, 'home_server': 'Famfrit', 'filters': 0, 'region_wide': False, 'include_vendor': False, 'show_out_stock': True}

App failure

Application Error
TypeError: Failed to fetch
    at Ge (https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-B2JEZHGK.js:9:3774)
    at Object.action (https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-B2JEZHGK.js:9:17961)
    at Ut (https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-B2JEZHGK.js:9:14087)
    at Sr (https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-B2JEZHGK.js:9:10569)
    at Object.L [as send] (https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-B2JEZHGK.js:9:5782)
    at https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-B2JEZHGK.js:9:19423
    at sl (https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-CFSYE5O3.js:8:24289)
    at Xn (https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-CFSYE5O3.js:8:42364)
    at https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-CFSYE5O3.js:8:40660
    at Sl (https://task-table-column-reorder.saddlebag-with-pockets.pages.dev/build/_shared/chunk-CFSYE5O3.js:1:1717)

Screenshot_20221108-185805_Chrome

Fix wow filters

Right now we are just lazy and using the same wow filters for everything. Each page should only show the main categories for the item type they are trading (single items, commodities or pets). Maybe we break up the existing filter list into 3 snakker

  1. The Battle Pets is not used by any of the current searches. We should not show that one. Only when and if I make a specific pet search will we use that one. Then when I get to that search we only need to show subcategories.
  2. The commodity shortage search only needs the following main categories:
{
    "Consumable": 0,
    "Gem": 3,
    "Tradegoods": 7,
    "Item Enhancement": 8,
    "Recipe": 9,
    "Glyph": 16,
}
  1. The items only available on the local realm market are:
{
    "Container": 1,
    "Weapon": 2,
    "Armor": 4,
    "Profession": 19,
}
  1. There are other categories I need to go through and figure out where they belong it seems like certain items in these categories like mounts are single region, while lots of others like tomes and contracts are commodities
    "Quest Item": 12,
    "Miscellaneous": 15,

Add Prettier

Let's standardize code format

I'll add README and instructions with this too

add more filters for wow search

ref https://github.com/ff14-advanced-market-search/Aetheryte/pull/100

we added data on items and now are going to let users pick a minimum itemQuality, required_level, item_class, item_subclass and ilvl (for reference in wow ilvl means item level higher ilvl means better stats)

All 5 of these will be ints. -1 will be the default value and just return everything.

Heres an example of the new api call this one is allowing all other filters and just looks for items that are rare or better.

 {
    "homeRealmId": 61,
    "newRealmId": 3678,
    "min_historic_price": 10000,
    "desired_roi": 50,
    "sale_per_day": 0,

    "itemQuality": 3,
    "required_level": -1,
    "item_class": -1,
    "item_subclass": -1,
    "ilvl": -1
}

what these values mean

required_level and ilvl can be any value. Note the lowest this goes is 0 so -1 returns everything. Anything above that level is returned.

For the item_class and item_subclass these are the wow categories:
https://wowpedia.fandom.com/wiki/ItemType

Right now its just one subclass and class we cant do multiple ones yet but it works the same as ffxiv. Eventually we can make these lists.

For itemQuality the menu we design should basically pick an int based on one of these values (more info here). For example picking Uncommon will only return green items or better.

        item_qualities = {
            "Poor": 0,
            "Common": 1,
            "Uncommon": 2,
            "Rare": 3,
            "Epic": 4,
            "Legendary": 5,
            "Artifact": 6,
            "Heirloom": 7,
        }

Filters as an array

  • Set drop down for filters to multiple.
  • remappedKeys() needs updating to support items in the Form Data with the same key.

Test multiple vs the API end point cluster.

api.saddlebag.exchange

FE / API Epic before next video release

It seems like perfecting the listing and history api may take a bit of time, so maybe we can focus on the main search and get to those later.

We can link this into other issues I may have created in the project.

Right now I think the top issues are:


Top desires are:

  • getting scroll bars to always be visible #26
  • fix the out of stock check box, right now it wont send False if you uncheck that box in the options #43
  • getting the different queries with different default search values working #3
  • showing npc vendor links (low priority because we could also just use the workaround in dev right now)

docker compose issue

my docker compose build failed from this error

saddlebag  | ✘ [ERROR] Watch build failed: Error: The service was stopped
saddlebag  | 
saddlebag  |       at Socket.afterClose (/app/node_modules/esbuild/lib/main.js:662:18)
saddlebag  |       at Socket.emit (node:events:525:35)
saddlebag  |       at endReadableNT (node:internal/streams/readable:1358:12)
saddlebag  |       at processTicksAndRejections (node:internal/process/task_queues:83:21)
saddlebag  | 
saddlebag  | 
saddlebag  | /app/node_modules/wrangler/wrangler-dist/cli.js:12110
saddlebag  |             throw ex;
saddlebag  |             ^
saddlebag  | 
saddlebag  | Error: The service was stopped
saddlebag  |     at /app/node_modules/esbuild/lib/main.js:1353:25
saddlebag  |     at /app/node_modules/esbuild/lib/main.js:675:9
saddlebag  |     at Socket.afterClose (/app/node_modules/esbuild/lib/main.js:653:7)
saddlebag  |     at Socket.emit (node:events:525:35)
saddlebag  |     at endReadableNT (node:internal/streams/readable:1358:12)
saddlebag  |     at processTicksAndRejections (node:internal/process/task_queues:83:21)
saddlebag  | 
saddlebag  | error Command failed with exit code 7.
saddlebag  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
saddlebag  | ERROR: "dev:wrangler" exited with 7.
saddlebag  | error Command failed with exit code 1.
saddlebag  | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
saddlebag exited with code 1

adding 2 more inputs for shortages

change here is 2 new inputs for the shortages

    "under_market_price_percent": 0,
    "over_market_price_percent": 50,

New examples:

single

 {
    "homeRealmId": 3678,
    "desired_avg_price": 20,
    "desired_sales_per_day": 2,
    "desired_price_increase": 100,
    "desired_sell_price": 40,
    "flip_risk_limit": 100,
    "under_market_price_percent": 0,
    "over_market_price_percent": 50,

    "itemQuality": 1,
    "required_level": -1,
    "item_class": -1,
    "item_subclass": -1,
    "ilvl": -1
}

commodity

{
    "desired_avg_price": 20,
    "desired_sales_per_day": 40,
    "desired_price_increase": 50,
    "desired_sell_price": 200,
    "flip_risk_limit": 100,
    "under_market_price_percent": 0,
    "over_market_price_percent": 0,

    "itemQuality": -1,
    "item_class": -1,
    "item_subclass": -1,
    "region": "EU"
}

Create Store

Use slice reducers alongside #68

example:

import { configureStore } from '@reduxjs/toolkit'
import usersReducer from './usersReducer'
import postsReducer from './postsReducer'

const store = configureStore({
  reducer: {
    users: usersReducer,
    posts: postsReducer,
  },
})

export default store

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.