Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
ace3174
Update task task-013
stanvx Jul 19, 2025
45c2c64
Update task task-013
stanvx Jul 19, 2025
79d75a2
Update task task-013
stanvx Jul 19, 2025
6a1db38
Update task task-013
stanvx Jul 19, 2025
1c1f8ae
Update task task-013
stanvx Jul 19, 2025
28352b6
Update task task-013
stanvx Jul 19, 2025
b717780
Update task task-013
stanvx Jul 19, 2025
19514f0
Update task task-013
stanvx Jul 19, 2025
4e697dd
Update task task-005
stanvx Jul 19, 2025
d596e75
Update task task-005
stanvx Jul 19, 2025
64295e0
Update task task-005
stanvx Jul 19, 2025
e73b50b
Update task task-005
stanvx Jul 19, 2025
57b7e11
Create task task-015
stanvx Jul 19, 2025
5cb0e97
feat: Implement quick record feature with accent color customization
stanvx Jul 19, 2025
b570394
Update task task-013
stanvx Jul 19, 2025
bdc1fa5
Create task task-016
stanvx Jul 19, 2025
66b2537
Update task task-016
stanvx Jul 19, 2025
7aa5d43
Add AI agent instructions
stanvx Jul 19, 2025
917a2a2
Create task task-017
stanvx Jul 19, 2025
22ebb85
Update task task-017
stanvx Jul 19, 2025
deeb397
Update task task-017
stanvx Jul 20, 2025
ecea502
Update task task-017
stanvx Jul 20, 2025
7d23bbb
Create task task-018
stanvx Jul 20, 2025
6a58512
Update task task-018
stanvx Jul 20, 2025
fd7a129
fix: resolve transcription race condition and resource management issues
stanvx Jul 20, 2025
7b6d089
Update task task-015
stanvx Jul 20, 2025
f7ffee9
Update task task-015
stanvx Jul 20, 2025
90ba742
Update task task-015
stanvx Jul 20, 2025
31c28ba
feat: migrate to Kotlin Multiplatform Android source set layout V2
stanvx Jul 20, 2025
a103b28
feat: integrate model download into onboarding flow
stanvx Jul 20, 2025
85040e6
feat: Enhance SpeedDialFAB with accessibility features and haptic fee…
stanvx Jul 20, 2025
744279b
Create task task-019
stanvx Jul 20, 2025
613d024
Update task task-019
stanvx Jul 20, 2025
a086a59
Update task task-019
stanvx Jul 20, 2025
75de1e4
Create task task-020
stanvx Jul 20, 2025
4fb2102
Create task task-021
stanvx Jul 20, 2025
65d4456
Create task task-022
stanvx Jul 20, 2025
2f9c1b8
Create task task-023
stanvx Jul 20, 2025
1af2df2
Create task task-024
stanvx Jul 20, 2025
e928ef2
Create task task-025
stanvx Jul 20, 2025
bc70d9f
Create task task-026
stanvx Jul 20, 2025
80eafec
Create task task-027
stanvx Jul 20, 2025
20db86f
Update task task-023
stanvx Jul 20, 2025
70f45ab
Update task task-023
stanvx Jul 20, 2025
8d608f6
Update task task-020
stanvx Jul 20, 2025
b2ed71d
Update task task-020
stanvx Jul 20, 2025
104dd18
Update task task-020
stanvx Jul 20, 2025
27870ea
Update task task-020
stanvx Jul 20, 2025
8a8bad3
Update task task-021
stanvx Jul 20, 2025
dc7bf07
Update task task-021
stanvx Jul 20, 2025
a5f86e4
Update task task-021
stanvx Jul 20, 2025
949d2ae
Update task task-021
stanvx Jul 20, 2025
3416f4e
Create task task-028
stanvx Jul 20, 2025
76469dc
Update task task-028
stanvx Jul 20, 2025
b802d83
Update task task-028
stanvx Jul 20, 2025
666c780
Update task task-028
stanvx Jul 20, 2025
78a2b1e
Update task task-028
stanvx Jul 20, 2025
1c84547
Create task task-029
stanvx Jul 21, 2025
89320e8
Update task task-029
stanvx Jul 21, 2025
dd7325f
Update task task-029
stanvx Jul 21, 2025
f5c63b9
feat: Implement Material Icon and Speed Dial Menu components
stanvx Jul 21, 2025
14a0c49
feat: Add calendar navigation and update MainScreenScaffold with new …
stanvx Jul 21, 2025
f2d7840
Create task task-030
stanvx Jul 22, 2025
09850fd
Update task task-030
stanvx Jul 22, 2025
41a41ce
Update task task-030
stanvx Jul 22, 2025
d4f4bbe
feat: Implement modern rich text toolbars with enhanced UI/UX
stanvx Jul 22, 2025
262a273
Create task task-031
stanvx Jul 22, 2025
d53e845
Create task task-032
stanvx Jul 22, 2025
aabcaa7
Create task task-033
stanvx Jul 22, 2025
ad9b1f6
Create task task-034
stanvx Jul 22, 2025
a018071
Create task task-035
stanvx Jul 22, 2025
2077e2a
Create task task-036
stanvx Jul 22, 2025
2c63911
Create task task-037
stanvx Jul 22, 2025
9e9f034
Create task task-038
stanvx Jul 22, 2025
1814e71
Create task task-039
stanvx Jul 22, 2025
386e2a2
feat: Enhance theming and UI components for notes
stanvx Jul 22, 2025
be7a101
Create task task-040
stanvx Jul 22, 2025
a267f5e
Create task task-041
stanvx Jul 22, 2025
8d5a257
Update task task-041
stanvx Jul 22, 2025
02bc791
feat: Implement advanced rich text animations, haptic feedback, posit…
stanvx Jul 23, 2025
f4dbbee
Add new Lottie animation for Ai Bot Large with multiple layers and sh…
stanvx Jul 23, 2025
75fd7d2
feat(audio): Implement AudioWaveformExtractor for waveform data extra…
stanvx Jul 25, 2025
d4078b6
Update task task-040
stanvx Jul 26, 2025
07ec87a
Update task task-040
stanvx Jul 26, 2025
21e3c11
Create task task-042
stanvx Jul 26, 2025
405023b
Create task task-043
stanvx Jul 26, 2025
b33fdbf
Update task task-038
stanvx Jul 26, 2025
6b5051c
Update task task-043
stanvx Jul 26, 2025
8bfe0d8
Update task task-043
stanvx Jul 26, 2025
b09b9a4
feat: Implement context-aware toolbar for rich text editing with adap…
stanvx Jul 26, 2025
b491151
backlog: Add document doc-001
stanvx Jul 26, 2025
491ac97
Create task task-044
stanvx Jul 26, 2025
e12552b
Create task task-045
stanvx Jul 26, 2025
027ece7
Create task task-046
stanvx Jul 26, 2025
df9391a
Create task task-047
stanvx Jul 26, 2025
7e089fb
backlog: Add document doc-001
stanvx Jul 26, 2025
51e29ee
Update task task-044
stanvx Jul 26, 2025
0868980
Update task task-044
stanvx Jul 26, 2025
a3e2ac4
Update task task-046
stanvx Jul 26, 2025
1406332
Update task task-046
stanvx Jul 26, 2025
ca59faf
Update task task-045
stanvx Jul 26, 2025
6cef6ff
Update task task-046
stanvx Jul 26, 2025
ec27418
Update task task-045
stanvx Jul 26, 2025
72ca39c
Update task task-045
stanvx Jul 26, 2025
0351d5c
Update task task-046
stanvx Jul 26, 2025
b1d2874
Update task task-046
stanvx Jul 26, 2025
994cd13
Update task task-046
stanvx Jul 26, 2025
c287cb7
Update task task-046
stanvx Jul 26, 2025
da12253
Update task task-046
stanvx Jul 26, 2025
e8c4611
Update task task-046
stanvx Jul 26, 2025
8b5bf52
Update task task-046
stanvx Jul 26, 2025
a346b6f
Update task task-044
stanvx Jul 26, 2025
3030bb0
Update task task-045
stanvx Jul 26, 2025
b857dfb
Update task task-046
stanvx Jul 26, 2025
1351d68
Update task task-046
stanvx Jul 26, 2025
72218aa
Update task task-019
stanvx Jul 27, 2025
8401ec2
Update task task-018
stanvx Jul 27, 2025
d20a664
refactor: remove redundant OptimizedCalendarNoteCard component
stanvx Jul 27, 2025
5815015
feat: implement unified note card system and fix media recording issues
stanvx Jul 27, 2025
74cbced
test: add performance and security test stubs
stanvx Jul 27, 2025
2f51565
feat: implement Material 3 design system overhaul and audio enhancements
stanvx Jul 27, 2025
206d141
Update task task-018
stanvx Jul 27, 2025
2749d98
feat: migrate core UI components from Material Icons to Material Symbols
stanvx Jul 27, 2025
00d494e
Update task task-029
stanvx Jul 27, 2025
678c268
Update task task-030
stanvx Jul 27, 2025
af19e83
Update task task-043
stanvx Jul 27, 2025
7a3b5d7
Update task task-043
stanvx Jul 27, 2025
7a97c36
Update task task-043
stanvx Jul 27, 2025
eab9bae
Add shared audio player ViewModel and implement quick recording UI
stanvx Jul 27, 2025
52c9f04
Create task task-048
stanvx Jul 27, 2025
36a1b5c
Create task task-049
stanvx Jul 27, 2025
3ef14fb
Create task task-050
stanvx Jul 27, 2025
1f1806c
Create task task-051
stanvx Jul 27, 2025
ffcfd9c
fix: remove deprecated package attribute from AndroidManifest.xml
stanvx Jul 27, 2025
179087f
Update task task-048
stanvx Jul 27, 2025
4312b43
Create task task-052
stanvx Jul 27, 2025
2bfe572
refactor: implement critical PR review fixes for stability and security
stanvx Jul 27, 2025
aa9e93c
docs: enhance CLAUDE.md with security, performance, and task manageme…
stanvx Jul 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
230 changes: 138 additions & 92 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,21 @@ This is a personalized fork of the original "Notely Voice" project, focused on s
# Build all targets (Android + iOS)
./gradlew build

