Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
89b19aa
docs: add comprehensive PR for all changes from 0.2.2 to 0.5.1
Oct 5, 2025
76bd6cb
style: fix Qodana findings (javadoc order, regex, redundant cast, com…
Oct 6, 2025
d69c0c5
refactor: address additional Qodana issues (duplicate expressions, re…
Oct 6, 2025
c22e564
style: suppress unchecked warnings and remove redundant casts across …
Oct 6, 2025
edac1fd
chore: restore workflow, qodana config, and docs removed inadvertently
Oct 6, 2025
cc1a5d3
refactor: use typed tag helpers across API and events; add code-aware…
Oct 6, 2025
520d866
Merge remote-tracking branch 'origin/develop' into develop
Oct 6, 2025
bed8994
Merge remote-tracking branch 'origin/develop' into chore/qodana-fixes
Oct 6, 2025
68114ed
chore(bom): bump to 1.1.1 and remove local JUnit overrides; test: qua…
Oct 6, 2025
e198b6e
chore(version): bump project version to 0.6.0 across poms and docs
Oct 6, 2025
6146268
Merge pull request #453 from tcheeric/chore/qodana-fixes
tcheeric Oct 6, 2025
98df86e
Merge remote-tracking branch 'origin/develop' into develop
Oct 6, 2025
6e1ee6a
fix(logging): improve error messages and log levels per Clean Code gu…
Oct 6, 2025
911ab87
refactor(logging): remove constructor logging from low-level key classes
Oct 6, 2025
33270a7
refactor(test): remove test method name logging per Clean Code guidel…
Oct 6, 2025
337bce4
refactor(logging): extract duplicated recovery logging in SpringWebSo…
Oct 6, 2025
90a4c8b
chore: bump version to 0.6.1
Oct 6, 2025
1feba9f
Merge pull request #454 from tcheeric/chore/bump-version-0.6.1
tcheeric Oct 6, 2025
a988d62
fix(logging): improve error messages and log levels per Clean Code gu…
Oct 6, 2025
5ffd3e7
refactor(logging): remove constructor logging from low-level key classes
Oct 6, 2025
37ea04b
refactor(test): remove test method name logging per Clean Code guidel…
Oct 6, 2025
6326f23
refactor(logging): extract duplicated recovery logging in SpringWebSo…
Oct 6, 2025
e813346
Merge remote-tracking branch 'origin/develop' into develop
Oct 6, 2025
c0e6509
docs(javadoc): fix plain-text NIP links to anchors; fully-qualify Jav…
Oct 6, 2025
7dc0019
docs(javadoc): address Qodana javadoc items (anchor NIP links, fully-…
Oct 6, 2025
f5ce0ad
chore: bump version to 0.6.2 and tighten fields per Qodana (FieldMayB…
Oct 6, 2025
93c5c2c
test: configure Mockito to use subclass mock-maker via SPI and surefi…
Oct 6, 2025
529b849
Merge pull request #455 from tcheeric/chore/qodana-final-and-bump-0.6.2
tcheeric Oct 6, 2025
7e9c139
fix: replace generic exception handling
tcheeric Oct 6, 2025
ec39a51
Merge pull request #456 from tcheeric/codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
9995e9f
fix: replace sneaky throws with explicit handling
tcheeric Oct 6, 2025
1a86ffb
Merge pull request #457 from tcheeric/codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
176020d
refactor: unify nostr exception hierarchy
tcheeric Oct 6, 2025
a555d0a
Merge branch 'develop' into codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
7816173
Merge pull request #458 from tcheeric/codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
981c57d
refactor: modularize nip helpers and client orchestration
tcheeric Oct 6, 2025
f11f80a
Merge branch 'develop' into codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
8ce884d
Merge pull request #459 from tcheeric/codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
241cbe2
refactor: streamline subscriptions and zap parameters
tcheeric Oct 6, 2025
5a52f53
Merge branch 'develop' into codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
e9a3248
Merge pull request #460 from tcheeric/codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
9397543
docs: clarify api documentation
tcheeric Oct 6, 2025
028d724
Merge branch 'develop' into codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
1c4ddf0
Merge pull request #461 from tcheeric/codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
b2abab2
refactor: normalize event cache naming and mapper access
tcheeric Oct 6, 2025
7ca269c
Merge branch 'develop' into codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
6c89350
Merge pull request #462 from tcheeric/codex/create-tasks-for-milestone-1
tcheeric Oct 6, 2025
67a565a
fix(api): allow optional sender when constructing websocket client
tcheeric Oct 6, 2025
398fc69
Merge pull request #463 from tcheeric/codex/fix-ci-error
tcheeric Oct 6, 2025
e2c80fc
refactor: abstract relay clients and codify nip ranges
tcheeric Oct 6, 2025
d3499a1
Merge branch 'develop' into codex/create-tasks-for-milestone-1-ylzf9j
tcheeric Oct 6, 2025
9ee96ee
Merge pull request #464 from tcheeric/codex/create-tasks-for-mileston…
tcheeric Oct 6, 2025
6b2a597
feat: finalize calendar decoding and generic event builder
tcheeric Oct 6, 2025
175b159
Merge branch 'develop' into codex/create-tasks-for-milestone-1-mt6702
tcheeric Oct 6, 2025
afdb80a
Merge pull request #465 from tcheeric/codex/create-tasks-for-mileston…
tcheeric Oct 6, 2025
69fefe1
build(pom): restore BOM version to 1.1.1 and re-add internal module o…
Oct 6, 2025
00c2ab5
chore(deps): bump org.sonatype.central:central-publishing-maven-plugin
dependabot[bot] Oct 6, 2025
7b71243
docs: complete Phase 2 documentation enhancement
Oct 6, 2025
223d911
Merge pull request #467 from tcheeric/docs/phase-2-documentation-enha…
tcheeric Oct 6, 2025
8216182
Merge pull request #466 from tcheeric/dependabot/maven/develop/org.so…
tcheeric Oct 6, 2025
0925bbd
docs: complete Phase 2 Task 5 - extended JavaDoc for NIPs and exceptions
Oct 6, 2025
2844e5e
chore: organize project management files into .project-management folder
Oct 6, 2025
6635cc4
chore: rename logging review and improvements markdown files
Oct 6, 2025
cfac008
Merge pull request #468 from tcheeric/docs/phase-2-extended-javadoc
tcheeric Oct 6, 2025
4ed2daf
docs: add MIGRATION.md for 1.0.0 upgrade path - Phase 2 Task 6 complete
Oct 8, 2025
89c05b0
test: add comprehensive tests for NIP-04, NIP-44, and NIP-57
Oct 8, 2025
afb5ffa
docs: add Phase 3 & 4 testing analysis and progress tracking
Oct 8, 2025
482fff9
chore: bump version to 0.6.4
Oct 8, 2025
e215449
docs: add PR document for critical tests and Phase 3 & 4
Oct 8, 2025
b963138
fix: remove unsupported eventId test from NIP57ImplTest
Oct 8, 2025
d191718
fix: adjust NIP-44 tests to respect NIP-44 plaintext constraints
Oct 8, 2025
cf5fc5b
Merge pull request #470 from tcheeric/test/critical-nip-tests-impleme…
tcheeric Oct 8, 2025
4bcc23b
chore(tests): strengthen client/handler tests and increase coverage; …
Oct 9, 2025
d5a3c60
Merge pull request #471 from tcheeric/chore/tests-coverage-enhancements
tcheeric Oct 9, 2025
a199549
build(api): add slf4j-test version (2.4.0) for test logging assertions
Oct 9, 2025
e98c4ce
chore: automate roadmap project setup
tcheeric Oct 11, 2025
6d653b0
Merge pull request #472 from tcheeric/codex/establish-remaining-tasks…
tcheeric Oct 11, 2025
e2f0382
Merge remote-tracking branch 'origin/develop' into develop
Oct 11, 2025
31ce804
fix(api): close WebSocket clients when subscription handles close; bu…
Oct 11, 2025
471c290
Merge pull request #473 from tcheeric/fix/websocket-handler-close-client
tcheeric Oct 11, 2025
fa6a8ba
chore: bump project version to 1.0.0-SNAPSHOT
Oct 11, 2025
5cd2a91
docs(migration): update migration steps for nostr-java BOM usage
Oct 11, 2025
85985de
docs(troubleshooting): update dependency version references for clarity
Oct 11, 2025
4243e5a
fix: parse BOLT11 separator correctly
tcheeric Oct 11, 2025
4d63f19
test: fix bolt11 whole btc fixture
tcheeric Oct 11, 2025
6fd28ca
Merge pull request #475 from tcheeric/codex/address-review-comment-in…
tcheeric Oct 11, 2025
7679bf2
fix(bolt11): correct HRP separator parsing in BOLT11 invoices
Oct 11, 2025
d4ddb67
fix(nip01): handle null uuid in identifier tag parsing
Oct 11, 2025
9861b76
feat: enhance task management in roadmap project script
Oct 11, 2025
de0f48a
Merge pull request #474 from tcheeric/chore/bump-version-1.0.0-SNAPSHOT
tcheeric Oct 11, 2025
199764f
chore(version): bump to 1.0.1-SNAPSHOT across all modules
Oct 12, 2025
4274095
fix: restore GenericTag fallback for DM decrypt
tcheeric Oct 12, 2025
b85dd49
Merge pull request #476 from tcheeric/chore/bump-version-1.0.1-SNAPSHOT
tcheeric Oct 12, 2025
8d04481
refactor(tags): reorganize imports for clarity
Oct 12, 2025
2d3cbd4
docs: rename relay references to 398ja
tcheeric Oct 12, 2025
8857498
Merge pull request #477 from tcheeric/codex/update-relay-name-from-da…
tcheeric Oct 12, 2025
41cdc37
fix: enforce string nip metadata
tcheeric Oct 12, 2025
4df2582
Merge pull request #478 from tcheeric/codex/update-event-kind-type-to…
tcheeric Oct 12, 2025
98d4df3
chore(deps): bump actions/checkout from 4 to 5
dependabot[bot] Oct 13, 2025
7c3458f
chore(deps): bump actions/setup-java from 4 to 5
dependabot[bot] Oct 13, 2025
ac61230
chore(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.13 to 0.8.14
dependabot[bot] Oct 13, 2025
364452b
Merge pull request #481 from tcheeric/dependabot/maven/develop/org.ja…
tcheeric Oct 13, 2025
c8518be
Merge pull request #479 from tcheeric/dependabot/github_actions/devel…
tcheeric Oct 13, 2025
5834f52
Merge pull request #480 from tcheeric/dependabot/github_actions/devel…
tcheeric Oct 13, 2025
4a340ab
chore(version): bump to 1.0.2-SNAPSHOT across all modules
Oct 13, 2025
796773c
chore: release version 1.0.0
Oct 13, 2025
993b342
refactor(api): remove deprecated Identity parameter methods from NIP01
Oct 13, 2025
21c704a
Merge pull request #482 from tcheeric/chore/bump-version-1.0.2-SNAPSHOT
tcheeric Oct 13, 2025
d35c334
docs(readme): update troubleshooting section and remove outdated content
Oct 13, 2025
5af42bd
docs(readme): fix formatting of features list for consistency
Oct 13, 2025
0dcd0dc
chore: update changelog for version 1.0.0 release
Oct 13, 2025
8fbbb71
refactor(api)!: clean up and remove deprecated APIs in v1.0.0
Oct 13, 2025
9726c58
refactor(release): enhance Maven command options handling
Oct 13, 2025
baa075b
chore(settings): add Maven settings for repository configuration
Oct 13, 2025
7e273ec
chore(settings): update Maven repository URL for consistency
Oct 14, 2025
6cefd8f
fix(api): handle generic p-tags during DM decrypt
tcheeric Oct 14, 2025
54109ad
Merge pull request #484 from tcheeric/codex/add-unit-test-for-nip04.java
tcheeric Oct 14, 2025
c966937
fix: restore sender overrides in NIP-01 builder
tcheeric Oct 14, 2025
00870ac
style: use diamond operator in NIP01 builder
tcheeric Oct 14, 2025
b0b8d60
Merge pull request #485 from tcheeric/codex/address-code-comment-in-n…
tcheeric Oct 14, 2025
38b1639
Merge branch 'chore/bump-version-1.0.2-SNAPSHOT' into codex/address-c…
tcheeric Oct 14, 2025
042d019
Merge pull request #486 from tcheeric/codex/address-code-comment-in-n…
tcheeric Oct 14, 2025
c652345
Merge pull request #487 from tcheeric/chore/bump-version-1.0.2-SNAPSHOT
tcheeric Oct 14, 2025
58bceed
refactor(api)!: simplify event building methods by removing sender pa…
Oct 14, 2025
3a16764
refactor(api): update default sender handling in NIP01 event builder
Oct 14, 2025
7c90fec
ci: update Maven command to use custom settings file
Oct 14, 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
174 changes: 174 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

`nostr-java` is a Java SDK for the Nostr protocol. It provides utilities for creating, signing, and publishing Nostr events to relays. The project implements 20+ Nostr Implementation Possibilities (NIPs).

- **Language**: Java 21+
- **Build Tool**: Maven
- **Architecture**: Multi-module Maven project with 9 modules

## Module Architecture

The codebase follows a layered dependency structure. Understanding this hierarchy is essential for making changes:

1. **nostr-java-util** – Foundation utilities (no dependencies on other modules)
2. **nostr-java-crypto** – BIP340 Schnorr signatures (depends on util)
3. **nostr-java-base** – Common model classes (depends on crypto, util)
4. **nostr-java-event** – Event and tag definitions (depends on base, crypto, util)
5. **nostr-java-id** – Identity and key handling (depends on base, crypto)
6. **nostr-java-encryption** – Message encryption (depends on base, crypto, id)
7. **nostr-java-client** – WebSocket relay client (depends on event, base)
8. **nostr-java-api** – High-level API (depends on all above)
9. **nostr-java-examples** – Sample applications (depends on api)

**Key principle**: Lower-level modules cannot depend on higher-level ones. When adding features, place code at the lowest appropriate level.

## Common Development Commands

### Building and Testing

```bash
# Run all unit tests (no Docker required)
mvn clean test

# Run integration tests (requires Docker for Testcontainers)
mvn clean verify

# Run integration tests with verbose output
mvn -q verify

# Install artifacts without tests
mvn install -Dmaven.test.skip=true

# Run a specific test class
mvn -q test -Dtest=GenericEventBuilderTest

# Run a specific test method
mvn -q test -Dtest=GenericEventBuilderTest#testSpecificMethod
```

### Code Quality

```bash
# Verify code quality and run all checks
mvn -q verify

# Generate code coverage report (Jacoco)
mvn verify
# Reports: target/site/jacoco/index.html in each module
```

## Key Architectural Patterns

### Event System

- **GenericEvent** (`nostr-java-event/src/main/java/nostr/event/impl/GenericEvent.java`) is the core event class
- Events can be built using:
- Direct constructors with `PublicKey` and `Kind`/`Integer`
- Static `GenericEvent.builder()` for flexible construction
- All events must be signed before sending to relays
- Events support both NIP-defined kinds (via `Kind` enum) and custom kinds (via `Integer`)

### Client Architecture

Two WebSocket client implementations:

1. **StandardWebSocketClient** – Blocking, waits for relay responses with configurable timeout
2. **NostrSpringWebSocketClient** – Non-blocking with Spring WebSocket and retry support (3 retries, exponential backoff from 500ms)

Configuration properties:
- `nostr.websocket.await-timeout-ms=60000`
- `nostr.websocket.poll-interval-ms=500`

### Tag System

- Tags are represented by `BaseTag` and subclasses
- Custom tags can be registered via `TagRegistry`
- Serialization/deserialization handled by Jackson with custom serializers in `nostr.event.json.serializer`

### Identity and Signing

- `Identity` class manages key pairs
- Events implement `ISignable` interface
- Signing uses Schnorr signatures (BIP340)
- Public keys use Bech32 encoding (npub prefix)

## NIPs Implementation

The codebase implements NIPs through dedicated classes in `nostr-java-api`:
- NIP classes (e.g., `NIP01`, `NIP04`, `NIP25`) provide builder methods and utilities
- Event implementations in `nostr-java-event/src/main/java/nostr/event/impl/`
- Refer to `.github/copilot-instructions.md` for the full NIP specification links

When implementing new NIP support:
1. Add event class in `nostr-java-event` if needed
2. Create NIP helper class in `nostr-java-api`
3. Add tests in both modules
4. Update README.md with NIP reference
5. Add example in `nostr-java-examples`

## Testing Strategy

- **Unit tests** (`*Test.java`): No external dependencies, use mocks
- **Integration tests** (`*IT.java`): Use Testcontainers to start `nostr-rs-relay`
- Relay container image can be overridden in `src/test/resources/relay-container.properties`
- Integration tests may be retried once on failure (configured in failsafe plugin)

## Code Standards

- **Commit messages**: Must follow conventional commits format: `type(scope): description`
- Allowed types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
- See `commit_instructions.md` for full guidelines
- **PR target**: All PRs should target the `develop` branch
- **Code formatting**: Google Java Format (enforced by CI)
- **Test coverage**: Jacoco generates reports (enforced by CI)
- **Required**: All changes must include unit tests and documentation updates

## Dependency Management

- **BOM**: `nostr-java-bom` (version 1.1.1) manages all dependency versions
- Root `pom.xml` includes temporary module version overrides until next BOM release
- Never add version numbers to dependencies in child modules – let the BOM manage versions

## Documentation

Comprehensive documentation in `docs/`:
- `docs/GETTING_STARTED.md` – Installation and setup
- `docs/howto/use-nostr-java-api.md` – API usage guide
- `docs/howto/streaming-subscriptions.md` – Subscription management
- `docs/howto/custom-events.md` – Creating custom event types
- `docs/reference/nostr-java-api.md` – API reference
- `docs/CODEBASE_OVERVIEW.md` – Module layout and build instructions

## Common Patterns and Gotchas

### Event Building
```java
// Using builder for custom kinds
GenericEvent event = GenericEvent.builder()
.kind(customKindInteger)
.content("content")
.pubKey(publicKey)
.build();

// Using constructor for standard kinds
GenericEvent event = new GenericEvent(pubKey, Kind.TEXT_NOTE);
```

### Signing and Sending
```java
// Sign and send pattern
EventNostr nostr = new NIP01(identity);
nostr.createTextNote("Hello Nostr!")
.sign()
.send(relays);
```

### Custom Tags
Register custom tags in `TagRegistry` before deserializing events that contain them.

### WebSocket Sessions
Spring WebSocket client maintains persistent connections. Always close subscriptions properly to avoid resource leaks.
154 changes: 152 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,164 @@
# Contributing to nostr-java

nostr-java implements the Nostr protocol. For a complete index of current Nostr Implementation Possibilities (NIPs), see [AGENTS.md](AGENTS.md).
Thank you for contributing to nostr-java! This project implements the Nostr protocol. For a complete index of current Nostr Implementation Possibilities (NIPs), see [AGENTS.md](AGENTS.md).

## Table of Contents

- [Getting Started](#getting-started)
- [Development Guidelines](#development-guidelines)
- [Coding Standards](#coding-standards)
- [Architecture Guidelines](#architecture-guidelines)
- [Adding New NIPs](#adding-new-nips)
- [Testing Requirements](#testing-requirements)
- [Commit Guidelines](#commit-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)

## Getting Started

### Prerequisites

- **Java 21+** - Required for building and running the project
- **Maven 3.8+** - For dependency management and building
- **Git** - For version control

### Setup

1. Fork the repository on GitHub
2. Clone your fork: `git clone https://github.com/YOUR_USERNAME/nostr-java.git`
3. Add upstream remote: `git remote add upstream https://github.com/tcheeric/nostr-java.git`
4. Build: `mvn clean install`
5. Run tests: `mvn test`

## Development Guidelines

- All changes must include unit tests and update relevant documentation.
- Use clear, descriptive names and remove unused imports.
- Prefer readable, maintainable code over clever shortcuts.
- Run `mvn -q verify` from the repository root before committing.
- Submit pull requests against the `develop` branch.
- Submit pull requests against the `main` branch.

### Before Submitting

✅ All tests pass: `mvn test`
✅ Code compiles: `mvn clean install`
✅ JavaDoc complete for public APIs
✅ Branch up-to-date with latest `main`

## Coding Standards

This project follows **Clean Code** principles. Key guidelines:

- **Single Responsibility Principle** - Each class should have one reason to change
- **DRY (Don't Repeat Yourself)** - Avoid code duplication
- **Meaningful Names** - Use descriptive, intention-revealing names
- **Small Functions** - Functions should do one thing well

### Naming Conventions

**Classes:**
- Entities: Noun names (e.g., `GenericEvent`, `UserProfile`)
- Builders: End with `Builder` (e.g., `NIP01EventBuilder`)
- Factories: End with `Factory` (e.g., `NIP01TagFactory`)
- Validators: End with `Validator` (e.g., `EventValidator`)
- Serializers: End with `Serializer` (e.g., `EventSerializer`)
- NIP implementations: Use `NIPxx` format (e.g., `NIP01`, `NIP57`)

**Methods:**
- Getters: `getKind()`, `getPubKey()`
- Setters: `setContent()`, `setTags()`
- Booleans: `isEphemeral()`, `hasTag()`
- Factory methods: `createEventTag()`, `buildTextNote()`

**Variables:**
- Use camelCase (e.g., `eventId`, `publicKey`)
- Constants: UPPER_SNAKE_CASE (e.g., `REPLACEABLE_KIND_MIN`)

### Code Formatting

- **Indentation:** 2 spaces (no tabs)
- **Line length:** Max 100 characters (soft limit)
- **Use Lombok:** `@Data`, `@Builder`, `@NonNull`, `@Slf4j`
- **Remove unused imports**

## Architecture Guidelines

This project follows **Clean Architecture**. See [docs/explanation/architecture.md](docs/explanation/architecture.md) for details.

### Module Organization

```
nostr-java/
├── nostr-java-base/ # Domain entities
├── nostr-java-crypto/ # Cryptography
├── nostr-java-event/ # Event implementations
├── nostr-java-api/ # NIP facades
├── nostr-java-client/ # Relay clients
```

### Design Patterns

- **Facade:** NIP implementation classes (e.g., NIP01, NIP57)
- **Builder:** Complex object construction
- **Factory:** Creating instances (tags, messages)
- **Template Method:** Validation with overrideable steps
- **Utility:** Stateless helper classes

## Adding New NIPs

### Quick Guide

1. **Read the NIP spec** at https://github.com/nostr-protocol/nips
2. **Create event class** (if needed) in `nostr-java-event`
3. **Create facade** in `nostr-java-api`
4. **Write tests** (minimum 80% coverage)
5. **Add JavaDoc** with usage examples
6. **Update README** NIP compliance matrix

### Example Structure

```java
/**
* Facade for NIP-XX (Feature Name).
*
* <p><b>Usage Example:</b>
* <pre>{@code
* NIPxx nip = new NIPxx(identity);
* nip.createEvent("content")
* .sign()
* .send(relayUri);
* }</pre>
*
* @see <a href="https://github.com/nostr-protocol/nips/blob/master/XX.md">NIP-XX</a>
* @since 0.x.0
*/
public class NIPxx extends EventNostr {
// Implementation
}
```

See [docs/explanation/architecture.md](docs/explanation/architecture.md) for detailed step-by-step guide.

## Testing Requirements

- **Minimum coverage:** 80% for new code
- **Test all edge cases:** null values, empty strings, invalid inputs
- **Use descriptive test names** or `@DisplayName`

### Test Example

```java
@Test
@DisplayName("Validator should reject negative kind values")
void testValidateKindRejectsNegative() {
Integer invalidKind = -1;

AssertionError error = assertThrows(
AssertionError.class,
() -> EventValidator.validateKind(invalidKind)
);
assertTrue(error.getMessage().contains("non-negative"));
}
```

## Commit Guidelines

Expand Down
Loading
Loading