-
Notifications
You must be signed in to change notification settings - Fork 4
Feature/beeper connector #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
glushenkovIG
wants to merge
13
commits into
MetaState-Prototype-Project:main
from
glushenkovIG:feature/beeper-connector
Closed
Changes from 5 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
0f47487
Add Beeper Connector service for MetaState integration
416fbb0
Remove TypeScript files in favor of Python implementation
64905da
feat: Complete Web3 Adapter implementation
ed3cadb
feat: Integrate Web3 Adapter with Beeper Connector for bidirectional …
ed1ceb9
fix: Address all PR review comments for Beeper Connector
979086f
refactor: Address all reviewer feedback for long-term maintainability
508bf14
fix: Update namespace URIs in visualization to match RDF generator
bb32fca
docs: Clarify Beeper as universal messaging bridge for 25+ platforms
9b8a1c2
fix(beeper-connector): address PR #138 comments — remove bare excepts…
5c52bbf
feat(beeper-connector): add MetaStateTransformer, wire eVault GraphQL…
2597c41
feat(beeper-connector): incremental sync with persisted state, pollin…
8e81f16
feat(beeper-connector): integrate eVault adapter, transformer, state …
129e943
Merge branch 'main' into feature/beeper-connector
glushenkovIG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Add Beeper Connector Service for MetaState Integration | ||
|
||
## Description | ||
|
||
This PR adds a new service for extracting messages from the Beeper messaging platform and converting them to Resource Description Framework (RDF) format. This enables semantic integration with the MetaState ecosystem, particularly the eVault and Ontology Service, while providing visualization tools for analyzing communication patterns. | ||
|
||
## Features | ||
|
||
- Extract messages from the Beeper SQLite database | ||
- Convert messages to RDF triples with semantic relationships compatible with MetaState ontology | ||
- Generate visualization tools for data analysis: | ||
- Network graph showing connections between senders and rooms | ||
- Message activity timeline | ||
- Word cloud of common terms | ||
- Sender activity chart | ||
- NPM scripts for easy integration with the monorepo structure | ||
|
||
## Implementation | ||
|
||
- New service under `services/beeper-connector/` | ||
- Python-based implementation with clear CLI interface | ||
- RDF output compatible with semantic web standards and MetaState ontology | ||
- Comprehensive documentation for integration with other MetaState services | ||
|
||
## Integration with MetaState Architecture | ||
|
||
This connector enhances the MetaState ecosystem by: | ||
|
||
1. **Data Ingestion**: Providing a way to import real-world messaging data into the MetaState eVault | ||
2. **Semantic Representation**: Converting messages to RDF triples that can be processed by the Ontology Service | ||
3. **Identity Integration**: Supporting connections with the W3ID system for identity verification | ||
4. **Visualization**: Offering tools to analyze communication patterns and relationships | ||
|
||
## How to Test | ||
|
||
1. Install the required packages: `pip install -r services/beeper-connector/requirements.txt` | ||
2. Run the extraction: `cd services/beeper-connector && python beeper_to_rdf.py --visualize` | ||
3. Check the output RDF file (`beeper_messages.ttl`) and visualizations folder | ||
|
||
## Future Enhancements | ||
|
||
- Direct integration with eVault API for seamless data import | ||
- Support for additional messaging platforms | ||
- Enhanced ontology mapping for richer semantic relationships | ||
- Real-time data synchronization | ||
|
||
## Notes | ||
|
||
- This tool respects user privacy by only accessing local database files | ||
- RDF output follows standard Turtle format compatible with semantic web tools | ||
- Visualizations require matplotlib, networkx, and wordcloud libraries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
# MetaState Infrastructure Components | ||
|
||
## Overview | ||
|
||
The infrastructure layer provides the core building blocks for the MetaState Prototype ecosystem, enabling decentralized identity, data storage, and cross-platform interoperability. | ||
|
||
## Components | ||
|
||
### 1. W3ID - Web3 Identity System | ||
**Status:** In Progress | ||
|
||
A decentralized identity management system that provides: | ||
- Unique global identifiers (W3IDs) | ||
- Identity verification and authentication | ||
- Cross-platform identity resolution | ||
- Integration with eVaults for secure data storage | ||
|
||
[📖 Documentation](./w3id/README.md) | ||
|
||
### 2. Web3 Adapter | ||
**Status:** ✅ Complete | ||
|
||
Enables seamless data exchange between different platforms through the W3DS infrastructure: | ||
- Schema mapping between platform-specific and universal formats | ||
- W3ID to local ID bidirectional mapping | ||
- Access Control List (ACL) management | ||
- MetaEnvelope creation and parsing | ||
- Cross-platform data transformation | ||
|
||
[📖 Documentation](./web3-adapter/README.md) | [📋 Schemas](./web3-adapter/docs/schemas.md) | ||
|
||
### 3. eVault Core | ||
**Status:** Planned | ||
|
||
Personal data vaults that serve as the source of truth for user data: | ||
- Envelope-based data storage | ||
- Graph database structure | ||
- W3ID integration | ||
- Access control enforcement | ||
- Web3 Protocol support | ||
|
||
[📖 Documentation](./evault-core/README.md) | ||
|
||
### 4. eVault Provisioner | ||
**Status:** Planned | ||
|
||
Manages the lifecycle of eVault instances: | ||
- eVault creation and initialization | ||
- Resource allocation | ||
- Backup and recovery | ||
- Multi-vault management | ||
|
||
[📖 Documentation](./evault-provisioner/README.md) | ||
|
||
### 5. eID Wallet | ||
**Status:** In Progress | ||
|
||
Digital wallet for managing electronic identities: | ||
- Credential storage | ||
- Identity verification | ||
- Signature generation | ||
- Integration with W3ID | ||
|
||
## Architecture | ||
|
||
``` | ||
┌──────────────────────────────────────────────────────────┐ | ||
│ Applications Layer │ | ||
│ (Twitter, Instagram, Chat Platforms) │ | ||
└──────────────────────────────────────────────────────────┘ | ||
│ | ||
▼ | ||
┌──────────────────────────────────────────────────────────┐ | ||
│ Web3 Adapter │ | ||
│ • Schema Mapping • ID Translation • ACL Management │ | ||
└──────────────────────────────────────────────────────────┘ | ||
│ | ||
▼ | ||
┌──────────────────────────────────────────────────────────┐ | ||
│ Infrastructure Layer │ | ||
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ | ||
│ │ W3ID │ │ eVault │ │Provisioner│ │eID Wallet│ │ | ||
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │ | ||
└──────────────────────────────────────────────────────────┘ | ||
│ | ||
▼ | ||
┌──────────────────────────────────────────────────────────┐ | ||
│ Services Layer │ | ||
│ (Ontology Service, Registry, PKI, etc.) │ | ||
└──────────────────────────────────────────────────────────┘ | ||
``` | ||
|
||
## Data Flow | ||
|
||
### Writing Data (Platform → eVault) | ||
|
||
1. **Platform generates data** (e.g., a tweet, post, message) | ||
2. **Web3 Adapter converts** using schema mappings | ||
3. **Data broken into Envelopes** with ontology references | ||
4. **MetaEnvelope created** with W3ID and ACL | ||
5. **Stored in user's eVault** as graph nodes | ||
|
||
### Reading Data (eVault → Platform) | ||
|
||
1. **Platform requests data** using W3ID or query | ||
2. **eVault retrieves MetaEnvelope** with access control check | ||
3. **Web3 Adapter converts** to platform-specific format | ||
4. **ID mapping applied** (W3ID → local ID) | ||
5. **Data delivered to platform** in native format | ||
|
||
## Key Concepts | ||
|
||
### Envelopes | ||
Atomic units of data with: | ||
- Unique identifier | ||
- Ontology reference | ||
- Value and type | ||
- Access control | ||
|
||
### MetaEnvelopes | ||
Logical containers that group related envelopes: | ||
- Represent complete entities (posts, profiles, etc.) | ||
- Have unique W3IDs | ||
- Include ACL for access control | ||
|
||
### Schema Mappings | ||
Define relationships between: | ||
- Platform-specific fields | ||
- Universal ontology fields | ||
- Transformation functions | ||
|
||
### W3IDs | ||
Global unique identifiers that: | ||
- Are platform-agnostic | ||
- Enable cross-platform references | ||
- Map to local platform IDs | ||
|
||
## Development | ||
|
||
### Prerequisites | ||
|
||
- Node.js 20+ and pnpm | ||
- TypeScript 5.0+ | ||
- Docker (for services) | ||
|
||
### Setup | ||
|
||
```bash | ||
# Install dependencies | ||
pnpm install | ||
|
||
# Build all infrastructure components | ||
pnpm build | ||
|
||
# Run tests | ||
pnpm test | ||
``` | ||
|
||
### Testing Individual Components | ||
|
||
```bash | ||
# Test Web3 Adapter | ||
cd infrastructure/web3-adapter | ||
pnpm test | ||
|
||
# Test W3ID | ||
cd infrastructure/w3id | ||
pnpm test | ||
``` | ||
|
||
## Integration Points | ||
|
||
### With Services | ||
|
||
- **Ontology Service**: Schema definitions and validation | ||
- **Registry**: Service discovery and metadata | ||
- **PKI**: Certificate management and verification | ||
- **Search**: Content indexing and discovery | ||
|
||
### With Platforms | ||
|
||
- **Social Media**: Twitter, Instagram, Facebook | ||
- **Messaging**: Chat applications, forums | ||
- **Content**: Blogs, media platforms | ||
- **Enterprise**: Business applications | ||
|
||
## Security Considerations | ||
|
||
1. **Access Control**: All data protected by ACLs | ||
2. **Identity Verification**: W3ID system ensures authenticity | ||
3. **Data Encryption**: Sensitive data encrypted at rest | ||
4. **Audit Logging**: All operations logged for compliance | ||
5. **Privacy**: Users control their data through eVaults | ||
|
||
## Roadmap | ||
|
||
### Phase 1: Foundation (Current) | ||
- ✅ Web3 Adapter implementation | ||
- 🔄 W3ID system development | ||
- 🔄 eID Wallet implementation | ||
|
||
### Phase 2: Core Infrastructure | ||
- [ ] eVault Core implementation | ||
- [ ] eVault Provisioner | ||
- [ ] Web3 Protocol integration | ||
|
||
### Phase 3: Platform Integration | ||
- [ ] Platform SDKs | ||
- [ ] Migration tools | ||
- [ ] Performance optimization | ||
|
||
### Phase 4: Advanced Features | ||
- [ ] AI-powered schema mapping | ||
- [ ] Real-time synchronization | ||
- [ ] Conflict resolution | ||
- [ ] Advanced analytics | ||
|
||
## Contributing | ||
|
||
See the main [project README](../README.md) for contribution guidelines. | ||
|
||
## Resources | ||
|
||
- [MetaState Prototype Documentation](../README.md) | ||
- [Web3 Adapter Documentation](./web3-adapter/README.md) | ||
- [W3ID Documentation](./w3id/README.md) | ||
- [Ontology Service](../services/ontology/README.md) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pl. remove this file