{"id":25306567,"url":"https://github.com/neuroglia-io/cloud-shapes","last_synced_at":"2025-10-28T11:31:06.700Z","repository":{"id":275997598,"uuid":"927633595","full_name":"neuroglia-io/cloud-shapes","owner":"neuroglia-io","description":"Cloud Shapes is an event-driven database designed for real-time projection materialization based on CloudEvents","archived":false,"fork":false,"pushed_at":"2025-02-13T09:12:07.000Z","size":12522,"stargazers_count":4,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T10:24:17.584Z","etag":null,"topics":["api","cloudevent","database","eda","event-driven","projection"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neuroglia-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-05T09:33:36.000Z","updated_at":"2025-02-13T09:12:10.000Z","dependencies_parsed_at":"2025-02-05T18:47:51.258Z","dependency_job_id":"addd463a-9b74-4e80-9971-5ccac1350ddb","html_url":"https://github.com/neuroglia-io/cloud-shapes","commit_stats":null,"previous_names":["neuroglia-io/cloud-shapes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuroglia-io%2Fcloud-shapes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuroglia-io%2Fcloud-shapes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuroglia-io%2Fcloud-shapes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neuroglia-io%2Fcloud-shapes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neuroglia-io","download_url":"https://codeload.github.com/neuroglia-io/cloud-shapes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238641502,"owners_count":19506185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cloudevent","database","eda","event-driven","projection"],"created_at":"2025-02-13T10:35:39.707Z","updated_at":"2025-10-28T11:31:03.108Z","avatar_url":"https://github.com/neuroglia-io.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logotype-blue.png\" height=\"250px\" alt=\"Logo\"/\u003e\n\u003c/p\u003e\n\u003chr\u003e\n\n# Event-Driven Projections Database  \n\n**Cloud Shapes** is an **event-driven database** designed to **dynamically generate, update, and delete projections** based on **CloudEvents**. It supports **real-time relationship management**, **embedded data synchronization**, and **write-time updates** for efficient, **event-driven materialization of data**.  \n\n---\n\n## **🔹 Key Features**  \n\n✅ **Projection-Based Data Model** – Store and query data as **projections**, materialized from events.  \n✅ **Event-Driven Writes** – Automatically create, update, or delete projections when **CloudEvents** occur.  \n✅ **Schema-Enforced Storage** – Validate projection states using **JSON Schema (`JsonSchema`)**.  \n✅ **Real-Time Relationship Updates** – Maintain **data consistency** with **embedded relationships**.  \n✅ **Write-Time Data Embedding** – Merge related projection data **at write time** for optimized queries.  \n✅ **Indexing \u0026 Querying** – Define indexes for fast lookups on **projection properties**.  \n✅ **Multi-Tenant \u0026 Scalable** – Designed for **distributed event-driven architectures**.  \n\n---\n\n## **🔄 How Cloud Shapes Works**  \n\n1. **Define a `ProjectionType`**  \n   - Each **projection type** is defined by a **schema (`JsonSchema`)**.  \n   - Triggers determine **when new projections should be created** from incoming **CloudEvents**.  \n\n2. **CloudEvents Ingestion**  \n   - Events trigger **projections updates**, ensuring real-time **data synchronization**.  \n\n3. **Write-Time Relationship Management**  \n   - Projections can **embed related projection data** and update it **dynamically** when relationships change.  \n\n4. **Indexing \u0026 Querying**  \n   - Projections can be indexed for **efficient lookups** and **optimized queries**.  \n\n---\n\n## **🛠 Example: Defining a `ProjectionType`**\nA **projection type** defines how **CloudEvents** affect projections:\n\n```yaml\nname: Order\ndescription: \u003e\n  The `Order` projection represents an **order entity**, materialized from CloudEvents. \n  It includes **embedded customer and item data** to ensure real-time consistency and optimized query performance.\nschema:\n  type: object\nindexes:\n  - name: store\n    fields: [ store ]\n    unique: false\n    descending: false\n    text: false\ntriggers:\n  create:\n    - event:\n        type: io.petstore.events.order.created.v1\n        correlation:\n          attribute: subject\n      state: '${ .data }'\n  update:\n    - event:\n        type: io.petstore.events.order.updated.v1\n        correlation:\n          attribute: subject\n      state: '${ .data }'\n  delete:\n    - event:\n        type: io.petstore.events.order.deleted.v1\n        correlation:\n          attribute: subject\nrelationships:\n  - type: one-to-one\n    target: Customer\n    key: customerId\n    path: customer\n  - type: one-to-many\n    target: OrderItem\n    key: orderId\n    path: items\n```\n\n---\n\n## **📌 Example: Order Projection Structure**\nWhen an order is processed, the system **materializes the following JSON projection**:\n\n    ```json\n    {\n      \"id\": \"order-123\",\n      \"customer\": {\n        \"id\": \"customer-456\",\n        \"name\": \"Alice Smith\"\n      },\n      \"items\": [\n        { \"id\": \"item-1\", \"product\": \"Laptop\", \"price\": 1000 },\n        { \"id\": \"item-2\", \"product\": \"Mouse\", \"price\": 50 }\n      ],\n      \"status\": \"Processing\"\n    }\n    ```\n\n🔹 **Embedded relationships (`customer`, `items`) ensure real-time updates** when related projections change.\n\n---\n\n## **🔄 Real-Time Updates \u0026 Event Processing**\nCloud Shapes dynamically updates projections when **CloudEvents** are received:\n\n- **`order.created` → Creates a new projection**  \n- **`order.updated` → Modifies the projection**  \n- **`order.deleted` → Removes the projection**  \n\n🔹 **Embedded relationships are updated dynamically** at **write time**, ensuring consistency.\n\n---\n\n## **🚀 Why Use Cloud Shapes?**\n✅ **Fully Event-Driven** – No manual updates, all changes are event-driven.  \n✅ **Real-Time Consistency** – Embedded data updates instantly on related projection changes.  \n✅ **Write-Time Optimizations** – Data embedding reduces **query-time overhead**.  \n✅ **Schema-Enforced Validation** – Ensures **data integrity** using JSON Schema (`JsonSchema`).  \n✅ **Scalable \u0026 Distributed** – Built for **high-throughput event-driven systems**.  \n\n---\n\n## **📥 Getting Started**\n1️⃣ Clone the **Cloud Shapes** [repository](https://github.com/neuroglia-io/cloud-shapes):  \n```sh\ngit clone https://github.com/neuroglia-io/cloud-shapes.git\n```\n\n2️⃣ Start **Cloud Shapes** using **Docker**:\n```sh\ndocker-compose -f deployments/docker-compose/docker-compose.yml up -d\n```\n\n3️⃣ Define **Projection Types** and their **Triggers**\n\n4️⃣ Start **ingesting CloudEvents** into the system. \n\n5️⃣ Query **real-time projections** with **pre-embedded data**. \n\n---\n\n## **📚 Learn More**\n- 📖 [Documentation](#) *(Coming Soon)*\n- 🚀 [API Reference](#) *(Coming Soon)*  \n\n---\n\n## **📜 License**\nCloud Shapes is **open-source** and available under the [Apache-2.0 License](LICENSE).  \n\n---\n\n### **🚀 Cloud Shapes: Transforming Events into Real-Time Projections**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneuroglia-io%2Fcloud-shapes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneuroglia-io%2Fcloud-shapes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneuroglia-io%2Fcloud-shapes/lists"}