An open API service indexing awesome lists of open source software.

https://github.com/PatriikPlays/findshop

A SC3 chatbox service to find ShopSync compatible shops
https://github.com/PatriikPlays/findshop

chatbox shopsync switchcraft3

Last synced: 9 months ago
JSON representation

A SC3 chatbox service to find ShopSync compatible shops

Awesome Lists containing this project

README

          

FindShop


Powerful SwitchCraft service to find shops and items!


GitHub top language
GitHub Repo stars
GitHub contributors
GitHub Created At


FindShop is a SwitchCraft service providing an easy way to search for compatible
shops implementing the [ShopSync] protocol. Default command aliases are `\fs` or `\findshop`.

## FAQ

### Supported servers

Currently, findshop only runs on [ReconnectedCC](https://reconnected.cc/). The aliases being used are `\fsl` and `\findshoplegacy`, and the HTTP API runs at https://rcc.findshop.patriik.one/api/.

### Why are shops or items missing?

There are a few reasons why your search results may not be what you expected,
such as the following.

#### The search term may be too specific or misspelled

FindShop matches results based on exact matches to an item name (display name
and item id). So, for example, if you were searching for slime blocks
(`minecraft:slime_block`):

- `slime` would be matched to both the display name ("**Slime** Block") and the
item ID (minecraft:**slime**\_block)
- `slime_block` would be matched to the item ID (minecraft:**slime_block**)
between "slime" and "block" and the item ID replaces this space with an
- `slimeblock` would return **NOTHING** because the display name has a space in
underscore.

#### FindShop doesn't have the shop

FindShop fetches shop information, including location, pricing & stock, from
shops implementing the [ShopSync] standard. Shops might not appear if:

- their software doesn't support ShopSync
- their software implemented ShopSync incorrectly
- their shop hasn't been configured to use ShopSync
- their shop hasn't been loaded recently
- something is broken on our end

### What softwares support ShopSync?

> [!NOTE]
> If there are others, feel free to submit a PR.

| Software | Version | ShopSync Standard (in latest version) | Note |
| ------------------------------------------------ | -------- | ------------------------------------- | --------------------------------------------------- |
| [Kristify](https://github.com/Kristify/Kristify) | >=1.3.0 | 1.1 | Earlier versions may use an older ShopSync standard |
| [Radon](https://github.com/Allymonies/Radon) | >=1.3.30 | 1.1 | Most common shop software |

## Subcommands

### Buy

```chat
\fs buy [[=]item] [page]
```

Finds shops with `[item]` and returns the shop name, location, item price &
quantity in stock. The buy keyword is optional: if no subcommand is specified,
buy is inferred. If `[item]` is prefixed with `=`, an exact query is performed.

### Sell

```chat
\fs sell [[=]item] [page]
```

Finds shops buying `[item]` and returns the shop name, location and item price. If `[item]` is prefixed with `=`, an exact query is performed.

### Shop Details

```chat
\fs shop [page]
```

Finds shops with `` and returns the owner, location, and other statistics.

### Stats

```chat
\fs stats
```

Returns some statistics.

### List

```chat
\fs list [page]
```

Lists all available shops.

## HTTP API

### `/v1/`
> `/v1/items`
> ```
> Query params (optional):
>
> query: string query
> exact: true/false
> inStock: true/false
> sell: true/false
> includeFullShop: true/false
> ```

> `/v1/shop/:id`
> ```
> Query params (optional):
>
> includeItems: true/false
> ```

## Deployment

You must use a reverse-proxy like [Nginx](https://nginx.org/) or
[Caddy](https://caddyserver.com/) to rate-limit, log, and protect the API.
The IP of the client must be set in the `X-Forwarded-For` header. The proxy must
not accept any pre-existing value in the header, and should always overwrite it.

## Contributing

FindShop is developed using the [Bun toolkit and runtime](https://bun.com).

[ShopSync]: https://p.sc3.io/7Ae4KxgzAM