A reimplementation of that one website in Fresh.js
Find a file
Ayase Minori 2d82486c48 fix: Fix socket state and onClick function in CounterCard
Fix socket state initialization, onClick function, and modify component rendering in CounterCard
2023-11-22 06:51:17 +00:00
.codesandbox Fix conflicts 2023-09-11 03:17:12 +00:00
.devcontainer feat: Update devcontainer image from Ubuntu to Debian 2023-10-21 07:11:15 +00:00
.github allow blank issues 2023-10-22 16:44:00 +08:00
.vscode Properly encode responses 2023-09-11 04:57:06 +00:00
components feat: Add Partytown and update MarkdownContent import paths 2023-11-22 05:48:25 +00:00
home_content feat: Update CounterCard and MarkdownContent styles 2023-10-21 13:24:38 +00:00
islands fix: Fix socket state and onClick function in CounterCard 2023-11-22 06:51:17 +00:00
routes feat: Add Partytown and update MarkdownContent import paths 2023-11-22 05:48:25 +00:00
shared refactor: Update dependencies and refactor code (#18) 2023-10-24 00:11:50 +08:00
static feat: Add Partytown and update MarkdownContent import paths 2023-11-22 05:48:25 +00:00
.gitignore Initial Commit 2023-09-10 20:22:22 +08:00
deno.json feat: Add Partytown and update MarkdownContent import paths 2023-11-22 05:48:25 +00:00
dev.ts Initial Commit 2023-09-10 20:22:22 +08:00
fresh.config.ts Fix twind definition for v1 2023-10-21 08:17:17 +00:00
fresh.gen.ts fix: Fix socket state and onClick function in CounterCard 2023-11-22 06:51:17 +00:00
LICENSE Add le license 2023-09-19 13:53:35 +08:00
main.ts SEO 2023-10-21 08:31:40 +00:00
README.md Update takeback public analytics page in README 2023-10-28 16:49:22 +08:00
twind.config.ts Fix Tailwind Preset using incompatible npm package 2023-10-21 16:14:57 +08:00

Herta Kuru (v2)!

Visit the Site | Check who's visiting it too! | Open in CodeSandbox

This is a proof-of-concept implementation of duiqt/herta_kuru with a global statistics feed, this time, it's a little more secure!

Background

Around a while ago, the original website's global statistics screen had been removed due to network abuse. I started investigating ways to reimplement this (embarassingly I made a PR that just adds a single useless line in the API), so I spent a few more weeks finding a way to implement it, until I got bored, and then I picked it up again.

The new system I implemented works using the following:

  • Using BroadcastChannels and WebSockets - we can send mutation events to update the counter, so this is practically realtime.
  • No API is actually exposed to the user, so no one can just take the statistics endpoint and just spam it, because the statistics server is also the website.
  • POSTing to the API is delayed by 5000ms (5s) before its submitted to the API in the frontend. While the provider does allow this, its due diligence to only submit it when there's inactivity.

Usage

Make sure to install Deno: https://deno.land/manual/getting_started/installation

Then start the project:

deno task start

This will watch the project directory and restart as necessary.

Credits

Original website by @duiqt, All Rights Reserved. Kuru-kuru gif is by @Seseren_kr. All rights Reserved.

Uses some assets from Honkai Star Rail. Copyright Cognosphere, All Rights Reserved. This website is not affiliated with Cognosphere/miHoYo.