You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Create a `.env` file based on required variables (see docker-compose.yml for reference)
24
+
25
+
3. Build and run with Docker Compose:
26
+
```bash
27
+
docker-compose up --build
28
+
```
29
+
30
+
This will start the API, database, Mork server, and Adminer for database management.
31
+
32
+
## Running Locally
33
+
34
+
### Using Docker Compose (Recommended)
35
+
36
+
```bash
37
+
docker-compose up
38
+
```
39
+
40
+
- API: http://localhost:8000 (or configured port)
41
+
- Frontend: Served via Vite dev server (run separately if needed)
42
+
- Adminer: http://localhost:8080
43
+
- Mork: http://localhost:8001
44
+
45
+
### Manual Setup
46
+
47
+
1.**Database**: Start PostgreSQL
48
+
2.**Mork**: Build and run the Mork server (see Dockerfile.mork). you can also run it from the official Mork repo (https://github.com/trueagi-io/MORK)
49
+
3.**Backend**:
50
+
```bash
51
+
cd api
52
+
cargo run
53
+
```
54
+
4.**Frontend**:
55
+
```bash
56
+
cd frontend
57
+
npm install
58
+
npm run dev
59
+
```
60
+
61
+
## Usage
62
+
63
+
### Spaces
8
64
9
65
A Knowledge Graph (KG) corresponds to a hierarchy of spaces. Each space has a name, which we refer to as its namespace. The root space is identified by the "/" namespace, while its direct subspaces (spaces on the second level of the hierachy) are identified by namespaces such as "/subspace1/", and so on.
10
66
11
67
Namespaces are similar to filesystem paths, especially when viewed as a tree. In this view, the difference is that for namespaces, interior nodes play the same role as leaf nodes, while their roles differ in the case of a filesystem path. In particular, every namespace in the hierachy identifies a space. Moreover, namespaces are never "terminal", meaning that it is always possible to embed subspaces further.
12
68
13
69
Spaces support two operations, read and write. As the name suggests, a read operation on a space provides a read-only view of that space. A write operation works by applying some transformations to the space, creating a new space in the process and preserving the original space. The newly created space is embedded into the space the write operation was used on.
14
70
15
-
### Namespace Rules
71
+
####Namespace Rules
16
72
17
73
A namespace should:
18
74
@@ -23,7 +79,7 @@ A namespace should:
23
79
- start with an alphanumeric character
24
80
- end with an alphanumeric character
25
81
26
-
## Tokens
82
+
###Tokens
27
83
28
84
Tokens give access to spaces in the KG by linking to their namespaces. A token has a number of associated permissions:
29
85
@@ -46,16 +102,61 @@ It is currently not possible to modify an existing token's namespace, descriptio
46
102
47
103
Tokens are managed on the `/tokens` page ([Demo](https://metta-kg.vercel.app/tokens)).
48
104
49
-
## Editor
105
+
###Editor
50
106
51
107
The editor allows you to interact with the contents of the KG using the [MeTTa](https://metta-lang.dev/) language.
52
108
53
109
The editor can be found on the `/` page ([Demo](https://metta-kg.vercel.app/)).
54
110
55
-
## Translations
111
+
###Translations
56
112
57
113
Documentation on translations can be found [here](./translations/README.md).
0 commit comments