A decentralized content management system implementing Content Addressable Storage (CAS) and Decentralized Immutable Source of Truth (DISOT) with digital signatures.
- SHA-256 Hashing: Every piece of content is addressed by its cryptographic hash
- Automatic Deduplication: Identical content is stored only once
- Content Integrity: Hash verification ensures content hasn't been tampered with
- Metadata Support: Store additional information alongside content
- Multiple Storage Providers: In-memory, IndexedDB, IPFS, and Helia (browser-native IPFS)
- Digital Signatures: Create cryptographically signed entries
- Entry Types: Support for BLOG_POST, DOCUMENT, IMAGE, and SIGNATURE types
- Signature Verification: Verify the authenticity of any entry
- Timestamp Proof: Each entry includes a timestamp for temporal ordering
- Blog Post Support: Create blog posts directly within DISOT entries
- Modern Angular 18: Built with standalone components
- Responsive Design: Works seamlessly on desktop and mobile
- File Upload: Drag-and-drop or click to upload
- Content Browser: Search and preview stored content with multiple view formats
- Entry Management: Create and verify DISOT entries
- Content Preview: View content as Text, JSON, Hex, Base64, or Image
- Modal Selection: Elegant content selection with preview capability
- Previous Entries: View and preview historical DISOT entries
- Automatic MIME Type Detection: Content references now auto-detect MIME types
- Enhanced Metadata Entry: Author and previous version hash selection via modal
- Improved UX: Streamlined content selection across the application
- Author Selection Modal: Browse and select author hashes
- Previous Version Selection: Visual selection for version tracking
- Metadata Improvements: Enhanced metadata entry workflow
- Hash Selection for Records: Browse and select hashes from CAS
- Reusable Content Selection: Unified modal component
- Code Refactoring: Removed duplicate services, improved code reuse
- Fixed CI Test Failures: Resolved race conditions and test mocking issues
- Budget Adjustment: Increased bundle size limits for Helia dependencies
- Test Coverage: All 402 tests now passing with 78.08% code coverage
- IPFS Storage Provider: Distributed storage using external IPFS node
- Helia Storage Provider: Browser-native IPFS implementation with IndexedDB
- Content Migration: Migrate existing content from local storage to IPFS/Helia
- Share Links: Generate shareable IPFS gateway URLs for content
- Upload Queue: Persistent queue with retry logic for IPFS uploads
- Health Monitoring: Real-time IPFS node health status indicators
- Hybrid Storage: Local caching with distributed IPFS backend
- Migration UI: Bulk content transfer with progress tracking
- Live Demo
- Installation
- Quick Start
- Architecture
- Development
- Deployment
- Testing
- Documentation
- GitFlow Workflow
- Contributing
π https://o2alexanderfedin.github.io/angular-cas-disot
π https://o2alexanderfedin.github.io/angular-cas-disot/staging
π https://o2alexanderfedin.github.io/angular-cas-disot/coverage/cas-app/
Note: Both environments are currently updated from the
master
branch. The staging environment provides a testing ground for validating changes before they go live.
- Node.js v20.19+ or v22.12+ (required for Angular CLI v20)
- npm v9+
- Git
β οΈ Important: Angular CLI v20 requires Node.js v20.19+ or v22.12+. Earlier versions are not supported.
- Clone the repository:
git clone https://github.com/o2alexanderfedin/angular-cas-disot.git
cd angular-cas-disot
- Install dependencies:
npm install
- Start the development server:
npm start
- Open your browser and navigate to
http://localhost:4200/
- Navigate to the "Upload" tab
- Select or drag a file
- Click "Upload" to store it in CAS
- Copy the generated hash for future retrieval
- Go to "Create Entry" tab
- Select previously uploaded content
- Choose entry type (CREATE/UPDATE/DELETE)
- The system generates a key pair automatically
- Click "Create Entry" to sign and store
- Navigate to "Verify" tab
- Enter an entry ID
- Click "Load & Verify"
- View verification results and entry details
The application follows Clean Architecture principles with clear separation of concerns:
src/app/
βββ core/ # Business logic and interfaces
β βββ domain/ # Domain models and interfaces
β βββ services/ # Application services
βββ features/ # Feature modules
β βββ content/ # Content management components
β βββ disot/ # DISOT components
βββ shared/ # Shared modules and utilities
βββ app.ts # Root component
- Dependency Injection: Services provided at root level
- Factory Pattern: Storage provider selection at runtime
- Clean Architecture: Clear separation between UI, business logic, and infrastructure
- Content Addressing: SHA-256 based deduplication
For detailed architecture documentation, see Technical Architecture and Architecture Diagrams.
npm start
Navigate to http://localhost:4200/
. The app will automatically reload on changes.
npm run build
Build artifacts will be stored in the dist/
directory.
Generate new components:
ng generate component features/my-feature --standalone
Generate new services:
ng generate service core/services/my-service
This project uses a comprehensive CI/CD pipeline with automated deployments to GitHub Pages.
- Trigger: Push to
master
branch - URL: https://o2alexanderfedin.github.io/angular-cas-disot/staging
- Purpose: Integration testing and review
- Trigger: Push to
master
branch or tagged releases - URL: https://o2alexanderfedin.github.io/angular-cas-disot
- Purpose: Live application for end users
# Preview staging build locally
npm run preview:staging
# Preview production build locally
npm run preview:production
- β All CI tests must pass
- β Code coverage requirements met
- β Automated deployment (no manual intervention)
- β Rollback capability via GitHub
π For detailed deployment documentation, see docs/DEPLOYMENT.md
npm test
Executes unit tests via Karma in headless Chrome.
The project maintains high test coverage with 492 tests across all components and services:
- Statements: 86.48%
- Functions: 86.88%
- Branches: 75.67%
- Lines: 87.6%
- All tests passing β
describe('CasService', () => {
// Setup
beforeEach(() => {
// Test configuration
});
// Test cases
it('should store content and return hash', async () => {
// Test implementation
});
});
Comprehensive documentation is available in the docs/
directory:
- Technical Architecture - Detailed system architecture and design
- API Documentation - Complete API reference for all services
- Developer Guide - Development setup and guidelines
- Architecture Overview - Visual architecture diagrams
- Component Reference - UI component documentation
- Service Reference - Service implementation details
All documentation includes code examples and visual diagrams.
This project uses GitFlow for version management:
master
- Production-ready codedevelop
- Integration branch for featuresfeature/*
- Feature branchesrelease/*
- Release preparation brancheshotfix/*
- Emergency fixes
Start a new feature:
git flow feature start my-feature
Finish a feature:
git flow feature finish my-feature
Start a release:
git flow release start 1.1.0
Create a hotfix:
git flow hotfix start 1.0.1
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git flow feature start amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request to
develop
branch
- Follow Angular style guide
- Write tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
- Fixed CI test failures in IPFS integration
- Resolved race conditions in migration service
- Fixed test mocking issues
- Increased bundle size budget for Helia
- IPFS storage provider with HTTP API client
- Helia browser-native IPFS implementation
- Content migration service with progress tracking
- Share link generation for IPFS gateways
- Upload queue with persistence and retry logic
- Health monitoring for IPFS nodes
- Migration UI with bulk transfer capability
- Comprehensive test coverage (402 tests)
- Comprehensive documentation update
- Browser storage and security documentation
- Code cleanup guide integration
- Enhanced developer guide structure
- Fixed staging deployment conflicts
- Enabled TypeScript strict mode
- Added dynamic code coverage display
- Improved CI/CD pipeline
- Complete documentation restructuring
- Numbered, audience-based folder organization
- Separated current docs from future roadmap
- Added user guides and deployment documentation
- Fixed all 390 cross-references and navigation links
- Created comprehensive changelog and resources sections
- Phase 1 IPFS Integration Architecture documented
- Detailed implementation guide with code examples
- Story point-based roadmap for AI development
- Security and performance considerations
- Deployment architecture for development and production
- Added consistent navigation emojis across all documentation
- Implemented clean, minimal navigation format with emoji arrows
- Removed redundant text labels for better readability
- Standardized navigation across 19 documentation files
- Fixed arrow symbols (β) causing lexical errors in Mermaid
- Applied consistent multi-line formatting for @Injectable decorators
- Quoted all node labels containing special characters
- Ensured all diagrams render correctly on GitHub
- Fixed Mermaid diagram rendering issues
- Quoted special characters in node labels
- Optimized diagram orientations (horizontal for flows, vertical for hierarchies)
- Fixed @Injectable, Promise<>, Map<>, and other special syntax
- Improved overall diagram readability
- Improved documentation clarity
- Removed color styling from diagrams
- Vertical diagram orientation
- Implementation-specific documentation
- Enhanced with visual emojis
- Persistent storage (IndexedDB)
- Storage provider selection
- Enhanced content preview
- Modal content selection
- Blog post support in DISOT
- Previous entry previews
- IPFS pinning service integration
- Advanced IPFS gateway configuration
- Content encryption for IPFS
- IPNS (InterPlanetary Name System) support
- P2P content discovery
- User authentication
- Permission management
- API endpoints
- WebSocket support for real-time updates
- Blockchain anchoring for IPFS hashes
- Smart contract integration
- Decentralized identity (DID) support
- Mobile applications with IPFS support
- Advanced P2P synchronization
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Angular CLI version 20.0.5
- Cryptography via Web Crypto API
- Testing with Karma and Jasmine
For questions and support:
- Open an issue on GitHub
- Check the documentation
- Review closed issues
Made with β€οΈ by the CAS/DISOT team