AI prompts
base on Local-First Cooperation based on Event Sourcing <div align="center">
# Actyx
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](#contributing)
[![discord](https://img.shields.io/discord/697349510409617408?style=flat-square)](https://discord.gg/262yJhc)
[![license](https://img.shields.io/crates/l/actyx_sdk?style=flat-square)](#licensing)
[![dockerhub](https://img.shields.io/docker/v/actyx/actyx/latest?label=Actyx%20version&style=flat-square)](https://hub.docker.com/repository/docker/actyx/actyx)
[![Rust SDK](https://img.shields.io/crates/v/actyx_sdk?label=Rust%20SDK&style=flat-square)](https://crates.io/crates/actyx_sdk)
[![JS/TS SDK](https://img.shields.io/npm/v/@actyx/sdk?label=JS%2FTS%20SDK&style=flat-square)](https://www.npmjs.com/package/@actyx/sdk)
![commits](https://img.shields.io/github/commit-activity/m/Actyx/Actyx?style=flat-square)
![contributors](https://img.shields.io/github/contributors/Actyx/Actyx?style=flat-square)
---
<img src="web/Actyx-Icon-Transparent.svg" height="128pt" /> <a href="https://www.local-first-cooperation.org/"><img src="web/lfc-logo.svg" height="128pt" /></a>
</div>
Actyx is a **decentralized** event **database**, **streaming** and **processing** engine that allows you to easily build [local-first cooperative](https://www.local-first-cooperation.org/) apps.
For more information on how to use it, please refer to [developer.actyx.com](https://developer.actyx.com).
You’re also very welcome to drop us a line in [the forum](https://groups.google.com/a/actyx.io/g/developers/) and watch this space (or give it a ✩)!
## Features
- durable event stream storage in peer-to-peer network using [libp2p](https://github.com/libp2p/rust-libp2p) and [ipfs-embed](https://github.com/ipfs-rust/ipfs-embed)
- low-latency replication between nodes
- tag-based and time-based indexing of events
- full-fledged support for event-sourcing, guaranteeing eventual consistency
- [query language](https://developer.actyx.com/docs/reference/aql) for extracting and summarizing events (still growing)
For our high-level roadmap please check out [this wiki page](https://github.com/Actyx/Actyx/wiki/Roadmap).
## Quick demo
First, make sure you already have `cmake` and `protobuf-compiler` installed on your machine by running the following commands:
```sh
cmake --version
protoc --version
```
If these trigger some errors, you might want to install these dependencies.
Then, to try it out, clone the repo and start Actyx from within the `rust/actyx` directory (you’ll want to compile with `--release` for more serious testing):
```sh
cargo run --bin actyx
```
In another terminal, also in `rust/actyx`, interact with the running Actyx process using the CLI:
```sh
# first create your keypair:
cargo run --bin ax users keygen
# then ask for all events:
cargo run --bin ax events query localhost 'FROM allEvents'
# or get the listen addresses from the discovery mechanism:
cargo run --bin ax events query localhost 'FROM "discovery" FILTER IsDefined(_.NewListenAddr) SELECT _.NewListenAddr[1]'
```
The last argument is an [AQL expression](https://developer.actyx.com/docs/reference/aql), you can play around a little bit with the `'discovery'` and (after some time) `'metrics'` events that Actyx emits by itself.
For emitting events and writing more complex logic, please take a look at [the Typescript SDK](js/sdk/README.md).
## How to get Actyx
For up-to-date binaries built for a variety of host systems please refer to [Actyx Releases](https://developer.actyx.com/releases).
If you want to build it yourself from source, you’ll need GNU make (version 4.2 or later), the current stable Rust toolchain, and language-specific development environments for building the respective SDKs.
Common commands are:
```sh
# compile Actyx and Actyx CLI for your current host system
make current
# build all Typescript
make all-js
```
There are provisions in the Makefile for cross-building, but those currently only work for Actyx employees — we’ll fix that soon.
## Contributing
We welcome all kinds of contributions, whether they are in the form of bug reports, feature requests, or code.
Just open an issue or pull request and we’ll guide you through the process where needed — we look forward to hearing from you!
Please be respectful when interacting with others on this repository.
We reserve the right to ban you from participating in discussions or development in case of repeated or severe cases of uncivilised conduct.
### Structure of the codebase
This is a monorepo, containing all parts that make up the Actyx suite.
We have structured the parts by programming language:
- `js/sdk` contains the Typescript/Javascript [SDK](https://www.npmjs.com/package/@actyx/sdk)
- `js/node-manager` holds the Electron app _Actyx Node Manager_, a graphical version of the Actyx CLI
- `jvm/os-android` hosts the Android-specific part of Actyx (written in Kotlin) and the build definition for the APK
- `rust/actyx` is the **main codebase** containing the native code for Actyx and Actyx CLI
- `rust/sdk` and `rust/sdk_macros` are the crates that make up the [Rust SDK](https://crates.io/crates/actyx_sdk)
- `rust/release` is a tool for automatically generating [version numbers](versions) and changelog
In addition to these main parts there are folders for github workflows, Azure pipelines, some design documents, JSON schema definitions, and the Windows installer.
The `integration` directory holds our AWS-based integration test suite that ensures the interoperability of the various parts listed above.
The [website](https://developer.actyx.com) sources are in the `web` folder, accompanied by the documentation samples in `third-party` from which code snippets are extracted.
## Licensing
Actyx, Actyx CLI, Actyx Node Manager, and the SDKs (for Typescript/Javascript, Rust) are available under the [Apache 2.0](LICENSE.Apache_2.0) open-source license. This license and the accompanying [NOTICE](NOTICE) applies to all files in the `dotnet`, `integration`, `js`, `jvm`, `rust`, `third-party`, `wix` directories except where specified otherwise.
For commercial licensing please contact [Actyx Support](https://www.actyx.com/enterprise).
## Acknowledgements
The implementation of these libraries and the underlying theory has been supported by the Horizon Europe EU project «TaRDIS» (grant number 101093006).
", Assign "at most 3 tags" to the expected json: {"id":"3165","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"