npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@sakamotoapp/core

v0.1.18

Published

A core library for sakamotoapp

Readme

📚 PROJECT_STRUCTURE.md

🎯 基本方針

  • src直下に「汎用役割」または「領域ごと」のディレクトリを作成する
  • ディレクトリ名は 必ず複数形 に統一する(例: components, hooks, contexts, utils, libs)
  • すべてのエクスポートはsrc/index.tsから一元化する
  • 必ずpnpm check:exportsでexport漏れ・default export禁止をチェックする
  • 必ずpnpm fix-aliasesで@エイリアスを相対パスに自動置換してからビルドする
  • 必要に応じて領域(ドメイン)ごとにサブディレクトリ(three, realtimeなど)を設ける
  • 未来の拡張に強い構造を維持する

📦 ディレクトリ構成例

src/
  components/
    ui/
      button.tsx
      card.tsx
      slider.tsx
    layout/
    feedback/
  hooks/
    useDeepCompareState/
      useDeepCompareState.tsx
    useDropFile/
      useDropFile.tsx
    useRealtimeParam/
      RealtimeParamContext.tsx
      useRealtimeParam.tsx
      useRealtimeParamWithContext.tsx
  utils/
    numberUtils/
    stringUtils/
  contexts/
    realtimeSAB/
      RealtimeSABContext.tsx
      RealtimeSABContext.worker.ts
    realtimeParam/
      RealtimeParamContext.tsx
  libs/
    ffmpegUtils.ts
    mediaRecorder.ts
  three/
    components/
      ui/
        ThreeCanvas.tsx
      objects/
        Cube.tsx
      helpers/
        AxesHelper.tsx
    hooks/
      useThreeRenderer/
        useThreeRenderer.tsx
      useCameraControls/
        useCameraControls.tsx
    utils/
      threeHelpers.ts
  types/
    shared.ts

  index.ts

🏛 フォルダごとの意味・ルール

| フォルダ | 内容 | 備考 | |:--|:--|:--| | components/ | 汎用UI部品群 | 必ずサブフォルダ分類(ui/, layout/, feedback/など) | | hooks/ | 汎用React hooks群 | useXxxごとにサブフォルダを作る | | utils/ | 小さなユーティリティ関数群 | テーマ別にまとめる(例: numberUtils/) | | contexts/ | Context APIを使った状態管理ツリー | 1Context 1サブフォルダ推奨 | | libs/ | 小さなライブラリ的な補助関数群 | 領域横断的な汎用コード | | [ドメイン]/ | 特定領域(three/, realtime/など) | ドメイン単位でcomponents/hooks/utils分類 |


🚀 将来拡張ルール

  • 新たなテーマが登場したらsrc直下に追加(例: "vision/" "audio/")
  • サブフォルダ化は常に "人間が即座に理解できる単位" を意識する
  • src直下の全てに複数形適用(例外なし)
  • エクスポートは常にindex.ts出口管理(export chain構築)
  • スクリプト群(check-exports.mjs, replace-aliases.mjs)は常に最新src構造に追従させる

🛠️ チェック・メンテナンス用スクリプト

🔍 pnpm check:exports

  • 全src以下のts/tsxファイルをスキャン
  • "exportしているがindex.ts経由で外部exportされていない"ファイルを検出
  • "default export"が使われていないかもチェック
  • 問題があればエラー終了

🔧 pnpm fix-aliases

  • src以下の全.ts/.tsxファイルで、@/xxx 形式のインポートを適切な相対パスに変換
  • 深さに応じた../補正を自動適用
  • 未来のビルドエラーを未然に防ぐ

✨ これらのスクリプトはビルド前必須のプロセスとすることを推奨!


🎯 以上

これに従えば、あなたのプロジェクトは

"世界トップクラスのモノレポ設計品質"

を常に維持できます!!!!!!!!!!🚀✨✨✨✨✨


(最後に: これに新しい領域や例外ルールを加えたい場合は随時追記OK!)

🔥 Let's keep it professional!! 🔥

npm への公開/更新 スクリプト

coreライブラリに移動

cd packages/core

まずはversionを上げる

pnpm ver:patch // バグ修正
or 
pnpm ver:minor // 機能追加
or
pnpm ver:major // 大きな変更

その後、gitにpush

つまり、versionを上げたら、必ずgitにpushすること

git add .
git commit -m "version up"
git push

その後、npmにpublish

pnpm pub