# Run Android tests
./gradlew testDebug
# Run tests
./gradlew testDebugUnitTest
./gradlew testReleaseUnitTest

# Lint and code quality checks
./gradlew ktlintCheck
./gradlew ktlintFormat

# Build specific modules
./gradlew :shared:build
./gradlew :core:audio:build
./gradlew :lib:build

# Run single test file (example)
./gradlew :shared:testDebugUnitTest --tests "*NoteViewModelTest"
```

### Project Setup
Expand Down Expand Up @@ -187,10 +195,28 @@ For signed releases, configure these GitHub repository secrets:
- **DataStore**: 1.1.7 (Preferences)
- **Navigation Compose**: 2.9.0-beta03
- **Material 3**: Design system
- **dotLottie Android**: 0.9.2
- **Rich Text Editor**: 1.0.0-rc13 (Compose rich text editing)
- **OWASP HTML Sanitizer**: Security for rich text content

### Audio Processing
- **Whisper C++ Library**: Integrated via JNI and C-interop
- **Platform-specific audio**: AVAudioEngine (iOS), MediaRecorder (Android)
- **AudioWaveformExtractor**: Real-time amplitude data extraction
- **AmplitudeCollector**: Audio visualization data collection

### Animation System
- **dotLottie**: Modern Lottie library with full gradient support
- **Audio Reactive Animations**: Real-time amplitude visualization
- **AudioReactiveLottie**: Synchronized Lottie animations with audio amplitude
- **Performance**: Optimized for real-time audio synchronization

### Testing Framework
- **Kotlin Test**: Built-in multiplatform testing
- **Koin Test**: Dependency injection testing utilities
- **Test structure**: `commonTest/`, `androidInstrumentedTest/`, `iosTest/`
- **Security Testing**: Validation for security vulnerabilities
- **Performance Testing**: Typography and memory optimization tests

## Development Guidelines

Expand All @@ -203,66 +229,51 @@ For signed releases, configure these GitHub repository secrets:
- **Upstream Contributions**: Only contribute generic bug fixes or widely applicable features to the original [Notely Voice](https://github.com/tosinonikute/NotelyVoice) repository
- **Branch Strategy**: Use feature branches for development, merge to `main` when ready

#### Feature Development Process

**MANDATORY: Each feature must be developed on a separate feature branch and merged via Pull Request.**
### Code Style
- Follow Kotlin coding conventions
- Use `camelCase` for functions, `PascalCase` for types
- Prefer immutable data structures
- Use explicit typing where it aids clarity
- **Automated formatting**: Run `./gradlew ktlintFormat` before committing
- **Code quality**: Ensure `./gradlew ktlintCheck` passes before submitting PRs

### Development Hooks Integration
The project includes a Makefile for integration with development hooks:
```bash
# 1. Create and switch to new feature branch
git checkout -b feature/your-feature-name
# Lint specific files (called automatically by hooks)
make lint FILE=path/to/file.kt

