Commit Graph
58 Commits
Author SHA1 Message Date
tiennm99 10cb776ecc chore(plans): remove completed migration & mapillary plans 2026-05-10 02:33:01 +07:00
tiennm99 1e16bd8d42 chore(storage): drop redis dep and migration script post-Upstash cutover
The Upstash REST migration is verified in production; node-redis is no longer
needed and the one-shot migration script has done its job.

- Remove `redis` from package.json
- Delete scripts/migrate-upstash.js (recoverable from commit 53ee795)
- Add cleanup plan; close out migration plan Phase 3
2026-05-10 02:13:12 +07:00
tiennm99 c435a618ac fix(mapillary): bump retries 10 -> 20 to better cover HN pano-sparse blocks 2026-05-10 01:46:19 +07:00
tiennm99 f12fef855d fix(mapillary): port viguessr random-point + per-city delta strategy
Replaces adaptive shrink/grow bbox loop with viguessr's proven approach:
random point inside city bbox → fixed-size sub-bbox of side 2*delta → re-roll
position on empty/error. Small fixed bbox keeps Mapillary query cost under
their 'reduce data' cap; dart-throw eventually lands on a pano-rich window.

- src/lib/game.js: add per-city mapillaryDelta (HN=0.003, others=0.005)
  and export cityDeltas alongside existing cityBboxes
- src/lib/mapillary.js: rewrite fetchMapillaryImages(bbox, delta) with
  10-attempt position-only retry; revert to thumb_original_url; limit=3
- src/app/api/new-game/route.js: pass cityDeltas[cityCode] to the fetcher

Source: https://github.com/luuvanduc1999/viguessr (assets/js/game.js)
2026-05-10 01:38:48 +07:00
tiennm99 a3a0667774 fix(mapillary): adaptive bbox - shrink on 500, grow on empty across 15 retries 2026-05-10 01:12:55 +07:00
tiennm99 3d954cbbdc fix(mapillary): bump bbox area to 0.002 sq deg (~5km) keeping limit=1 2026-05-10 01:04:04 +07:00
tiennm99 9e91be0572 fix(mapillary): limit=1 + smaller bbox; trim is_pano field (filter handles it) 2026-05-10 00:52:53 +07:00
tiennm99 5c4bf4d609 fix(mapillary): bump sub-bbox area to 0.001 sq deg (~3km) for better pano coverage 2026-05-10 00:46:24 +07:00
tiennm99 e47b7fe28b fix(mapillary): always sub-sample small bbox + retry on transient errors 2026-05-10 00:40:47 +07:00
tiennm99 963175886f fix(mapillary): keep is_pano=true filter (panoramic only required) 2026-05-10 00:33:13 +07:00
tiennm99 9618e3c260 fix(mapillary): drop is_pano filter, lower bbox area + limit to dodge Mapillary 500 2026-05-10 00:29:50 +07:00
tiennm99 34959449c7 fix(mapillary): use thumb_2048_url to avoid Mapillary 500 'reduce data' error 2026-05-10 00:25:48 +07:00
tiennm99 5a416a2962 debug: log Mapillary error body and redacted URL 2026-05-10 00:19:48 +07:00
tiennm99 5fe770121e docs(plans): add Upstash migration plan with KEY_PREFIX
Three-phase plan: adapter refactor, data migration, cutover/cleanup.
2026-05-10 00:00:57 +07:00
tiennm99 53ee7957e7 refactor(storage): migrate to Upstash REST SDK with KEY_PREFIX
Replace node-redis with @upstash/redis REST client and route all keys through
a centralized adapter that prepends KEY_PREFIX (default 'vngeoguessr:'). The
new Upstash DB can now be safely shared with other Vercel projects without
key collisions.

- src/lib/upstash.js: new adapter with getJson/putJson/del + zAdd/zRange/
  zScore/zRank/zRevRank/zRemRangeByRank helpers; reads UPSTASH_REDIS_REST_URL
  or KV_REST_API_URL aliases
