neuron-explorer
Qwen3.5‑4B 전용 조향형 뉴런 탐색기, 모든 MLP 뉴런을 밀어 결과를 보관·탐색
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
An interactive web application that visualizes and compares sorting algorithms side by side in real time.
All algorithms sort the same shuffled dataset at the same playback speed, making it intuitive to observe differences in strategy, comparisons, and swap efficiency.README 전문 보기 ↗An interactive web application that visualizes and compares sorting algorithms side by side in real time.
All algorithms sort the same shuffled dataset at the same playback speed, so you can see how they differ in strategy, comparisons, and data movement.
Sorting and playback are separated:
flowchart LR
Input["Initial Shuffled Array"] --> Gen["Pure Step Generator<br>(build*Steps)"]
Gen -->|"Array of Step objects<br>(compare, swap, pivot, etc.)"| State["Playback Engine<br>(App State & Timer)"]
State -->|"Immutable Board State"| UI["React Components<br>(Bar Rendering & Overlays)"]
src/plugins/visualizer.ts that sorts a copy of the input and records the whole process as an array of Step objects (compare, swap, write, and so on).src/App.tsx applies one step to each board per tick of the animation timer, without re-running the sort.yarn typecheck runs TypeScript 7 (tsc, installed as @typescript/native). The typescript package is an alias of @typescript/typescript6, which provides the TypeScript 6 API that typescript-eslint needs, because TypeScript 7 does not ship an API yet. This follows Running side-by-side with TypeScript 6.0.
The project is configured to run inside Docker. Node.js on the host is needed only for the pre-commit hook when it runs there (see Pre-commit Hook), and optionally for type resolution in an editor running on the host.
The Node.js version is set in .nvmrc. CI and the production build on Render read it, and the Docker image uses the same major version. Update them together.
Dependencies are managed with Yarn 1 (Classic). The Docker image ships Yarn 1, and in CI Corepack uses its default, Yarn 1, because package.json has no packageManager field. CI installs with yarn install --frozen-lockfile, which fails when package.json has a dependency or version range that yarn.lock does not include. After changing dependencies, update yarn.lock in the container (for example with yarn add or yarn install) and commit it together with package.json.
# Start dev server with hot reload
docker compose up -d --build
The application is served at:
Each checkout, including each git worktree, runs as its own Compose project with its own container. They all publish host port 1234 by default, though, so only one dev server can use it at a time. To run another checkout's server alongside, pick a different host port with DEV_PORT:
DEV_PORT=1235 docker compose up -d --build
That server is then at http://localhost:1235/ja/ and http://localhost:1235/en/. Pass the same DEV_PORT whenever you run docker compose up again in that checkout; docker compose exec does not need it.
If your editor supports VS Code Dev Containers:
Run commands inside the running container:
# Execute tests
docker compose exec -T app bash -c 'yarn test'
# Type check, lint, format check, and test in one go
docker compose exec -T app bash -c 'yarn typecheck && yarn lint && yarn format && yarn test'
| Command | Description |
|---|---|
yarn dev | Starts Parcel dev server |
yarn build | Builds the production bundle into public/, with asset URLs pointing to the production site so Open Graph images are absolute |
yarn typecheck | Validates TypeScript types (tsc --noEmit) |
yarn lint / yarn lint:fix | Runs ESLint / applies auto-fixes |
yarn format / yarn format:fix | Checks / applies Prettier formatting |
yarn test | Runs Vitest unit and UI test suite |
A Husky pre-commit hook runs lint-staged on staged files. It runs inside the app container when that service is running, and on the host otherwise.
In a git worktree, the container mounts only the worktree, so the shared .git directory is not visible inside it. The hook therefore always runs on the host there, which requires host dependencies. Install them with the Node.js version from .nvmrc (for example, after nvm use):
COREPACK_ENABLE_AUTO_PIN=0 yarn install --frozen-lockfile
For the same reason, Husky's prepare script prints a git error during the container's install in a worktree. The error is harmless and does not stop the install.
src/
├── App.tsx # Main layout, playback loop, and board states
├── plugins/ # Step types and step generators (visualizer.ts), i18n setup (i18n.ts)
├── components/ # Shared UI controls, bars, and per-algorithm overlays
│ ├── ControlBar.tsx
│ ├── SortSection.tsx
│ └── algorithms/ # Visual representations & legends for each algorithm
├── ja/, en/ # Localized HTML templates and dictionary strings
└── __tests__/ # Logic tests and UI component specifications