# 2. Develop your feature with commits
git add .
git commit -m "feat: implement core functionality"
git commit -m "test: add comprehensive tests"
git commit -m "docs: update documentation"

# 3. Push feature branch to origin
git push -u origin feature/your-feature-name

# 4. Create Pull Request within this fork
gh pr create --base main --head feature/your-feature-name --repo stanvx/NotelyCapture \
--title "feat: Add [feature description]" \
--body "## Summary
Brief description of the feature

## Changes
- List of key changes
- New functionality added
- Tests included

## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed"

# 5. After PR approval and merge, clean up
git checkout main
git pull origin main
git branch -d feature/your-feature-name
git push origin --delete feature/your-feature-name
```
# Run tests for specific files
make test FILE=path/to/file.kt

#### Branch Naming Conventions
- **Features**: `feature/description` (e.g., `feature/logseq-integration`)
- **Bug fixes**: `fix/description` (e.g., `fix/audio-recording-crash`)
- **Refactoring**: `refactor/description` (e.g., `refactor/viewmodel-cleanup`)
- **Documentation**: `docs/description` (e.g., `docs/api-documentation`)
# Check all linting
make lint-all

**CRITICAL: When creating PRs, always specify the base repository explicitly:**
```bash
# ✅ CORRECT - Create PR within this fork
gh pr create --base main --head feature-branch --repo stanvx/NotelyCapture
# Run all tests
make test-all

