Skip to content
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

feat(app): ml | cyberver | redesign | + more #1182

Merged
merged 335 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
335 commits
Select commit Hold shift + click to select a range
c8087e4
feat(rune): rune scripting and pipeline
dasein108 May 11, 2024
46f3a53
Merge branch 'master' into feat/ml-experementa
dasein108 May 11, 2024
6891685
Merge branch 'master' into feat/ml-experementa
dasein108 May 11, 2024
97ff18a
feat(rune): companion
dasein108 May 12, 2024
af8fe3f
fix(robot): router
dimakorzhovnik May 15, 2024
217d484
Merge branch 'master' of https://github.com/cybercongress/dot-cyber i…
dimakorzhovnik May 15, 2024
4971deb
fix(robot): update Display, Layout robot
dimakorzhovnik May 15, 2024
8a08a54
fix(app): robot sub menu
dimakorzhovnik May 16, 2024
99efc13
feat(embeddings): embed pipeline
dasein108 May 18, 2024
eb8cb6d
feat(rune): fix exaples, rune context, IDE
dasein108 May 21, 2024
263e19c
fix(rune): enable/disable rune script
dasein108 May 21, 2024
64c4888
fix(robot): robotHeader, feeds, Layout
dimakorzhovnik May 21, 2024
1a2ee0c
fix(rune): rerender fixes, fill queue in migration
dasein108 May 22, 2024
6ad8380
fix(db): init script bug
dasein108 May 22, 2024
34d3cc0
fix(rune): runtime deps loading
dasein108 May 23, 2024
cb8db35
chore(migration): migration info
dasein108 May 23, 2024
1c60c81
refactor(deffered): replace deffereddbapi with bus
dasein108 May 23, 2024
eb0660b
feat(app): add circular menu
OggyKUN May 23, 2024
69a5da2
fix(db): serialization for string
dasein108 May 25, 2024
5492725
feat(rune): rune docs
dasein108 May 25, 2024
39374a6
fix(rune): runtime
dasein108 May 25, 2024
12564b4
fix(rune): runtime
dasein108 May 25, 2024
6f1e34b
fix(ml): debug info
dasein108 May 25, 2024
2d3ad3f
fix(ml): debug info
dasein108 May 25, 2024
afa16c6
refactor(app): refactor submenu
OggyKUN May 25, 2024
215a155
fix(ml): debug info
dasein108 May 25, 2024
5143678
fix(ml): debug info
dasein108 May 25, 2024
0b713ad
fix(ml): local mdel
dasein108 May 26, 2024
2a9c497
feat(rune): documentation, serialization
dasein108 May 26, 2024
308921c
fix(app): fix loaders position
OggyKUN May 26, 2024
94ba9b4
fix(robot): header
dimakorzhovnik May 27, 2024
3d2d687
fix(rune): serialize response
dasein108 May 27, 2024
51a0f5d
fix(rune): output serialization bug
dasein108 May 27, 2024
b92c164
Merge branch 'master' into feat/ml-experementa
dasein108 May 27, 2024
88bc6eb
fix(queue): debug info)
dasein108 May 29, 2024
fa1d420
fix(tmp): tmp setup
dasein108 May 30, 2024
41ea92f
Merge branch 'master' of https://github.com/cybercongress/cyb-ts into…
May 31, 2024
52017db
fix(app): avoid to cache shared worker requests in service worker
May 31, 2024
3afc819
fix(app): failing build
May 31, 2024
67929b4
fix(robot): layout
dimakorzhovnik Jun 2, 2024
cc0e719
Merge branch 'feat/redesign-1' of https://github.com/cybercongress/do…
dimakorzhovnik Jun 2, 2024
9ab5247
refactor(swarm): tab Follows
dimakorzhovnik Jun 2, 2024
e966b96
fix(swarm): update CommunityEntity
dimakorzhovnik Jun 2, 2024
ae26b76
fix(sw): service worker, post processing
dasein108 Jun 3, 2024
1fb799c
Merge branch 'feat/ml-experementa' of github.com:cybercongress/cyb in…
dasein108 Jun 3, 2024
4eade11
fix(rune): remove unready code parts
dasein108 Jun 3, 2024
c6dfc88
fix(rune): postprocessing
dasein108 Jun 3, 2024
6eb1cc0
fix(ipfs): rm unused
dasein108 Jun 3, 2024
49c9f9a
fix(sw): disable
dasein108 Jun 3, 2024
426314f
fix(ipfs): fetch policy
dasein108 Jun 3, 2024
0c9df08
fix(serialization): plain context to channel
dasein108 Jun 3, 2024
cd2a549
fix(bus): rm AsynIterator fields
dasein108 Jun 3, 2024
00f6386
refactor(ipfs): ipfs contentType
dasein108 Jun 4, 2024
3f1be8d
refactor(ipfs): debug
dasein108 Jun 4, 2024
afbf02f
refactor(ipfs): debug
dasein108 Jun 4, 2024
bad1538
refactor(ipfs): disable sw
dasein108 Jun 4, 2024
999328c
fix(time): time history
dimakorzhovnik Jun 4, 2024
0363016
fix(app): added time history
dimakorzhovnik Jun 5, 2024
53fff60
fix(time): findSubItem
dimakorzhovnik Jun 5, 2024
23e0c26
feat(appmenu): add active menu button
OggyKUN Jun 6, 2024
cdde1fe
Merge branch 'feat/redesign-1' of github.com:cybercongress/cyb-ts int…
OggyKUN Jun 6, 2024
6665b50
fix(ipfs): reconnect, rm markdown
dasein108 Jun 6, 2024
1583967
chore(debug): debug info
dasein108 Jun 6, 2024
9904fd9
fix(queue): text obfuscation
dasein108 Jun 6, 2024
6ffa873
feat(preload): wasm to preloader
dasein108 Jun 7, 2024
26072f0
fix(loader): wasm preload
dasein108 Jun 8, 2024
c9ba71c
fix(preload): wasm preloader
dasein108 Jun 10, 2024
b1ac369
fix(loader): wasm loader
dasein108 Jun 10, 2024
778dd4b
fix(rune): deps, deffred db
dasein108 Jun 10, 2024
8a91890
chore(rune): deps
dasein108 Jun 10, 2024
aae4604
chore(rune): init deps
dasein108 Jun 10, 2024
3f9efdc
chore(rune): debug
dasein108 Jun 10, 2024
b5fcd84
fix(rune): debug info
dasein108 Jun 11, 2024
13b1353
Merge branch 'master' into feat/ml-experementa
dasein108 Jun 11, 2024
6b326d3
fix(rune): debug workwlow and fixes
dasein108 Jun 11, 2024
7180898
refactor(backend): huge decomposition
dasein108 Jun 12, 2024
89172b6
feat(ipfs): useParticle
dasein108 Jun 12, 2024
1978d06
fix(app): fix main menu behavior when manually change url
OggyKUN Jun 12, 2024
d911bff
feat(rune): move out uf queue
dasein108 Jun 12, 2024
570b3c8
refactor(workers): optimize workflow
dasein108 Jun 12, 2024
597a8b5
fix(queue): particle resolver
dasein108 Jun 12, 2024
375e2eb
Merge branch 'master' into feat/ml-experementa
dasein108 Jun 13, 2024
53f6134
fix(migration): migration schema bug
dasein108 Jun 13, 2024
ce915d1
refactor(app): groom types
dasein108 Jun 13, 2024
66a4fc4
fix(brain): treed view
dimakorzhovnik Jun 13, 2024
738515b
Merge branch 'feat/redesign-1' of https://github.com/cybercongress/do…
dimakorzhovnik Jun 13, 2024
1ee5b65
fix(brain): update get cid
dimakorzhovnik Jun 14, 2024
fd279b8
fix(robot): add sense
dimakorzhovnik Jun 15, 2024
acc46c7
fix(robot): sense for other user
dimakorzhovnik Jun 15, 2024
e740200
fix(robot): sense
dimakorzhovnik Jun 15, 2024
d093c61
Feat/ml experementa (#1178)
dasein108 Jun 17, 2024
2c7ec1e
fix(time): rotate item
dimakorzhovnik Jun 18, 2024
1967550
fix(time): update rotate
dimakorzhovnik Jun 18, 2024
186dfba
fix(app): current app
dimakorzhovnik Jun 19, 2024
deef2f6
fix(app): currentApp
dimakorzhovnik Jun 19, 2024
ee83d23
feat(app): restyle hydrogen button
OggyKUN Jun 20, 2024
59a3fc8
fix(app): nav, tab title, time
dimakorzhovnik Jun 24, 2024
8e37ce0
refactor(header): style CurrentApp
dimakorzhovnik Jun 25, 2024
417f9c1
fix(avatar): update query
dimakorzhovnik Jun 27, 2024
f5387c2
Merge branch 'dev' of https://github.com/cybercongress/dot-cyber into…
dimakorzhovnik Jun 27, 2024
61472fe
fix(app): minor fix
dimakorzhovnik Jun 27, 2024
74f588e
fix(karma): container
dimakorzhovnik Jun 27, 2024
fc508fc
feat(app): keys for secrets
dasein108 Jun 28, 2024
3cd6758
fix(app): scss
dimakorzhovnik Jun 29, 2024
9632275
feat(cyberver) (#1183)
happylolonly Jun 30, 2024
9ea833d
feat(rune): extend soul companion with openai
dasein108 Jun 30, 2024
342ca1c
Merge branch 'feat/ml-experementa' into dev
dasein108 Jun 30, 2024
39ffc33
Merge branch 'dev' of https://github.com/cybercongress/dot-cyber into…
dimakorzhovnik Jun 30, 2024
f714255
fix(app): fix after merge
dimakorzhovnik Jun 30, 2024
6ccc626
fix(app): redesign (#1114)
dimakorzhovnik Jun 30, 2024
ac773e8
fix and refactor
happylolonly Jul 1, 2024
a86b827
fix storybook
happylolonly Jul 1, 2024
66559fc
hide cyberver
happylolonly Jul 1, 2024
3ce44d4
Merge branch 'dev' into fix-get-avatar
dimakorzhovnik Jul 1, 2024
56faa07
fix script error
happylolonly Jul 2, 2024
1c2a0cb
improve warp
happylolonly Jul 2, 2024
9c42bca
improve sigma
happylolonly Jul 2, 2024
d36d878
move hooks
happylolonly Jul 2, 2024
2ce6116
update teleport
happylolonly Jul 2, 2024
60320ab
change title logic
happylolonly Jul 2, 2024
8f9ab82
add display
happylolonly Jul 2, 2024
62f4ab8
fix(app): improvements, fixes (#1186)
happylolonly Jul 2, 2024
1b92ce4
fix(avatar): update query (#1184)
happylolonly Jul 2, 2024
1c06583
feat(rune): rune ide as separate component
dasein108 Jul 2, 2024
013fa06
feat(rune): multiple scripts
dasein108 Jul 3, 2024
35fbd03
Merge branch 'master' into dev
happylolonly Jul 3, 2024
8f39b6b
improve senate and select component
happylolonly Jul 3, 2024
82f06fe
refactor
happylolonly Jul 3, 2024
0d2bb42
change color
happylolonly Jul 3, 2024
01ca734
add stars
happylolonly Jul 3, 2024
46492dc
refactor
happylolonly Jul 3, 2024
b3c93da
fix(app): energy, refactor IconsNumber
dimakorzhovnik Jul 3, 2024
e428dac
fix(sub-menu): added blur, fix icon position
dimakorzhovnik Jul 3, 2024
568e884
fix(brain): max height in list view
dimakorzhovnik Jul 3, 2024
bde674e
feat(rune): ide
dasein108 Jul 4, 2024
4ecaf50
add voice
happylolonly Jul 4, 2024
3b46b87
update
happylolonly Jul 4, 2024
2224a53
feat(rune): ide, async callback impl
dasein108 Jul 5, 2024
d58e3c8
Merge branch 'feat/ml-experementa' into dev
dasein108 Jul 5, 2024
2aa9f3f
refactor(app): fix style duplication in sense and hydrogen buttons
OggyKUN Jul 4, 2024
59b0b0d
fix(soul): crash image particle
dasein108 Jul 8, 2024
4b277ce
Merge branch 'feat/ml-experementa' into dev
dasein108 Jul 8, 2024
6947285
feat(secrets): lil fix
dasein108 Jul 8, 2024
28e952d
fix(ipfs): fix ipfs reconnect, secrets ui
dasein108 Jul 10, 2024
01c4e72
Merge branch 'feat/ml-experementa' into dev
dasein108 Jul 10, 2024
7ba9c03
fix(keys): icon
dasein108 Jul 10, 2024
1a49323
Merge branch 'feat/ml-experementa' into dev
dasein108 Jul 10, 2024
b3bf743
clean
happylolonly Jul 11, 2024
ffe2e0e
feat(app): to dev (#1187)
happylolonly Jul 11, 2024
b63727d
Merge branch 'dev' into feat/adviser-voice
happylolonly Jul 11, 2024
cd954ca
add comment
happylolonly Jul 11, 2024
f8bebf4
Fix/fixes dev redisign (#1189)
dimakorzhovnik Jul 12, 2024
0882a4c
fix(time): time footer, createdAt
dimakorzhovnik Jul 14, 2024
f72c40e
fix(sidebuttons): fix naming
OggyKUN Jul 14, 2024
89bd996
fix(app): mainContainer
dimakorzhovnik Jul 14, 2024
0c1f5f8
fix(app): commander
dimakorzhovnik Jul 14, 2024
9346068
feat(adviser): add voice (#1188)
happylolonly Jul 15, 2024
2600b87
refactor(pr): fix comment
dimakorzhovnik Jul 15, 2024
44f99ef
fix(time): time footer, createdAt, mainContainer (#1191)
dimakorzhovnik Jul 15, 2024
e0e1789
fix(app): add settings btn, hfr
dimakorzhovnik Jul 15, 2024
2275163
feat(appmenu): adviser show name of the menu buttons
OggyKUN Jul 16, 2024
8dcd073
feat(appmenu): add mobile menu
OggyKUN Jul 16, 2024
3487f6b
fix(app): mainContainer
dimakorzhovnik Jul 17, 2024
e18f6f6
feat(appmenu): add hover for circular menu
OggyKUN Jul 17, 2024
b5db56b
fix(appmenu): fix cyberver button style
OggyKUN Jul 17, 2024
f7cac90
fix(app): subMenu
dimakorzhovnik Jul 17, 2024
93f0149
fix(app): refactor sideBar
dimakorzhovnik Jul 17, 2024
a80f62e
fix(app): refactor actionBar state
dimakorzhovnik Jul 17, 2024
d4382c8
fix(app): sense and robot container
dimakorzhovnik Jul 17, 2024
48b4625
Merge branch 'dev' into fix/redesign
OggyKUN Jul 18, 2024
5e85fc3
fix(appmenu): fix conflict
OggyKUN Jul 18, 2024
20c7ec2
feat(logging): lil fix
dasein108 Jul 18, 2024
ce3231a
fix(app): genesis, iconsNumber
dimakorzhovnik Jul 18, 2024
c3f2f5c
fix(genesis): calc height
dimakorzhovnik Jul 18, 2024
86905b9
fix/redesign (#1190)
happylolonly Jul 19, 2024
ade4a2a
Merge branch 'dev' into fix/fixes-dev-redisign-2
dimakorzhovnik Jul 19, 2024
2261b82
fixes/redesign (#1193)
dimakorzhovnik Jul 19, 2024
33cf2fc
fix styles
happylolonly Jul 19, 2024
740c455
add adviser voice settings
happylolonly Jul 19, 2024
14a804a
fix(app): styles
dimakorzhovnik Jul 19, 2024
5d0b86d
feat(appmenu): add circular menu adaptivity
OggyKUN Jul 19, 2024
a758717
feat(appmenu): add circular menu adaptivity (#1201)
dimakorzhovnik Jul 19, 2024
7893ff9
fix(app): to dev styles (#1200)
dimakorzhovnik Jul 20, 2024
405c3b5
feat(app): to `dev` updates (#1199)
happylolonly Jul 20, 2024
be4272f
fix(appmenu): adaptive circular menu fix
OggyKUN Jul 21, 2024
70a2025
feat(mobilemenu): integrated OnClickOutside hook
OggyKUN Jul 21, 2024
b5a83ad
fix(app): robot, timeHistory
dimakorzhovnik Jul 21, 2024
ea000d2
add cid resolving
happylolonly Jul 22, 2024
1e8b2bd
update
happylolonly Jul 22, 2024
b7e5156
fix(rune): fix soul
dasein108 Jul 22, 2024
132e0ff
Merge branch 'feat/ml-experementa' into dev
dasein108 Jul 22, 2024
6508d04
fix(app): layout
dimakorzhovnik Jul 22, 2024
03a5ba3
replace tooltip to adviser
happylolonly Jul 23, 2024
36923e6
hide audio settings
happylolonly Jul 23, 2024
734d9fe
add map
happylolonly Jul 23, 2024
bcf36c9
update map
happylolonly Jul 23, 2024
a1656d4
update
happylolonly Jul 23, 2024
0f7a5f1
remove
happylolonly Jul 23, 2024
c434ee0
fix(appmenu): adaptive circular menu change (#1202)
OggyKUN Jul 23, 2024
c96b094
refactor(mobile-menu): small refac due to reviews 1190/1202
OggyKUN Jul 23, 2024
68108d8
refactor(circular-menu): css naming fix
OggyKUN Jul 23, 2024
7606ce6
refactor(adviser): changed to newer hook useAdviserTexts
OggyKUN Jul 23, 2024
f853a43
fix(app): robot, header
dimakorzhovnik Jul 23, 2024
1e40599
update
happylolonly Jul 24, 2024
735cdd4
fix(temple-button): fix hover
OggyKUN Jul 24, 2024
d01976c
feat(social): changed hub link
OggyKUN Jul 24, 2024
add3a82
refactor(appmenu): rename itemsMenu -> getMenuItems
OggyKUN Jul 24, 2024
8c2389b
refactor(appmenu): changed menues file structure
OggyKUN Jul 24, 2024
43fb4db
fix(app): styles, footer, time
dimakorzhovnik Jul 24, 2024
b8081cc
add analytics
happylolonly Jul 24, 2024
9d64dfd
feat(app): updates (#1205)
happylolonly Jul 24, 2024
b2cc2e0
fix(app): robot Layout, timeHistory (#1203)
dimakorzhovnik Jul 24, 2024
61f5c6a
refactor(appmenu): move the duplicate logic into hook
OggyKUN Jul 24, 2024
7add72d
refactor(appmenu): small refactor (#1206)
OggyKUN Jul 24, 2024
d88ae9f
move header to component
happylolonly Jul 26, 2024
0813028
decrease loading
happylolonly Jul 26, 2024
f8515dd
fix not address cid follow
happylolonly Jul 26, 2024
30a86c0
remove preload logic
happylolonly Jul 26, 2024
e35d138
add glass bg
happylolonly Jul 26, 2024
dd746fe
move to atoms
happylolonly Jul 26, 2024
05e0c1d
Merge branch 'dev' into feat/graph-cid-resolving
happylolonly Jul 26, 2024
ec5be0a
refact
happylolonly Jul 26, 2024
af089f7
feat(graph): cid resolving (#1204)
happylolonly Jul 26, 2024
bce746f
remove line height
happylolonly Jul 26, 2024
987e928
fix(app): subApp
dimakorzhovnik Jul 26, 2024
e8cc540
Merge branch 'dev' of https://github.com/cybercongress/dot-cyber into…
dimakorzhovnik Jul 26, 2024
b5415a9
chore(dev): backmerge from master
Jul 26, 2024
c238ef7
fix(appmenu): change mobile-breakpoint to 1280
OggyKUN Jul 26, 2024
5bfee6f
fix(app): added icon to subItem
dimakorzhovnik Jul 27, 2024
8a19529
fix(app): added link to docs
dimakorzhovnik Jul 27, 2024
7cc890b
fix(bridge): fix actionBar
dimakorzhovnik Jul 27, 2024
bdaf91d
remove key
happylolonly Jul 27, 2024
6604557
fix adviser z-index
happylolonly Jul 27, 2024
f4c62c3
change brain link
happylolonly Jul 27, 2024
3fdafba
skip pussy balance request
happylolonly Jul 27, 2024
7c02f55
fix(app): settings container, key wrapper
dimakorzhovnik Jul 27, 2024
19d8607
feat(app): fixes (#1209)
happylolonly Jul 27, 2024
5e09e23
feat(appmenu): add external button clickable area
OggyKUN Jul 27, 2024
d5ad3af
feat(appmenu): add hover transition
OggyKUN Jul 27, 2024
f3b84e2
fix(sense): optimizations (#1208)
happylolonly Jul 27, 2024
8d9fa7e
fix merge
happylolonly Jul 27, 2024
d111dc3
chore(dev): backmerge from master (#1212)
happylolonly Jul 27, 2024
4ec0682
fix/navigation (#1211)
dimakorzhovnik Jul 27, 2024
1a9442f
fix(appmenu): fixes and improvements (#1213)
OggyKUN Jul 28, 2024
da29c6c
fix(app): subItem, settings container
dimakorzhovnik Jul 28, 2024
9beac1d
fix(app): fix AppName
dimakorzhovnik Jul 28, 2024
6931dd3
fix(app): set app name
dimakorzhovnik Jul 29, 2024
b3ac703
Merge branch master into dev
dr-leevsey Jul 29, 2024
96b9b2b
Chore/merge master into dev (#1215)
happylolonly Jul 29, 2024
fc8df10
fix(app): subItem, settings container (#1214)
dimakorzhovnik Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CHAIN_ID = space-pussy
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"FileReader": true,
"cyblog": "readonly"
},

"rules": {
"valid-jsdoc": "off",
"no-shadow": "off",
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ yarn-error.log*
src/.DS_Store

storybook-static
.env
.env.*.local

# Local Netlify folder
.netlify
4 changes: 4 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ const config: StorybookConfig = {
test: /\.cozo$/,
use: 'raw-loader',
},
{
test: /\.rn$/,
type: 'asset/source',
},
],
},
};
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"cybercongress",
"cyberlink",
"cyberlinks",
"cybernet",
"denoms",
"helia",
"investmint",
Expand All @@ -13,6 +14,8 @@
"negentropy",
"stylelint",
"superintelligence",
"websockets",
"cyberver",
"websockets"
],
"eslint.enable": true,
Expand All @@ -23,7 +26,7 @@
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"css.validate": false,
"less.validate": false,
Expand Down
213 changes: 178 additions & 35 deletions docs/backend.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,194 @@
# Backend Architecture
# CYB local backend(in-browser)

Cyb plays singinficat role in cyber infrastructure. The app reconstruct self-sufficient backend+frontend pattern inside the browser.
In big view app consist from 3 parts:

```mermaid
graph TD;
App["frontend\n(main thread)"]-.proxy.->Backend["backend\n(shared worker)"];
App-.proxy.->Db["graph db\n(shared worker)"];
Backend-.proxy.->Db;
App<-.message\nchannels.->Backend;
```

subgraph frontend["frontend(main thread)"]
App["Frontend"]-->Hook["useBackend()"];
Hook-->methods("startSync()\nloadIpfs()\n...\nisReady\nipfsError\n...");
Hook-.broadcast channel\n(any worker).->reducer["redux(state)"]
Hook-.save history from app.->defferedDbApiFront[/"DefferedDbApi(proxy)"/]
Hook--osenseApi["senseApi"];
Hook--oipfsApiFront[/"ipfsApi(proxy)"/];
senseApi--odbApi[/"dbApi(proxy)"/];
end
To reduce overload of main thread we have created 2 separate shared workers, where all the stuff is hosted. Bi-interraction between all layers occurs using proxy(comlink abstraction) or directly using broadcast channels.

dbApi<-.message channel.->dbWorker["dbApi"];
subgraph dbWorkerGraph["cyb~db(worker)"]
dbWorker<-.bindings(webApi).->cozodb{{"CozoDb(wasm)"}}
end
## Db layer

Db worker is pretty simple it it's host only local relational-graph-vector database - [[cozo]]. It's represented with DbApi in frontend and backend layers.
Cozo provide bazing fast access to brain and ipfs data in relational form and also in vector format, processing by [ml]embedder.

defferedDbApiFront-.->defferedDbApi;
ipfsApiFront<-.->ipfsApi;
subgraph backgroundWorker["cyb~backend(worker)"]
subgraph sync["sync service"]
ipfsNode["ipfs node"];
links;
transactions;
```mermaid
graph TD;
dbApi["dbApi"]--odb_meta_orm;
subgraph rune["cozo db"]
db_meta_orm[["meta orm"]]-.->db;
end
sync--oparticleResolver[["Particle resolver"]]
particleResolver--oqueue;
particleResolver--odbProxyWorker;
sync--oipfsApi;
sync--odbProxyWorker[/"dbApi(proxy)"/];
defferedDbApi[["defferedDbApi"]]-->dbProxyWorker;
queue-->defferedDbApi;
ipfsApi--oqueue[["queue"]];
ipfsApi--onode["node"];
queue--balancer-->node;
node--embedded-->helia;
node--rpc-->kubo;
node--embedded-->js-ipfs;
```

### Db entities

- brain:
- particles
- embeddings
- links
- transactions
- community
- sense:

- sync items + update status

- system:
- config
- queue messages

## Backend layer

Backend worker is more complicated it contains significant elements of cyb architecture:

```mermaid
graph TD;
subgraph Backend["backend(shared worker)"]

subgraph ipfs["ipfs implementations"]
helia;
kubo;
js-ipfs;
end

dbProxyWorker<-.message channel.->dbWorker
subgraph queues["message brokers"]
ipfs_queue["ipfs load balancer"];
queue["data processing queue aka bus"];
end

subgraph rune["rune"]
vm["virtual machine"]--ovm_bingen{{"cyb bindings"}};
end

subgraph sense["sense"]
link_sync["link sync"];
msg_sync["message sync"];
swarm_sync["swarm sync"];
end

subgraph ml["ML transformers"]
feature_extractor["embedder"];
end

end
```

### Ipfs module

Represented with IpfsApi at frontend layer, but also have direct access for some edge cases

- Uses module that encapsulate different Ipfs implementations(kubo, helia, js-ipfs(obsolete))
- cache content(local storage & cozo)
- preserve redundancy
- Ipfs queue, process all requests to ipfs, prioritize, cancel non-actual requests and organize content pipeline
- responsible for:
- ipfs load balancing(limit of requests)
- request prioritizing(actual requests first)
- fault processing(switch fetch policy)
- post processing(**inline rune vm** into pipeline)

```mermaid
graph LR
user(ipfsApi\nenqueue particle) --> q[["queue\n(balancer)"]] --> node[/"ipfs"/] -- found --> rune[rune vm] -- mutation | content --> cache["cache"] --> app(app\ncontent)
node -. not found\n(retry | error) .-> q
```

## Bus

Represented with some helpers and used for cases when blaancer is needed, some services not initialized yet(deffered actions), or long calculations is requered(ml inference, ipfs requests):

- particle, request ipfs, save; calc embedding
- link, deffered save
- message persistence is protected by db store

```mermaid
graph TD;
sender{{"enqueue(...)"}} -.message bus.-> bus
subgraph task["task manager"]
bus[["queue listener"]];

bus-.task.->db("store\ndata")--odb1["dbApi"];
bus-.task.->ml("calculate\nembedding")--oml1["mlApi"];
bus-.task.->ipfs("request ipfs\nlow-priority")--oi["ipfsApi"]
end
```

## Sense

Represented by SenseApi + subscription to broadcast channel at fronted layer. Provide continious update of cyberlinks related to my brain and my swarm, recieving on chain messages etc.:

- Particles service (pooling)
- Transactions service (pooling + websocket)
- My friends service (pooling)
- Ipfs service(pooling)

All data and update status is stored into db, when some new data is recieved that triggers notification for frontendю

```mermaid
graph TD;
db[["dbApi"]];
bus[["particle queue"]];

subgraph sense["sync service"]
notification("notification service")

particles[["particle service"]]--onotification;
transactions[["transaction service"]]--onotification;
myfriend[["my friends service"]]--onotification;

particles -.loop.-> particles;
transactions -.loop.-> transactions;
myfriend -.loop.-> myfriend;
end


subgraph blockchain["blockchain"]
lcd[["lcd"]]
websockets("websockets")
indexer[["indexer"]]
end

subgraph app["frontend"]
redux["redux"]
sender{{"senseApi"}};
end

notification -.message.-> redux;
sender -.proxy.-> db;
sense -.proxy.-> db;
sense -.message.-> bus;
bus -.proxy.-> db;

sense <-.request\nsubscriptin.->blockchain;

```

## Rune

Rune VM execution is pipelined thru special abstraction called entrypoints. VM have bindings to all app parts: DB, transformers, signer, blockchain api, ipfs and also includes context of the entrypoint.(see. [[scripting]] for detailed description).

## ML transformers

Represented my mlApi. Uses inference from local ML models hosted inside browser.

- future extractor. BERT-like model to trnsform text-to-embeddings.

```mermaid
graph TD;
subgraph ml["transformers"]
embedder["embedder"];
end

subgraph dbApi["dbApi"]
db[["DB"]];
end
mlApi["mlApi"];

mlApi--odb;
mlApi--oembedder;
```
Loading
Loading