Add pack registry & docs site #444

Merged
LunarTides merged 75 commits from registry into main 2026-01-05 08:47:31 +00:00
LunarTides commented 2025-12-26 12:20:18 +00:00 (Migrated from github.com)

Closes #427
Closes #435

I have a few ideas about what features the registry can support:

Necessary

These are absolutely necessary for this PR to land.

  • Packs
    • Add Pack db column.
    • Parse meta.jsonc.
    • Add fields to the row.
    • Add likes.
    • Add dislikes.
    • Allow showing the code in packs.
    • Approved by. Allows seeing who approved the version.
    • Self-moderation
      • Edit
        • Allow changing metadata from the pack page.
      • Delete
        • Versions
          • Handle deleting all versions manually.
        • All
    • Moderation
      • Un(list)
    • Reporting
  • Cards
    • Add Card db column.
    • Add card representation. See how it looks like in Hearthstone.js, and Vanilla, as an actual card.
      • Parse color tags.
    • Reporting
  • Searching
    • Search packs by uuid or name.
    • Search cards by uuid or name.
      • Show the pack the card is from.
      • Order by download count.
    • Add support for searching in-game.
  • Add versions.
    • Add versions for packs.
    • Add versions for cards.
    • Add isLatestVersion on packs / cards.
    • Make pack names non-unique for packs with the same uuid.
    • Validate semver for pack version.
    • Save packs to /static/assets/packs/{packUUID}/{packVersion}/{packUUID}.7z
  • Download.
    • Route / API
    • Disallow accessing /static/assets directly.
    • Add download count.
    • Add support for downloading in-game.
  • Upload
    • Parse blueprints after extracting pack.
    • Add all bp fields to the row.
    • Connect authors to accounts if possible. Allow connecting author accounts after the fact on the pack's page.
    • Add limiting who can edit the pack.
    • Add support for uploading in-game.
  • Bugs
    • Search packs doesn't show loading, it waits for the result before loading the page.
  • Other
    • TODO
      • Upload
        • Parse enchantment priority correctly.
        • Guard against symlinks.
        • Guard against zip bombs.
        • Validate metadata with zod.
        • Reject proprietary packs.
        • Delete pack from db if adding cards goes wrong.
        • Validate card (blueprint) with zod.
        • Add support for links.
      • Search filter packs by approved.
      • Make searching smarter.
      • Add pagination to search frontend.
      • Color names / rarity of cards by their rarity.
      • Show heropowers in cards.
      • Add proper support for requires.
    • Add components folder for easy reuse.
    • Add proper API so that it can be queried from the game.
    • Add links to the other pages (#428 #435)
    • Add new CI workflow for the website.
  • Moderation tools
    • Add approving packs (toggleable)

Extra

These will still be done, but they're less important.

  • Profile
    • About me, pronouns, etc...
    • See packs and cards
      • Waiting for approval tag.
    • Reporting
    • Self-moderation
      • Delete account
    • Moderation tools
      • Delete pack
      • Rename pack
      • Ban account
      • ...
  • Comments
    • Add support for commenting on:
      • Packs
        • Display comments
        • Like comments
        • Post comment
        • Authors can heart comments on their profile. (Can NOT delete.)
      • Cards
        • Authors can heart comments on their profile. (Can NOT delete.)
      • User profile
        • User can delete / heart comments on their profile.
    • Likes
    • Reporting
    • Self-moderation.
    • Moderation.
  • Notifications
    • Your pack has been approved! (Click to view)
    • You have been given moderator status.
    • You have been mentioned in the comments of a pack.
  • Moderation tools
    • Add review tools for approving packs.
      • GitHub-style tree to view files and folders. Click on the left to copy link. (Use # navigation.)
        • Internal notes. (This line looks suspicious. Can you look at it @ExampleModerator?)
    • Dashboard.
      • Search
      • Delete pack
      • Rename pack
      • Ban account
        • Delete comments or orphan them (show commenter as "Deleted User").
      • Settings
        • Page size
        • Enable approve system
        • Max pack size
        • Max pack file amount
        • Pack allowed extensions
        • Allow
          • Creating accounts (Admins can bypass)
          • Logging in
          • Uploading packs
          • Downloading packs
          • ...
        • ...
      • ...
    • Event system. Alert moderator when an event happens. This is so that I get alerted every time someone uploads a pack, so that I can review it. (RSS feed?)
      • Discord bot?
Closes #427 Closes #435 I have a few ideas about what features the registry can support: ### Necessary > These are absolutely necessary for this PR to land. - [x] Packs - [x] Add `Pack` db column. - [x] Parse `meta.jsonc`. - [x] Add fields to the row. - [x] Add likes. - [x] Add dislikes. - [x] Allow showing the code in packs. - [x] Approved by. Allows seeing who approved the version. - [ ] Self-moderation - [ ] Edit - [ ] Allow changing metadata from the pack page. - [x] Delete - [x] Versions - [ ] Handle deleting all versions manually. - [x] All - [ ] Moderation - [ ] Un(list) - [ ] Reporting - [x] Cards - [x] Add `Card` db column. - [ ] Add card representation. See how it looks like in Hearthstone.js, and Vanilla, as an actual *card*. - [ ] Parse color tags. - [ ] Reporting - [x] Searching - [x] Search packs by uuid or name. - [x] Search cards by uuid or name. - [x] Show the pack the card is from. - [x] Order by download count. - [ ] Add support for searching in-game. - [x] Add versions. - [x] Add versions for packs. - [x] Add versions for cards. - [x] Add `isLatestVersion` on packs / cards. - [x] Make pack names non-unique for packs with the same uuid. - [x] Validate semver for pack version. - [x] Save packs to `/static/assets/packs/{packUUID}/{packVersion}/{packUUID}.7z` - [x] Download. - [x] Route / API - [x] Disallow accessing `/static/assets` directly. - [x] Add download count. - [ ] Add support for downloading in-game. - [x] Upload - [x] Parse blueprints after extracting pack. - [x] Add *all* bp fields to the row. - [ ] Connect authors to accounts if possible. Allow connecting author accounts after the fact on the pack's page. - [ ] Add limiting who can edit the pack. - [ ] Add support for uploading in-game. - [ ] Bugs - [ ] Search packs doesn't show loading, it waits for the result before loading the page. - [ ] Other - [ ] TODO - [ ] Upload - [ ] Parse enchantment priority correctly. - [ ] Guard against symlinks. - [ ] Guard against zip bombs. - [ ] Validate metadata with zod. - [ ] Reject proprietary packs. - [ ] Delete pack from db if adding cards goes wrong. - [ ] Validate card (blueprint) with zod. - [ ] Add support for links. - [x] Search filter packs by approved. - [ ] Make searching smarter. - [ ] Add pagination to search frontend. - [ ] Color names / rarity of cards by their rarity. - [ ] Show heropowers in cards. - [ ] Add proper support for requires. - [ ] Add components folder for easy reuse. - [x] Add proper API so that it can be queried from the game. - [ ] Add links to the other pages (#428 #435) - [ ] Add new CI workflow for the website. - [ ] Moderation tools - [x] Add approving packs (toggleable) ### Extra > These will still be done, but they're less important. - [x] Profile - [x] About me, pronouns, etc... - [x] See packs ~~and cards~~ - [x] Waiting for approval tag. - [ ] Reporting - [ ] Self-moderation - [ ] Delete account - [ ] Moderation tools - [ ] Delete pack - [ ] Rename pack - [ ] Ban account - [ ] ... - [ ] Comments - [ ] Add support for commenting on: - [x] Packs - [x] Display comments - [x] Like comments - [x] Post comment - [x] Authors can heart comments on their profile. (Can NOT delete.) - [ ] Cards - [ ] Authors can heart comments on their profile. (Can NOT delete.) - [ ] User profile - [ ] User can delete / heart comments on their profile. - [x] Likes - [ ] Reporting - [x] Self-moderation. - [ ] Moderation. - [x] Notifications - [x] Your pack has been approved! (Click to view) - [x] You have been given moderator status. - [ ] You have been mentioned in the comments of a pack. - [ ] Moderation tools - [x] Add review tools for approving packs. - [ ] GitHub-style tree to view files and folders. Click on the left to copy link. (Use # navigation.) - [ ] Internal notes. (This line looks suspicious. Can you look at it @ExampleModerator?) - [x] Dashboard. - [ ] Search - [ ] Delete pack - [ ] Rename pack - [ ] Ban account - [ ] Delete comments or orphan them (show commenter as "Deleted User"). - [x] Settings - [x] Page size - [x] Enable approve system - [x] Max pack size - [x] Max pack file amount - [x] Pack allowed extensions - [ ] Allow - [ ] Creating accounts (Admins can bypass) - [ ] Logging in - [ ] Uploading packs - [ ] Downloading packs - [ ] ... - [ ] ... - [ ] ... - [x] Event system. Alert moderator when an event happens. This is so that I get alerted every time someone uploads a pack, so that I can review it. (RSS feed?) - [ ] Discord bot?
coderabbitai[bot] commented 2025-12-26 12:20:23 +00:00 (Migrated from github.com)

Important

Review skipped

Too many files!

18 files out of 168 files are above the max files limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- This is an auto-generated comment: skip review by coderabbit.ai --> > [!IMPORTANT] > ## Review skipped > > Too many files! > > 18 files out of 168 files are above the max files limit of 150. > > You can disable this status message by setting the `reviews.review_status` to `false` in the CodeRabbit configuration file. <!-- end of auto-generated comment: skip review by coderabbit.ai --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=LunarTides/Hearthstone.js&utm_content=444)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end -->
LunarTides commented 2026-01-01 00:21:34 +00:00 (Migrated from github.com)

The scope for this pr just keeps increasing... Most of the changes are localized in the new sites folder anyway, so I don't think it matters much, but it means this pr might be in development for a while.

The scope for this pr just keeps increasing... Most of the changes are localized in the new `sites` folder anyway, so I don't think it matters much, but it means this pr might be in development for a *while*.
LunarTides commented 2026-01-05 08:47:28 +00:00 (Migrated from github.com)

Look at #446 and #447

Look at #446 and #447
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LunarTides/Hearthstone.js!444
No description provided.