# null Source: https://docs.satoridb.com/basic-concepts # Satori Control over your data doesn't have to be hard. Satori aims to give the developer superpowers without making it hard. ## Installing 1. First, download ### Linux ```bash theme={null} bash -c "$(curl -fsSL https://satoridb.com/linux/setup.sh)" ``` ### Windows ```bash theme={null} powershell -ExecutionPolicy Bypass -NoProfile -Command "Invoke-WebRequest -Uri 'https://satoridb.com/win/setup.ps1' -OutFile 'setup.ps1'; .\setup.ps1" ``` 2. Then run satori ```bash theme={null} satori -a root admin ``` ## Arguments You can run Satori with multiple arguments, this are ```bash theme={null} -l //license key for AICore -port //set the port where satori will be executing (defaults to 2310) -m //connect to a network, example: -m 127.0.0.1 2311 -pwd //set network password -ai //run satori with ai capabilities (a ~100mb model will be downloaded) -a //enable authentication and set root user -mem //use satori as a memory-only database -mem_t //memory threshold at which MEMORY_BALANCE is activated, example: satori -t 80 (memory balancing will be activated at 80% memory consumption) -emb_b //ex: ollama:model || openai:model -b //llm backend to use query and ask operations ex: ollama:model || openai:model -ne //disable embedding generation ``` ## Migration If you already have a database with Mongo, Surreal or any other you can import it into Satori ```bash theme={null} satori -i ``` Format can be `mongo` `surreal` or `json` . Mongo format takes objects like this ``` {obj1} {obj2} ``` All objects are separated by a `\n` . This is the standard Mongo export format. Object keys are infered from the default `oid` property Surreal exports are SurrealQL files. All object keys are inferred if there is a key or id property and object type is inferred from the table name. JSON is a generic format. If you work with any other DB just export your data into this format. An array of json objects ``` [ {obj1}, {obj2} ] ``` In this format object keys are also inferred by the property `key` or `id`. If key must be inferred from any other field specify it with the `-k` arg ``` satori -i -k body.info.name //body.info.name ``` If the property specified with `-k` is present it will be used as key, if not, a random uuid will be asigned. There is also a `-t` parameter to set the class that works just the same as the `-k` parameter ## CLI When you install satori you also install Satori's CLI, run ```bash theme={null} satoridb -h ``` This way you'll receive instructions on how to use it. ### CLI quickstart ```bash theme={null} >satoridb connect ws://127.0.0.1 admin root satori>set user:1 {"email": "test@test.com"} satori>get user:1 #response ``` ## Objects Objects are the only data type in Satori and these are polymorphic, these can be a node, a JSON object, a string entry or all at once. Satori allows interactions among objects without caring about their kind. All functions are avaible to all Objects. All objects have the following fields and they must be specified when an object is created **(only if you're working directly with websockets and not with the sdks)** A key for accessing the object, if not provied, an uuid will be generated This is the body that will be associated to your key, this can be anything you want This array relates your object with other nodes, relations can be keys to object or just strings with any other meaning. This is used to order your data by classes like users, posts, etc... If the objects expires it must be set to true The time in milliseconds that the object must live ## Operations Operations or commands are the querys you make to the database, these are simple commands such as `SET, GET, PUT, DELETE`. Data operations modify the objects in the database and system operations modify the behavior of the system. To make a request you must The request must be a JSON object and have: The operation you want to execute and `...request specific parameters such as (key, encryption_key, etc...)` You can perform operations on multiple objects that meet certain conditions using the `field_array` field, objects must match all the criteria in the field\_array, example: `[{field: "status", value: "unpaid"}]` will return all objects that in their data have the field `status` as `unpaid` ## Users When authentication is enabled, users are the only ones who can access the database, they can have roles that limit their capacity to access and modify the data, all users must have: `R || W || RW` ### ### Network Password Is encouraged to set a network password in order to ensure a secure communication among all nodes without security flaws. All nodes in the same network must have the same network password, read all about descentralization below Lear how you can scale satori horizontally without effort ### Memory balancing Satori can take up a lot of your computer's RAM, so, to fix that, Satori has a built-in memory balancing system that frees up memory when it has reached a critical point, because of that, satori stores objects as separate `json` files inside the `db` folder, this allows for faster reads whenever an object is not in memory because of memory saving matters. ## Learn more Learn about Satori data operations Learn about Satori system operations Learn about Satori ai operations Learn about what's comming next to Satori # Deploying Source: https://docs.satoridb.com/deploying In order to deploy Satori you will need to execute the docker image, you can get it with this command ```bash theme={null} docker pull svcudev2310/satori-linux ``` Then for execution run ```bash theme={null} docker run -p PORT:2310 svcudev2310/satori-linux ``` # Get Started Source: https://docs.satoridb.com/index ## Setting up Set up satori and start your journey. Get your docs set up locally for easy development ## Start here Here are our recommended sections Get a short, hands on example to start using satori right now Get information and examples on how to uses or languages SDKs Learn the basics and be ready to build your next app If you support this team's work please support us with your donation \<3 # Installing Source: https://docs.satoridb.com/install ```bash theme={null} npm i -g satoridb ``` Restart your console and run ```bash theme={null} satori ``` ## Updating You can update satori by running the command ```bash theme={null} satoridb update ``` # SDKs Source: https://docs.satoridb.com/sdks Satori provides SDKs for multiple languages such as More SDKs will be dropping as Satori's development progresses.