Git Product home page Git Product logo

racp's Issues

Remove redux

After the move to tRPC in #72, redux is no longer used widely. The few uses can be replaced with regular react state. This will reduce the bundle size significantly.

type safe env vars

Use typesafe cli arguments that default to env variables of the same name

Update matcher.ts to only have concrete types

Generate a matcher based on generic interface but produce concrete set of types for all desired permutations. The reason this is necessary is because the filter runtime doesn't handle intersecting types. The current matcher already avoids this by explicitly defining concrete types. Refactoring should produce some code that does this automatically so the developer doesn't have to think about this.

Refactor item meta into generic meta service

By generic meta service I mean a service that provides system wide meta data by reducing all item and monster data into the various meta data we need. This service will likely handle more entities in the future.

This new service will allow us to expose the monster meta data we need to be able to add all desired filters to the monster search page, ie. monster level ranges, monster sizes, etc. (Meaning this issue is a prerequisite to #6 )

Use fixtures for rathena e2e test data

All rathena data e2e tests are currently based on the data that currently exist in the base rathena installation. This is flaky, since rathena could change their data.

Things to try:

  1. (Best idea) Inject fixture files into the given rathena instance as cypress starts.

rAthena supports custom imports for all data. So utilizing this would make our tests also confirm that RACP handles imported files. It also allows us to rely on our own fixture data instead of assuming what the data looks like in the rathena instance, which is the primary goal of this issue. But what's best is that it allows us to also keep sanity testing the rathena data, but without relying on it. If rAthena releases updates that breaks RACP, we will know.

  1. (Mediocre) Update rAthena drivers to allow specifying custom files outside of the rathena folder.

This is almost as good as 1, but less graceful. It allows us to rely on our own fixture data while we keep sanity testing rAthena, but it will not be confirming that we support the rAthena import flow.

  1. (Bad idea) Completely swap the rathena instance when e2e tests run. Create a new minimal rathena instance in cypress/fixtures.

This solves the primary goal of this issue, but it would make us blind to rAthena changes. They could release breaking changes and we would not be able to automatically know.

Shop service + pages

Make it possible to browse all npc shops from the game (Not to be confused with vendors, user based shops).

Admin system controls

ie. restart server or run in-game admin commands from the browser. Research possibilities before starting this task.

Build planner page

A tool that allows you to put together builds. A build consists of equipment and items of the users choice. For each build the tool can automatically generate an optimal farming guide: Which maps to go to, estimates on how many kills are required for the desired amount of drops.

  • Stage 1. Local storage. One build per device.
  • Stage 2. Local storage. Multiple builds per device (CRUD).
  • Stage 3. Remote storage. Multiple builds per account. If signed out, fall back to local storage.

User roles + limit admin pages to admin role

Utilize rAthena user groups. Must update express middleware and rpc mechanism to support roles.

  • POC with admin pages.
  • Update app bar:
    • Remove admin title in user menu
    • Show user profile (username and avatar) instead of admin icon
    • Show user menu in app bar even when signed out (with sign in option when clicked)

Slow type definition resolution in ZodMatcher

TSC yields error "Type instantiation is excessively deep and possibly infinite" if not using assertion in the following code:

const ItemGrid = DataGrid.define<Item, ItemFilter, Item["Id"]>({
  // Without assertion typescript yields possibly infinite error
  query: useSearchItemsQuery as unknown as DataGridQueryFn<Item, ItemFilter>,
  id: (item) => item.Id,
  link: (id) => router.item().view({ id }),
  columns: {
    Name: "Name",
    Buy: "Buy",
    Sell: "Sell",
    Weight: "Weight",
    Attack: "Atk",
    MagicAttack: "MAtk",
    Defense: "Def",
    EquipLevelMin: "Min Level",
    EquipLevelMax: "Max Level",
    Slots: "Slots",
  },
});

Reduce entry point bundle size total to below 244KiB

Task is done when webpack production build no longer produces a warning.

Things to try:

  • Improving bundle tree shaking (likely already close to optimal, but worth trying).
  • Finding and removing unnecessary packages
  • Replacing large packages with smaller alternatives
  • (Last resort) Creating a minimal landing page that sweeps the issue under the rug (slow load will be postponed to first navigating into a heavy zone)

Item script parser and presentation

  • Improve parser to extract meta data properly instead of the current hacky way
  • Use the new parser to produce a pleasant presentation of item properties, rather than just displaying the raw script.

Item script parser

This is to enable filtering in items affecting element, status, race, etc.

Admin edit mode

All entities should be editable. Make generic system. Should seamlessly edit all data sources, ie. itemInfo.lua and item_db.yml, etc. Admin menu should also expose a download function for any uploaded/changed files.

Deduplicate reused sprites

Monster and item images are currently duplicated for all entities sharing a sprite. This is bad for several reasons:

  • Unnecessary network requests in production.
  • Makes the admin tool slower to use due to extra file uploads
  • Makes the admin tool metrics misleading: false positives when counting missing images makes it hard to understand how (un)successful an asset import was.

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.