- Directory "codec" (with exports)
- all "Schema" ones (PairingCode and QRCode) -> matter.js/schema
- Rest (codecs) -> mtter.js/codec
- Directory "crypro" (with exports)
- make crypto a signleton
- Move Crypto (basis) and Spake2 --> matter.js/crypto --> This adds BN and eliptic as deps to matter.js
- Leave a "CryptoNode" in node-matter directory crypto
- Directory "error" -> matter.js/common/ (with exports)
- Directory "log" -> matter.js/util/log (with exports)
- Directory "math" -> matter.js/math (no exports)
- Directory "matter/certificate" -> matter.js "certificate" (with exports)
- Directory "matter/cluster" -> matter.js/cluster (with exports)
- Direcory "matter/common" -> matter.js/common (with exports)
- Directory "matter/fabric" -> matter.js/fabric (with exports)
- Directory "matter/interaction" -> matter.js/protocol/interaction (with exports)
- Directory "matter/mdns" -> matter.js/mdns ... or we start a matter.js/communication/mdns (and also move net in there) (with exports)
- Directory "Matter/session"
- Basic session types --> matter.js/session
- session/secure/Pase* -> matter.js/session/pase
- session/secure/Case* -> matter.js/session/case
- session/secure/SecureChannel* -> matter.js/protocol/securechannel
- Directory "net"
- basically -> matter.js/net
- the nodejs specific parts that staay there with Filename *Node (so remove extra directory "node")
- Directory "storage"
- all general Files and types -> matter.js/util/storage
- StorageBackendDisk stays
- Directory "time" -> matter.js/util/time
- Directory "util" -> matter.js/util
- Files matter/MatterDevice and matter/MatterController -> root of matter.js (will be replaced pot anyway when API is updated)
After this in matter-node.js we should have structure like:
- crypto
- CryptoNode.ts
- net
- NetworkNode.ts
- UdpChannelNode.ts
- persistence
- StorageNode.ts
- time
- TimeNode.ts
- ControllerNode.ts
- DeviceNode.ts
- Flat export as of currently - has big downsides becausethen the naming of All exported entities in whole matter.js need to be unique (that already breaks now with StatusCode and EffectVariant)
- We could use modules to export "by topic" and only have a very few global exports
- This means that users do "import { AccessControlCluster } from "@project-chip/matter.js/cluster" - so we define modules "by topic" toexport ... the modules could match to our above directory structure
@Apollon77 The goal is to migrate almost all previous functionality from node-matter into @project-chip/matter.js?