# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.6.3] - 2025-11-15

### Fixed
- Removed README.md from ex_doc extras to prevent multi-page split and broken landing page
- Documentation now correctly redirects to API reference page

## [0.6.2] - 2025-11-15

### Fixed
- ex_doc landing page configuration (`{main, "api-reference"}`) - resolved "readme.html not found" error

## [0.6.1] - 2025-11-15

### Added
- Professional documentation structure for Hex publication
  - Architecture diagram in README.md (Mermaid format) showing mesh topology
  - Organized documentation: moved 50+ files from root to docs/archive/, docs/development/, docs/planning/
  - Created docs/README.md navigation index
  - Logo and assets configuration for ex_doc
  - Comprehensive Hex package file list (artwork/, docs/, architecture/)

### Fixed
- README.md badge rendering (moved badges outside `<div>` tag for proper GitHub display)
- ex_doc assets configuration (deprecated warning resolved)
- ex_doc landing page configuration (changed `{main, "readme"}` to `{main, "api-reference"}` to fix "readme.html not found" error)
- Hex package configuration to include all necessary assets and documentation
- Documentation organization for professional first impression

## [0.6.0] - 2025-11-15

### Changed
- **BREAKING**: Renamed environment variable from `GATEWAY_REALM` to `MACULA_REALM` for better API consistency
  - All `MACULA_*` environment variables now follow consistent naming
  - Applies to both gateway mode and edge peer mode
  - Update your deployment configurations to use `MACULA_REALM` instead of `GATEWAY_REALM`

### Added
- Comprehensive Kademlia DHT architecture documentation (`docs/KADEMLIA_DHT_ARCHITECTURE.md`)
  - XOR distance metric explanation
  - K-bucket routing table details
  - DHT operations (PING, STORE, FIND_NODE, FIND_VALUE)
  - Iterative lookup algorithm
  - Macula-specific adaptations (realm-scoped DHT, HTTP/3 transport)
  - Performance characteristics and comparisons

### Fixed
- Updated documentation to reflect `MACULA_REALM` environment variable usage
- Updated `entrypoint.sh`, `Dockerfile.gateway`, and `config/sys.config` to use `MACULA_REALM`

### Upcoming in v0.7.0
- Architecture improvement: Separation of `macula_connection` into `macula_peer` (high-level mesh API) and `macula_connection` (low-level QUIC transport)
- See `docs/NOMENCLATURE_PROPOSAL_CONNECTION_TO_PEER.md` and `docs/PEER_CONNECTION_SEPARATION_PLAN.md` for details
- Expected timeline: 4-5 weeks after v0.6.0 release

### Migration Guide (0.5.0 → 0.6.0)

If you're using Macula in gateway mode or configuring realm multi-tenancy:

**Before (0.5.0):**
```bash
export GATEWAY_REALM=my-app
```

**After (0.6.0):**
```bash
export MACULA_REALM=my-app
```

**Elixir/Phoenix runtime.exs:**
```elixir
# Before (0.5.0)
System.put_env("GATEWAY_REALM", realm)

# After (0.6.0)
System.put_env("MACULA_REALM", realm)
```

## [0.5.0] - 2025-11-14

### Added
- Initial public release
- HTTP/3 (QUIC) mesh networking platform
- Gateway mode for accepting incoming connections
- Edge peer mode for mesh participation
- Multi-tenancy via realm isolation
- Pub/Sub messaging with wildcard support
- RPC (request/response) patterns
- Service discovery and advertisement
- mDNS local discovery support
- Process registry via gproc
- Comprehensive documentation

### Known Issues
- Gateway mode requires proper TLS certificate configuration
- Certificates must have Subject Alternative Name (SAN) extension
- Docker deployments require proper file ownership (`--chown=app:app`)

---

[0.6.0]: https://github.com/macula-io/macula/compare/v0.5.0...v0.6.0
[0.5.0]: https://github.com/macula-io/macula/releases/tag/v0.5.0