# ❌ WRONG - This creates PR against upstream by default
gh pr create --title "..." --body "..."
# Check integration setup
make check-integration
```

### Code Style
- Follow Kotlin coding conventions
- Use `camelCase` for functions, `PascalCase` for types
- Prefer immutable data structures
- Use explicit typing where it aids clarity
### Task Management with Backlog.md
The project uses Backlog.md CLI tool for task management:
```bash
# List tasks
backlog task list --plain

# View task details
backlog task 042 --plain

# Create new task
backlog task create "Task title" -d "Description" --ac "Acceptance criteria"

# Edit task status
backlog task edit 042 -s "In Progress" -a @yourself

# Mark task complete
backlog task edit 042 -s Done --notes "Implementation summary"
```

### Layer Boundaries
- Always respect architectural boundaries: UI → Presentation → Domain → Data
Expand All @@ -274,6 +285,15 @@ gh pr create --title "..." --body "..."
- Test ViewModels through their public interfaces
- Use factory functions for test data creation
- Follow the project's testing patterns and conventions
- **Test commands**: `./gradlew testDebugUnitTest` for unit tests
- **Lint commands**: `./gradlew ktlintCheck` and `./gradlew ktlintFormat`
- Tests are located in `shared/src/commonTest/`, `shared/src/androidInstrumentedTest/`, `shared/src/iosTest/`

### Security Considerations
- **HTML Sanitization**: Rich text content is sanitized using OWASP HTML Sanitizer
- **Resource Management**: Proper cleanup of native resources (Whisper models, audio streams)
- **Threading Safety**: Audio operations use appropriate threading patterns
- **Data Validation**: Input validation for audio files and text content

### Platform-Specific Code
- Use `expect/actual` for platform-specific functionality
Expand All @@ -285,6 +305,31 @@ gh pr create --title "..." --body "..."
- Maintain state immutability
- Handle loading, success, and error states consistently

## Module Structure

The project uses a modular architecture with the following key modules:

- **`:shared`** - Main application module containing all business logic and UI
- `androidMain/` - Android-specific implementations
- `commonMain/` - Shared code across platforms
- `iosMain/` - iOS-specific implementations
- `commonTest/` - Shared tests
- **`:core:audio`** - Audio processing and recording functionality
- **`:lib`** - Whisper C++ integration and JNI bindings
- **`:iosApp`** - iOS application wrapper

### Source Set Layout (Kotlin Multiplatform V2)
```
shared/src/
├── androidMain/kotlin/ # Android implementations
├── androidInstrumentedTest/ # Android integration tests
├── commonMain/kotlin/ # Shared business logic & UI
├── commonTest/kotlin/ # Shared unit tests
├── iosMain/kotlin/ # iOS implementations
├── iosTest/kotlin/ # iOS-specific tests
└── nativeInterop/cinterop/ # C interop definitions
```

## Prerequisites

- **Android Studio Ladybug** or newer
Expand All @@ -293,6 +338,39 @@ gh pr create --title "..." --body "..."
- **Kotlin 2.2.0** or higher
- **NDK 27.0.12077973** (Android Native Development Kit)

## Key Application Features

### Core Audio Architecture
- **AudioRecorderInteractor**: Core audio recording business logic with platform-specific implementations
- **AudioWaveformExtractor**: Real-time amplitude extraction for visualization
- **AmplitudeCollector**: Audio data collection and processing
- **AudioReactiveLottie**: Synchronized animations with audio amplitude
- **Variable Speed Playback**: 1x, 1.5x, 2x playback speeds for audio notes
- **Background Recording Service**: Android service for continuous audio recording

### Note Management System
- **Clean Architecture**: Separated into Data, Domain, Presentation, and UI layers
- **SQLDelight**: Type-safe database operations with reactive queries
- **Rich Text Editor**: Advanced formatting with toolbar and accessibility features
- **Quick Record**: Streamlined audio capture workflow with quick shortcuts
- **Note Organization**: Filtering by starred, voice notes, recent, with search capabilities
- **Undo/Redo System**: Text editing history management

### Speech Recognition & AI
- **Whisper Integration**: Local speech-to-text with multiple model sizes
- **Offline Transcription**: Works without internet connectivity
- **Multi-language Support**: 50+ languages supported
- **Background Transcription**: Non-blocking transcription processing
- **AI Summarization**: Text summarization using TF-IDF algorithms

### UI Components Structure
- **Design System**: Material 3 with custom theming and expressive design
- **Unified Components**: Shared UI components across the application
- **Material Symbols**: Font-based icon system for consistent styling
- **Responsive Layouts**: Optimized for different screen sizes and orientations
- **Performance Optimizations**: LazyVerticalStaggeredGrid for note lists
- **Animation System**: Motion tokens and unified animations

## Personalization Notes

This fork has been personalized with the following changes:
Expand All @@ -311,38 +389,6 @@ To ensure easy synchronization with the upstream repository:
3. **File Structure**: Avoid moving or renaming core files unnecessarily
4. **Git Attributes**: Use `.gitattributes` for automatic conflict resolution on personalized files

### Upstream Sync Process

**Using the Helper Script (Recommended):**
```bash
# Interactive sync with safety checks and options
./upstream-sync.sh

