-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/watchers logs #114
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
Merged
Merged
Feat/watchers logs #114
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
4b6a39d
feat: alloc according to entropy and namespace
coodos da302fb
chore: move exports
coodos 838ffc2
chore: docs
coodos 0605ea2
feat: `whois` endpoint
coodos f047287
feat: watcher endpoints
coodos d82a4fa
chore: fix format and lint
coodos ac4ad71
chore: fix tests
coodos 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
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,182 @@ | ||
# eVault Core | ||
|
||
eVault is a secure, distributed data storage and access system designed for the MetaState ecosystem. It provides a robust framework for storing, managing, and accessing structured data with fine-grained access control and GraphQL-based querying capabilities. | ||
|
||
## Overview | ||
|
||
eVault is a core component of the MetaState infrastructure that enables: | ||
|
||
- Secure storage of structured data | ||
- Fine-grained access control using W3ID | ||
- GraphQL-based data querying and manipulation | ||
- Distributed data management | ||
- Integration with the MetaState ecosystem | ||
|
||
## Architecture | ||
|
||
### Core Components | ||
|
||
1. **GraphQL Server** | ||
|
||
- Provides a flexible API for data operations | ||
- Supports complex queries and mutations | ||
- Includes built-in documentation and visualization tools | ||
|
||
2. **Access Control System** | ||
|
||
- W3ID-based authentication | ||
- Fine-grained access control lists (ACL) | ||
- Secure token-based authentication | ||
|
||
3. **Data Storage** | ||
|
||
- Neo4j-based storage backend | ||
- Structured data model with envelopes | ||
- Support for multiple data types and ontologies | ||
|
||
4. **HTTP Server** | ||
- Fastify-based web server | ||
- RESTful endpoints for basic operations | ||
- GraphQL endpoint for advanced operations | ||
|
||
### Data Model | ||
|
||
The eVault system uses a hierarchical data model: | ||
|
||
- **MetaEnvelope**: Top-level container for related data | ||
|
||
- Contains multiple Envelopes | ||
- Has an associated ontology | ||
- Includes access control information | ||
|
||
- **Envelope**: Individual data container | ||
- Contains structured data | ||
- Has a specific value type | ||
- Linked to a MetaEnvelope | ||
|
||
## Features | ||
|
||
### 1. Data Management | ||
|
||
- Store and retrieve structured data | ||
- Update and delete data with version control | ||
- Search and filter data by ontology and content | ||
|
||
### 2. Access Control | ||
|
||
- W3ID-based authentication | ||
- Fine-grained access control lists | ||
- Secure token-based operations | ||
|
||
### 3. Query Capabilities | ||
|
||
- GraphQL-based querying | ||
- Complex search operations | ||
- Real-time data access | ||
|
||
### 4. Integration | ||
|
||
- Seamless integration with W3ID | ||
- Support for multiple data formats | ||
- Extensible architecture | ||
|
||
## API Documentation | ||
|
||
### GraphQL Operations | ||
|
||
#### Queries | ||
|
||
- `getMetaEnvelopeById`: Retrieve a specific MetaEnvelope | ||
- `findMetaEnvelopesByOntology`: Find envelopes by ontology | ||
- `searchMetaEnvelopes`: Search envelopes by content | ||
- `getAllEnvelopes`: List all available envelopes | ||
|
||
#### Mutations | ||
|
||
- `storeMetaEnvelope`: Create a new MetaEnvelope | ||
- `deleteMetaEnvelope`: Remove a MetaEnvelope | ||
- `updateEnvelopeValue`: Update envelope content | ||
|
||
### HTTP Endpoints | ||
|
||
- `/graphql`: GraphQL API endpoint | ||
- `/voyager`: GraphQL schema visualization | ||
- `/documentation`: API documentation | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
|
||
- Node.js | ||
- Neo4j database | ||
- W3ID system | ||
|
||
### Installation | ||
|
||
1. Clone the repository | ||
2. Install dependencies: | ||
```bash | ||
npm install | ||
``` | ||
3. Configure environment variables: | ||
``` | ||
NEO4J_URI=bolt://localhost:7687 | ||
NEO4J_USER=neo4j | ||
NEO4J_PASSWORD=your_password | ||
PORT=4000 | ||
``` | ||
4. Start the server: | ||
```bash | ||
npm start | ||
``` | ||
|
||
## Security Considerations | ||
|
||
- All operations require W3ID authentication | ||
- Access control is enforced at both API and database levels | ||
- Data is encrypted in transit and at rest | ||
- Regular security audits and updates | ||
|
||
## Integration Guide | ||
|
||
### W3ID Integration | ||
|
||
eVault uses W3ID for authentication and access control: | ||
|
||
1. Obtain a W3ID token | ||
2. Include token in Authorization header | ||
3. Access eVault resources based on permissions | ||
|
||
### Data Storage | ||
|
||
1. Define data ontology | ||
2. Create MetaEnvelope with appropriate ACL | ||
3. Store and manage data through the API | ||
|
||
## Development | ||
|
||
### Testing | ||
|
||
```bash | ||
npm test | ||
``` | ||
|
||
### Documentation | ||
|
||
- API documentation available at `/documentation` | ||
- GraphQL schema visualization at `/voyager` | ||
- Example queries in `src/protocol/examples` | ||
|
||
## Contributing | ||
|
||
1. Fork the repository | ||
2. Create feature branch | ||
3. Submit pull request | ||
|
||
## License | ||
|
||
[License information] | ||
|
||
coodos marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Support | ||
|
||
[Support information] |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.