How krypton-byte/neonize works
Main Components
• Client Application (User’s Script or Bot):
– Represents the user’s code that imports and calls the Neonize API (as shown in examples like basic.py).
• Neonize Python Library:
– Contains modules under the “neonize” directory such as the client, API, event handling, and utilities.
– Includes the Protobuf modules (in neonize/proto) that are used for serializing/deserializing message data.
• Communication Layer (Protobuf):
– Acts as the medium for data exchange between Neonize and WhatsApp’s underlying protocol via Whatsmeow functions.
• Underlying WhatsApp Automation (Whatsmeow Binding):
• Proto/Code Generation & Support (Goneonize):
– This part (inside the “goneonize” directory) contains Go code, proto definitions, and helper scripts (build_python_proto.py) that generate Python pb2 files.
– It plays a role in keeping the protocol definitions synchronized.
• Database Store:
– According to the README, Neonize supports SQLite and PostgreSQL.
– Include these stores to indicate how message or settings data is stored and accessed.
• Tools & CI/CD:
– The “tools” directory, GitHub workflows, and documentation files (in “docs” and CI configuration under “.github”) are also part of the overall ecosystem.
– You may simplify this into a “DevOps / Utility” component which handles versioning, build automation, and documentation.
Relationships and Interactions
• The Client Application invokes the Neonize Python Library API.
• Neonize internally uses Protobuf serialized messages to structure the requests and responses.
• The library (via its Whatsmeow binding) communicates with WhatsApp endpoints or services.
• For protocol consistency, the Goneonize module (using Go) and utility scripts are used to build the proto files consumed by Neonize.
• When configured, a database (SQLite or Postgres) is connected to the Neonize client to store session, chat, or automation-specific data.
• The CI/CD and tooling components (shown in the .github and tools directories) are used by developers to test, build, and release the project.
Architectural Patterns and Important Components
• Layered Architecture:
– Presentation Layer: The client code (scripts or bots).
– Application/Domain Layer: The Neonize library and API for processing WhatsApp automation.
– Data & Communication Layer: Protobuf messages, database interactions, and bridge components (Whatsmeow binding).
– Utility/Support Layer: Proto generation (Goneonize) and build/CI configurations.
• Modular Design:
– Clear separation between protocol generation (goneonize), the Python binding (neonize), and example usage (examples folder).
• Extensibility:
– The design supports multiple databases and can be easily extended with additional automation functions and integrations.
– Include external services, such as Whatsmeow and database systems, as separate components.