# The script provides options to:
# 1. Preview changes before merging
# 2. Merge with automatic conflict resolution
# 3. Create test branch for safe experimentation
# 4. Handles .gitattributes merge rules automatically
```

**Manual Process:**
```bash
# Regular sync process
git fetch upstream
git merge upstream/main

# Handle naming conflicts manually if needed
# The .gitattributes file will prefer your changes for UI-related files
# and upstream changes for core functionality

# Review changes before committing
git status
git diff

# Commit the merge
git commit -m "Merge upstream changes while preserving Notely Capture personalization"
```

### Files Modified for Personalization

- All `strings.xml` files (app name changes)
Expand Down Expand Up @@ -396,7 +442,7 @@ They should be testable and confirm that the core purpose of the task is achieve
### Task file

Once a task is created it will be stored in `backlog/tasks/` directory as a Markdown file with the format
`task-<id> - <title>.md` (e.g. `task-42 - Add GraphQL resolver.md`).
`task-<id> - <title>.md` (e.g. `task-042 - Add GraphQL resolver.md`).

### Additional task requirements

Expand All @@ -416,7 +462,7 @@ Once a task is created it will be stored in `backlog/tasks/` directory as a Mark
## 3. Recommended Task Anatomy

```markdown
# task‑42 - Add GraphQL resolver
# task‑042 - Add GraphQL resolver

## Description (the why)

Expand Down Expand Up @@ -465,21 +511,21 @@ implement something that is not in the AC, update the AC first and then implemen
backlog task list -s "To Do" --plain

# 2 Read details & documentation
backlog task 42 --plain
backlog task 042 --plain
# Read also all documentation files in `backlog/docs/` directory.
# Read also all decision files in `backlog/decisions/` directory.

# 3 Start work: assign yourself & move column
backlog task edit 42 -a @{yourself} -s "In Progress"
backlog task edit 042 -a @{yourself} -s "In Progress"

# 4 Add implementation plan before starting
backlog task edit 42 --plan "1. Analyze current implementation\n2. Identify bottlenecks\n3. Refactor in phases"
backlog task edit 042 --plan "1. Analyze current implementation\n2. Identify bottlenecks\n3. Refactor in phases"

# 5 Break work down if needed by creating subtasks or additional tasks
backlog task create "Refactor DB layer" -p 42 -a @{yourself} -d "Description" --ac "Tests pass,Performance improved"

# 6 Complete and mark Done
backlog task edit 42 -s Done --notes "Implemented GraphQL resolver with error handling and performance monitoring"
backlog task edit 042 -s Done --notes "Implemented GraphQL resolver with error handling and performance monitoring"
```

### 7. Final Steps Before Marking a Task as Done
Expand Down
Loading
Loading