-
-
Notifications
You must be signed in to change notification settings - Fork 58
chore: added claude code setup #967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bca6535
chore: added claude code setup
maciejmakowski2003 69e3f98
Merge branch 'main' into chore/claude-code-setup
maciejmakowski2003 4c14a67
feat: implemented granual skills for certain tasks in this repo for c…
poneciak57 8975fae
fix: deleted some slop skills
poneciak57 c4859a2
fix: fixed more slop
poneciak57 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/claude-code-settings.json", | ||
| "respectGitignore": true, | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(yarn build)", | ||
| "Bash(yarn lint*)", | ||
| "Bash(yarn format*)", | ||
| "Bash(yarn typecheck)", | ||
| "Bash(yarn test)", | ||
| "Bash(yarn check-audio-enum-sync)", | ||
| "Bash(yarn workspace *)", | ||
| "Bash(git status)", | ||
| "Bash(git diff*)", | ||
| "Bash(git log*)", | ||
| "Bash(git branch*)", | ||
| "Bash(git show*)", | ||
| "Bash(cmake *)", | ||
| "Bash(clang-format *)", | ||
| "Bash(node *)", | ||
| "Bash(npx prettier*)" | ||
| ], | ||
| "ask": [ | ||
| "Bash(git add*)", | ||
| "Bash(git commit*)", | ||
| "Bash(git push*)", | ||
| "Bash(git merge*)", | ||
| "Bash(git rebase*)", | ||
| "Bash(git reset*)", | ||
| "Bash(git checkout *)", | ||
| "Bash(git stash*)", | ||
| "Bash(yarn clean)" | ||
| ], | ||
| "deny": [ | ||
| "Bash(git push --force*)", | ||
| "Bash(rm -rf *)", | ||
| "Bash(sudo *)", | ||
|
|
||
| "Read(**/node_modules/**)", | ||
| "Read(**/Pods/**)", | ||
| "Read(**/vendor/bundle/**)", | ||
|
|
||
| "Read(**/build/**)", | ||
| "Read(**/lib/**)", | ||
| "Read(**/.turbo/**)", | ||
| "Read(**/.gradle/**)", | ||
| "Read(**/.cxx/**)", | ||
| "Read(**/.kotlin/**)", | ||
| "Read(**/DerivedData/**)", | ||
| "Read(**/*.xcuserstate)", | ||
| "Read(**/*.pbxuser)", | ||
| "Read(**/*.hmap)", | ||
| "Read(**/*.ipa)", | ||
|
|
||
| "Read(**/jniLibs/**)", | ||
| "Read(**/*.a)", | ||
| "Read(**/*.xcframework/**)", | ||
| "Read(**/ffmpeg_ios/**)", | ||
| "Read(**/openssl-prebuilt/**)", | ||
| "Read(**/prebuilt_libs/**)", | ||
| "Read(**/output/**)", | ||
|
|
||
| "Read(**/CMakeFiles/**)", | ||
|
|
||
| "Read(yarn.lock)", | ||
| "Read(**/Gemfile.lock)", | ||
| "Read(**/Podfile.lock)", | ||
|
|
||
| "Read(**/*.png)", | ||
| "Read(**/*.jpg)", | ||
| "Read(**/*.jpeg)", | ||
| "Read(**/*.gif)", | ||
| "Read(**/*.webp)", | ||
| "Read(**/*.ico)", | ||
| "Read(**/*.svg)", | ||
| "Read(**/*.ttf)", | ||
| "Read(**/*.otf)", | ||
| "Read(**/*.woff)", | ||
| "Read(**/*.woff2)", | ||
| "Read(**/*.mp3)", | ||
| "Read(**/*.wav)", | ||
| "Read(**/*.ogg)", | ||
| "Read(**/*.aac)" | ||
| ] | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Repository Overview | ||
|
|
||
| `react-native-audio-api` is a high-performance Web Audio API-compatible audio engine for React Native, maintained by Software Mansion. It provides audio playback, recording, DSP processing, and real-time analysis across iOS, Android, and Web. | ||
|
|
||
| ## Commands | ||
|
|
||
| ### Root (Monorepo) | ||
| ```bash | ||
| yarn build # Build all workspaces | ||
| yarn lint # Lint all workspaces | ||
| yarn format # Format all code | ||
| yarn typecheck # TypeScript type checking | ||
| yarn test # Run C++ tests via RunTests.sh | ||
| yarn clean # Remove build artifacts and node_modules | ||
| yarn check-audio-enum-sync # Validate AudioEvent enum synchronization | ||
| ``` | ||
|
|
||
| ### Main Package (`packages/react-native-audio-api`) | ||
| ```bash | ||
| yarn lint:js # ESLint for TypeScript/JavaScript | ||
| yarn lint:cpp # C++ linting (cpplint) | ||
| yarn lint:ios # iOS Objective-C++ format checks | ||
| yarn lint:kotlin # Kotlin linting (Android) | ||
|
|
||
| yarn format:js # Prettier | ||
| yarn format:common # clang-format for shared C++ | ||
| yarn format:android:cpp # clang-format for Android C++ | ||
| yarn format:android:kotlin # KtLint | ||
| yarn format:ios # clang-format for iOS | ||
| ``` | ||
|
|
||
| ### Tests | ||
| - **C++ tests**: `yarn test` from root runs `packages/react-native-audio-api/common/cpp/test/RunTests.sh` using CMake + Google Test | ||
| - **JS tests**: Jest with preset `react-native`, test files in `packages/react-native-audio-api/tests/` matching `**/*.test.ts` | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Monorepo Structure | ||
| ``` | ||
| packages/react-native-audio-api/ # Main library | ||
| apps/common-app/ # Example RN app | ||
| apps/fabric-example/ # New Architecture example app | ||
| packages/audiodocs/ # Documentation | ||
| packages/custom-node-generator/ # Code generation tooling | ||
| ``` | ||
|
|
||
| ### Layers (from JS to hardware) | ||
|
|
||
| 1. **TypeScript API** (`packages/react-native-audio-api/src/`) | ||
| - `src/core/` — Web Audio API node implementations (GainNode, BiquadFilterNode, etc.) | ||
| - `src/web-core/` / `src/web-system/` — Browser Web Audio API passthrough | ||
| - `src/system/` — Platform-specific session/permission/device management | ||
| - `src/specs/` — TurboModule specs (native method signatures) | ||
| - `src/hooks/`, `src/events/`, `src/utils/`, `src/mock/` | ||
|
|
||
| 2. **C++ Engine** (`packages/react-native-audio-api/common/cpp/audioapi/`) | ||
| - `core/` — Audio node engine (sources, destinations, effects, analysis, inputs) | ||
| - `dsp/` — DSP algorithms with SIMD optimization (ARM NEON, x86 SSE2) | ||
| - `HostObjects/` — JSI bridge objects (C++ ↔ JavaScript) | ||
| - `jsi/` — JavaScript Interface bindings | ||
| - `events/` — Audio thread event system | ||
| - `libs/` — Third-party library wrappers | ||
| - `external/` — Prebuilt binaries: FFmpeg, Opus, Ogg, Vorbis, OpenSSL | ||
|
|
||
| 3. **Android Native** (`android/`) | ||
| - CMake + Gradle build | ||
| - Kotlin modules in `src/main/java/com/swmansion/audioapi/` | ||
| - C++ glue in `src/main/cpp/audioapi/` | ||
| - Uses Oboe 1.9.3 for high-performance audio I/O | ||
|
|
||
| 4. **iOS Native** (`ios/audioapi/ios/`) | ||
| - Objective-C++ (`.mm` files) | ||
| - CocoaPods via `RNAudioAPI.podspec` | ||
| - Prebuilt FFmpeg frameworks downloaded at pod install | ||
|
|
||
| ### Key Architectural Patterns | ||
| - **JSI**: Audio nodes are exposed as C++ JSI HostObjects — no bridge serialization | ||
| - **Audio Thread Safety**: Real-time audio processing happens on a dedicated audio thread; JS-side calls must not block it | ||
| - **Dual Platform**: TypeScript code has separate paths for React Native (native engine) and Web (delegates to browser Web Audio API) | ||
| - **New Architecture Ready**: Supports both old Bridge and new TurboModules/Fabric | ||
| - **Optional FFmpeg**: Audio decoding via FFmpeg can be conditionally compiled out | ||
| - **Audio Worklets**: JavaScript runs on the audio thread via React Native Worklets | ||
|
poneciak57 marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Native Module Entry Points | ||
| - iOS: `ios/audioapi/ios/AudioAPIModule.mm` | ||
| - Android: `android/src/main/java/com/swmansion/audioapi/AudioAPIModule.kt` | ||
| - TurboModule spec: `src/specs/NativeAudioAPIModule.ts` | ||
|
|
||
| ## Development Notes | ||
|
|
||
| - **Node version**: 18 (see `.nvmrc`) | ||
| - **Package manager**: Yarn 4.5.0 (workspaces) | ||
| - **Pre-commit hooks**: `lefthook` runs format, lint, typecheck, and commitlint automatically | ||
| - **C++ formatting**: `.clang-format` at repo root defines the style; always run `yarn format:common` after editing shared C++ | ||
| - **Minimum targets**: iOS 14.0+, Android API 21+, React Native 0.76+ | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.