- src/lib/session.js, src/lib/leaderboard.js: use the adapter; public APIs
  unchanged so api routes stay untouched
- src/lib/redis.js: removed
- scripts/migrate-upstash.js: one-shot copy from old TCP DB to new REST DB,
  prepending the prefix; idempotent, with --dry-run flag
- docs/tech-stack.md: reflect the new SDK and prefix model
2026-05-10 00:00:47 +07:00
dependabot[bot] f0f19508c4 chore(deps): bump next from 15.5.14 to 15.5.15 (#16)
Bumps [next](https://github.com/vercel/next.js) from 15.5.14 to 15.5.15.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.14...v15.5.15)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.15
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 13:33:17 +07:00
dependabot[bot] b462c7b2db chore(deps): bump uuid from 11.1.0 to 14.0.0 (#17)
Bumps [uuid](https://github.com/uuidjs/uuid) from 11.1.0 to 14.0.0.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v11.1.0...v14.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-version: 14.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 13:33:14 +07:00
dependabot[bot] 70e96ddd66 chore(deps): bump minimatch (#10)
Bumps  and [minimatch](https://github.com/isaacs/minimatch). These dependencies needed to be updated together.

Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

Updates `minimatch` from 9.0.5 to 9.0.9
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
- dependency-name: minimatch
  dependency-version: 9.0.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 17:13:27 +07:00
dependabot[bot] 9a2432dcb8 chore(deps-dev): bump tar from 7.4.3 to 7.5.11 (#12)
Bumps [tar](https://github.com/isaacs/node-tar) from 7.4.3 to 7.5.11.
- [Release notes](https://github.com/isaacs/node-tar/releases)
- [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-tar/compare/v7.4.3...v7.5.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 7.5.11
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 17:13:23 +07:00
dependabot[bot] 0d32ef520f chore(deps-dev): bump flatted from 3.3.3 to 3.4.2 (#13)
Bumps [flatted](https://github.com/WebReflection/flatted) from 3.3.3 to 3.4.2.
- [Commits](https://github.com/WebReflection/flatted/compare/v3.3.3...v3.4.2)

---
updated-dependencies:
- dependency-name: flatted
  dependency-version: 3.4.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 17:13:20 +07:00
dependabot[bot] 99e2ec9c6a chore(deps): bump picomatch (#15)
Bumps  and [picomatch](https://github.com/micromatch/picomatch). These dependencies needed to be updated together.

Updates `picomatch` from 2.3.1 to 2.3.2
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

Updates `picomatch` from 4.0.3 to 4.0.4
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
- dependency-name: picomatch
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 17:13:17 +07:00
dependabot[bot] af2455fc1c chore(deps): bump next from 15.5.9 to 15.5.14 (#14)
Bumps [next](https://github.com/vercel/next.js) from 15.5.9 to 15.5.14.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.9...v15.5.14)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.14
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-10 17:13:09 +07:00
tiennm99 99d0ab6d56 feat(ui): replace gradient glassmorphism with soft clean design
Swap dark animated gradient background for light solid bg, glassmorphism
cards for clean white cards, and remove pulse/glow animations. Keep
Vietnamese red as accent color.
2026-04-04 10:12:14 +07:00
tiennm99 9279439f8c add claude settings with Vercel plugin enabled 2026-04-04 09:20:59 +07:00
tiennm99 f58832796a remove settings.local.json from git tracking 2026-04-04 09:18:04 +07:00
tiennm99 5c2064dfca fix(mapillary): subdivide large bboxes to fit API area limit
Mapillary API rejects bboxes exceeding 0.01 sq degrees with HTTP 500.
City bboxes (e.g. TPHCM=0.016) exceeded this limit. Now picks random
sub-bboxes within the city area and retries up to 5 times to find coverage.
2026-04-04 09:10:20 +07:00
tiennm99 9bee409f52 feat(ui): Vietnamese-themed redesign with glassmorphism and improved components
- Add Vietnamese-themed CSS with gradient backgrounds, animations, and brand color variables
- Redesign homepage with gradient hero, glassmorphism cards, and leaderboard component
- Improve game page loading fallback with spinner
- Enhance GameClient with compact header, polished result modal, and retry logic
- Extract LeaderboardList as reusable component
- Make DonateQRModal responsive instead of hardcoded dimensions
- Polish UsernameModal visuals
2026-04-04 00:23:41 +07:00
tiennm99 95dfe57913 Update package-lock.json 2026-01-22 15:47:28 +07:00
Tien Nguyen Minh ecadfceffd Merge pull request #4 from tiennm99/dependabot/npm_and_yarn/next-15.5.9
chore(deps): bump next from 15.5.2 to 15.5.9
2026-01-09 10:20:17 +07:00
dependabot[bot] 3c72e179a0 chore(deps): bump next from 15.5.2 to 15.5.9
Bumps [next](https://github.com/vercel/next.js) from 15.5.2 to 15.5.9.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.5.2...v15.5.9)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-11 22:59:41 +00:00
tiennm99 f276e73c8a Revert "feat(schedule): change to run every hour"
This reverts commit d807504b6c.
2025-11-26 19:43:23 +07:00
tiennm99 d807504b6c feat(schedule): change to run every hour 2025-11-26 19:42:28 +07:00
Tien Nguyen Minh acbb7d030e Merge pull request #2 from tiennm99/dependabot/npm_and_yarn/js-yaml-4.1.1
chore(deps-dev): bump js-yaml from 4.1.0 to 4.1.1
2025-11-26 19:40:43 +07:00
dependabot[bot] 776dcc2160 chore(deps-dev): bump js-yaml from 4.1.0 to 4.1.1
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.1.1
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-16 14:11:06 +00:00
tiennm99 be06f69005 feat(cron): add vercel cron job 2025-10-08 20:39:29 +07:00
Tien Nguyen Minh d3c3c30f1e Merge pull request #1 from vngeoguessr/dependabot/npm_and_yarn/next-15.5.2
chore(deps): bump next from 15.4.6 to 15.5.2
2025-10-08 20:29:15 +07:00
dependabot[bot] 55c86546d2 chore(deps): bump next from 15.4.6 to 15.5.2
Bumps [next](https://github.com/vercel/next.js) from 15.4.6 to 15.5.2.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v15.4.6...v15.5.2)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 15.5.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-30 14:53:33 +00:00
tiennm99 d1bb98d6c5 feat: extend mapillary limit and add debug log 2025-08-18 22:48:58 +07:00
tiennm99 22a51cf4f7 feat: skip not reload 2025-08-18 22:27:14 +07:00
tiennm99 82784025d8 feat: enable/disable cities 2025-08-18 22:23:44 +07:00
tiennm99 2d555de7c8 feat: update theme 2025-08-18 22:19:37 +07:00
tiennm99 c1c28983fd feat: score by distance 2025-08-16 18:07:45 +07:00
tiennm99 6daa210a7f feat: separate leaderboard by cities 2025-08-16 17:11:58 +07:00
tiennm99 1b31b38bcc feat: change to total score 2025-08-16 16:56:09 +07:00
tiennm99 2b5359e3cb feat: update docs 2025-08-16 16:47:46 +07:00
tiennm99 e64a66d64d feat(qr): separate component 2025-08-16 09:01:25 +07:00
tiennm99 363b62b1a4 feat: update qr 2025-08-16 08:47:59 +07:00
tiennm99 1a27e2d596 feat: stash 2025-08-16 08:30:26 +07:00
tiennm99 ad0984e0c4 feat: add shadcn components 2025-08-09 17:34:41 +07:00
tiennm99 90710e337d feat: add uuid 2025-08-09 16:49:28 +07:00