Package-Oriented
Framework
An open-source architecture standard for modular, upgradeable smart contracts. POF brings software engineering best practices -- packages, versioning, dependency management -- to Solidity development.
Design Principles
Five core principles guide every decision in the POF architecture.
Composability
Packages are self-contained units of logic that can be composed together like building blocks. Each package declares its dependencies and interfaces, enabling teams to assemble complex systems from tested, audited components.
Upgradeability
Upgrade individual packages without redeploying the entire system. The Diamond proxy pattern enables surgical upgrades -- swap a single facet while preserving state and all other functionality.
Separation of Concerns
Each package owns a single domain: access control, token logic, compliance, or storage. Clear boundaries between packages reduce coupling and make systems easier to audit and reason about.
Semantic Versioning
Every package follows semver conventions. Breaking changes increment the major version, new features increment minor, and patches increment patch. Consumers always know what to expect from an upgrade.
Diamond Standard (EIP-2535)
The Diamond pattern provides unlimited contract size, granular upgradeability, and a unified address for all functionality. POF extends this with package-level organization and dependency resolution.
Package Anatomy
Every POF system follows a consistent directory structure. Each package contains its facet, internal logic, and namespaced storage.
packages/
access-control/
src/
AccessControlFacet.sol # External functions
AccessControlInternal.sol # Shared internal logic
AccessControlStorage.sol # Namespaced storage layout
manifest.json # Package metadata & deps
README.md
token/
src/
TokenFacet.sol
TokenInternal.sol
TokenStorage.sol
manifest.json
compliance/
src/
ComplianceFacet.sol
ComplianceInternal.sol
ComplianceStorage.sol
manifest.json
diamond.config.json # System-level configurationFacet
The external interface. Contains all public and external functions that are exposed through the Diamond proxy.
Internal
Shared logic used by the facet and available to other packages. Enables cross-package composition without external calls.
Storage
Namespaced storage layout following ERC-7201. Prevents slot collisions between packages sharing the same proxy.
Start Building with POF
The Package-Oriented Framework is open source and ready for production use. Explore the repository, read the specification, and start building modular smart contract systems.
View on GitHub