Files
noteflow/.rag/01-architecture-overview.md
Travis Vasceannie 1ce24cdf7b feat: reorganize Claude hooks and add RAG documentation structure with error handling policies
- Moved all hookify configuration files from `.claude/` to `.claude/hooks/` subdirectory for better organization
- Added four new blocking hooks to prevent common error handling anti-patterns:
  - `block-broad-exception-handler`: Prevents catching generic `Exception` with only logging
  - `block-datetime-now-fallback`: Blocks returning `datetime.now()` as fallback on parse failures to prevent data corruption
  - `block-default
2026-01-15 15:58:06 +00:00

2.5 KiB

NoteFlow Architecture Overview

Project Type

Intelligent meeting notetaker: local-first audio capture + navigable recall + evidence-linked summaries.

Tech Stack

  • Python Backend: gRPC server, domain logic, infrastructure adapters (src/noteflow/)
  • Tauri Desktop Client: Rust IPC + React UI (client/)
  • Database: PostgreSQL with pgvector extension, async SQLAlchemy + asyncpg

Architecture Pattern

Hexagonal (Ports & Adapters):

  • Domain Layer (domain/): Pure business logic, entities, value objects, ports (protocols)
  • Application Layer (application/): Use-cases/services, orchestration
  • Infrastructure Layer (infrastructure/): Implementations (repos, ASR, auth, persistence)
  • gRPC Layer (grpc/): API boundary, server mixins, proto definitions

Key Entry Points

Entry Point Description
python -m noteflow.grpc.server Backend server
cd client && npm run dev Web UI (Vite)
cd client && npm run tauri dev Desktop Tauri dev

Directory Structure

src/noteflow/
├── domain/           # Entities, ports, value objects
├── application/      # Use-cases/services
├── infrastructure/   # Implementations
├── grpc/             # gRPC layer
├── config/           # Settings
└── cli/              # CLI tools

client/src/
├── api/              # API adapters & types
├── hooks/            # Custom React hooks
├── contexts/         # React contexts
├── components/       # UI components
├── pages/            # Route pages
└── lib/              # Utilities

client/src-tauri/src/
├── commands/         # Tauri IPC handlers
├── grpc/             # gRPC client & types
├── state/            # Runtime state
├── audio/            # Audio capture/playback
└── crypto/           # Encryption

Proto/gRPC Contract

Proto file: src/noteflow/grpc/proto/noteflow.proto Regenerate after changes:

python -m grpc_tools.protoc -I src/noteflow/grpc/proto \
  --python_out=src/noteflow/grpc/proto \
  --grpc_python_out=src/noteflow/grpc/proto \
  src/noteflow/grpc/proto/noteflow.proto
python scripts/patch_grpc_stubs.py

Quality Commands

make quality        # ALL checks (TS + Rust + Python)
make quality-py     # Python: lint + type-check + test-quality
make quality-ts     # TypeScript: type-check + lint
make quality-rs     # Rust: clippy + lint
pytest tests/quality/  # After any non-trivial changes