# moku-quest-service

> ```bash DATABASE_URL= REPLICA_DATABASE_URL= NEXT_PUBLIC_INFURA_ID= INFURA_SECRET= NEXTAUTH_SECRET= REDIS_URL=redis://127.0.0.1:6379 USER_SERVICE_SECRET=

Latest version **1.0.0** (published 2025-02-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install moku-quest-service
pnpm add moku-quest-service
yarn add moku-quest-service
bun add moku-quest-service
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2025-02-27 |
| First published | 2025-02-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=16 |
| Dependencies | 51 |
| Unpacked size | 412.4 KB |
| Known vulnerabilities | 0 (+40 in 5 direct dependencies) |
| Install scripts | no |
| Maintainers | ymakiev |

## Links

- npm: https://www.npmjs.com/package/moku-quest-service
- npm.io page: https://npm.io/package/moku-quest-service

## Dependencies (51)

- [bull](https://npm.io/package/bull.md) ^4.11.0
- [cors](https://npm.io/package/cors.md) ^2.8.5
- [pino](https://npm.io/package/pino.md) ^7.11.0
- [uuid](https://npm.io/package/uuid.md) ^9.0.1
- [yaml](https://npm.io/package/yaml.md) ^1.10.2
- [axios](https://npm.io/package/axios.md) ^0.27.2
- [fastq](https://npm.io/package/fastq.md) ^1.15.0
- [sharp](https://npm.io/package/sharp.md) ^0.33.2
- [sinon](https://npm.io/package/sinon.md) ^15.0.2
- [cryptr](https://npm.io/package/cryptr.md) ^6.3.0
- [dotenv](https://npm.io/package/dotenv.md) ^10.0.0
- [ethers](https://npm.io/package/ethers.md) ^5.6.1
- [helmet](https://npm.io/package/helmet.md) ^7.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [moment](https://npm.io/package/moment.md) ^2.29.4
- [multer](https://npm.io/package/multer.md) ^1.4.5-lts.1
- [nanoid](https://npm.io/package/nanoid.md) ^3.1.22
- [express](https://npm.io/package/express.md) ^4.17.3
- [ioredis](https://npm.io/package/ioredis.md) ^5.3.2
- [moralis](https://npm.io/package/moralis.md) ^2.11.1
- [newrelic](https://npm.io/package/newrelic.md) ^11.16.0
- [next-auth](https://npm.io/package/next-auth.md) ^4.23.1
- [xss-clean](https://npm.io/package/xss-clean.md) ^0.1.4
- [@types/uuid](https://npm.io/package/@types/uuid.md) ^9.0.8
- [alchemy-sdk](https://npm.io/package/alchemy-sdk.md) ^2.9.2
- [body-parser](https://npm.io/package/body-parser.md) ^1.19.0
- [compression](https://npm.io/package/compression.md) ^1.7.4
- [http-status](https://npm.io/package/http-status.md) ^1.7.3
- [prom-client](https://npm.io/package/prom-client.md) ^15.0.0
- [@orama/orama](https://npm.io/package/@orama/orama.md) ^2.0.5
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) ^8.2.0
- [@types/multer](https://npm.io/package/@types/multer.md) ^1.4.11
- [cookie-parser](https://npm.io/package/cookie-parser.md) ^1.4.6
- [sns-validator](https://npm.io/package/sns-validator.md) ^0.3.5
- [@prisma/client](https://npm.io/package/@prisma/client.md) ^5.5.2
- [@heyputer/kv.js](https://npm.io/package/@heyputer/kv.js.md) ^0.1.5
- [fast-xml-parser](https://npm.io/package/fast-xml-parser.md) ^4.3.5
- [node-mocks-http](https://npm.io/package/node-mocks-http.md) ^1.12.2
- [express-slow-down](https://npm.io/package/express-slow-down.md) ^2.0.1
- [npmrc-replace-env](https://npm.io/package/npmrc-replace-env.md) ^1.1.4
- [@aws-sdk/client-s3](https://npm.io/package/@aws-sdk/client-s3.md) ^3.495.0
- [express-rate-limit](https://npm.io/package/express-rate-limit.md) ^7.1.5
- [@aws-sdk/client-sqs](https://npm.io/package/@aws-sdk/client-sqs.md) ^3.511.0
- [express-prom-bundle](https://npm.io/package/express-prom-bundle.md) ^6.6.0
- [@aws-sdk/lib-storage](https://npm.io/package/@aws-sdk/lib-storage.md) ^3.496.0
- [express-jsdoc-swagger](https://npm.io/package/express-jsdoc-swagger.md) ^1.8.0
- [@moralisweb3/evm-utils](https://npm.io/package/@moralisweb3/evm-utils.md) ^2.11.1
- [@orama/plugin-data-persistence](https://npm.io/package/@orama/plugin-data-persistence.md) ^2.0.5
- [@canarylabs-xyz/rektdrinks-rewards-sns](https://npm.io/package/@canarylabs-xyz/rektdrinks-rewards-sns.md) ^1.0.11
- [@canarylabs-xyz/rektdrinks-rewards-types](https://npm.io/package/@canarylabs-xyz/rektdrinks-rewards-types.md) ^1.0.17
- [@canarylabs-xyz/rektdrinks-rewards-prisma](https://npm.io/package/@canarylabs-xyz/rektdrinks-rewards-prisma.md) 2.0.282

## Recent versions

- 1.0.0 (latest) — 2025-02-27

## README

## env

```bash
DATABASE_URL=
REPLICA_DATABASE_URL=
NEXT_PUBLIC_INFURA_ID= 
INFURA_SECRET= 
NEXTAUTH_SECRET=
REDIS_URL=redis://127.0.0.1:6379
USER_SERVICE_SECRET=

```

## Running the app

```bash
# development
$ npm run "start:dev"
```

## Ranking
+ Rank
+ Leaderboard


key:
leaderboard_mokuId => default rank

`user:${userId}`, 'data'  -> individual user


`${mokuId}:${userId}` -> key for multiple sub: questCompleted, pointSpent



/api/rank/top3?mokuId=b4eae5c4-2892-4a2e-8de8-ab5764b08434

This gives top 3, only the ranking and exp is the latest
These info are stale ~ update per several hours through cron:
username
avatar
providers
questCompleted
pointSpent

## Moku

Get moku by name: 

```bash
GET: /api/moku?name={name of moku}
```

Get moku settings by id: 

```bash
GET: /api/moku/settings?mokuId={id of moku}
```

Invalidate cached moku settings by id: 

```bash
DELETE: /api/moku/settings/invalidate?mokuId={id of moku}
```

---
_Source: https://npm.io/package/moku-quest-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
