Standard Pipe is a blockchain-native document management system built on the Stacks blockchain, providing secure, auditable, and permission-driven document storage and access control.
- 🔐 Permission-based access control
- 📋 Comprehensive audit logging
- 🏢 Multi-organization support
- 🔍 Immutable document references
- 🚀 Transparent document lifecycle management
Modern organizations struggle with secure document management, often relying on centralized systems vulnerable to tampering, unauthorized access, and opaque audit trails. Standard Pipe solves these challenges by leveraging blockchain's inherent security and transparency.
graph TD
A[Organization Owner] -->|Register Organization| B[Organization Registry]
A -->|Upload Document| C[Document Storage]
C -->|Store| D[Document References]
C -->|Log| E[Audit Trail]
A -->|Manage Access| F[Permission System]
G[Employees/Partners] -->|Access Documents| C
F -->|Control| G
C -->|Record| E
- Organization Registry: Stores organization information and ownership
- Document Storage: Manages document metadata and references
- Permission System: Controls access rights
- Audit System: Tracks all document interactions
PERMISSION-NONE (u0): No accessPERMISSION-VIEW (u1): View-only accessPERMISSION-EDIT (u2): Can edit documentsPERMISSION-ADMIN (u3): Can manage permissionsPERMISSION-OWNER (u4): Full control
ACTION-CREATE (u1): Document creationACTION-VIEW (u2): Document accessACTION-EDIT (u3): Document modificationACTION-SHARE (u4): Permission changesACTION-DELETE (u5): Document deletion
- Clarinet
- Stacks wallet
- Node.js environment
- Register an organization:
(contract-call? .standard-pipe register-organization "org-123" "ACME Corp")- Add a document:
(contract-call? .standard-pipe add-document
"org-123"
"doc-123"
"Contract.pdf"
"Service agreement"
0x1234...
"legal")- Grant access:
(contract-call? .standard-pipe grant-document-permission
"org-123"
"doc-123"
'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM
u1)(register-organization (org-id (string-ascii 64)) (name (string-ascii 256)))Registers a new organization on the platform.
(add-document
(org-id (string-ascii 64))
(document-id (string-ascii 64))
(name (string-ascii 256))
(description (string-utf8 500))
(document-hash (buff 32))
(document-type (string-ascii 64)))Adds a new document to the system.
(update-document
(org-id (string-ascii 64))
(document-id (string-ascii 64))
(name (string-ascii 256))
(description (string-utf8 500))
(document-hash (buff 32))
(document-type (string-ascii 64)))Updates an existing document.
(grant-document-permission
(org-id (string-ascii 64))
(document-id (string-ascii 64))
(user principal)
(permission-level uint))Grants access permissions to a user.
(revoke-document-permission
(org-id (string-ascii 64))
(document-id (string-ascii 64))
(user principal))Revokes access permissions from a user.
- Clone the repository
- Install dependencies
- Run tests:
clarinet test- Start Clarinet console:
clarinet console- Deploy contract:
clarinet deploy- Only organization owners can register new documents
- Permission levels are strictly enforced
- All access attempts are logged
- Document owners have full control
- Only document references are stored on-chain
- Actual documents should be stored off-chain in encrypted form
- Access control is managed through permission levels
- Audit trail maintains accountability
- Document hashes must be managed securely off-chain
- Permission changes require admin access
- No document content encryption on-chain
- Limited to 64-character organization and document IDs
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
MIT License
Standard Pipe Team - [your-contact@example.com]