1.0.0 • Published 2 months ago

moku-quest-service v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

env

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

# 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:

GET: /api/moku?name={name of moku}

Get moku settings by id:

GET: /api/moku/settings?mokuId={id of moku}

Invalidate cached moku settings by id:

DELETE: /api/moku/settings/invalidate?mokuId={id of moku}