Skip to content

Commit

Permalink
Spliting canvas-server/client, non-working refactor v1, TBC
Browse files Browse the repository at this point in the history
  • Loading branch information
idncsk committed Mar 10, 2024
1 parent c85b822 commit 1ade15c
Show file tree
Hide file tree
Showing 423 changed files with 21 additions and 85,334 deletions.
18 changes: 2 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
## App config
/config/**
!/config/transports.json
!/config/apps.json
!/config/roles.json
!/config/services.json
!/config/identities.json
!/config/aliases.json
!/config/colors.json
!/config/socket.io-server.json
!/config/jsonapi-server.json
!/config/canvas.json
!/config/example-*.json
!/config/.keep

## Var directories
/var/**
!/var/.keep
#/var/log/**
#/var/run/**
#/var/tmp/**

## Portable runtimes
/runtime/**
Expand All @@ -26,10 +16,6 @@
/user/**
!user/.keep
!user/.ignore
/data/**
!data/.keep
/home/**
!home/.keep

## Dev
/.vscode
Expand Down
88 changes: 18 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,20 @@ There are couple of motivating factors for this project:

## Architecture

**Canvas server** manages your (not exclusively digital) universe. It hosts the global context tree, stores all layers and indexes all your apps, roles, utils, dotfiles and data. It is also a proxy between your data backends and your client, exporting your contextualized OS environment through various transports(REST API, socket.io, IPC, webdav).
**Canvas server**
Moved to a separate repo:
- https://github.com/idncsk/canvas-server

Manages your entire (not exclusively digital) universe. Server hosts your global context tree, stores all layers and indexes all your Apps, Roles, Utils, Dotfiles and data. It is also a proxy between your data backends and your client, exporting your contextualized OS environment configuration through various transports(REST API, socket.io, IPC, webdav).

**Canvas client**
Client repositories:
- https://github.com/idncsk/canvas (default desktop client)
- https://github.com/idncsk/canvas-ui-shell
- https://github.com/idncsk/canvas-ui-firefox
- https://github.com/idncsk/canvas-ui-chrome

**Canvas client** is managing the presentation layer (OS UI), and OS integration. It ensures all configured apps(flatpak), local roles(docker/podman), utils(stored), dotfiles(git) and data(stored) are available on your host system. You can pin a canvas client to a specific workspace(context), lets say your work notebook to universe://work and your htpc to universe://home/living-room, both with its own (sub-)set of apps, roles, utils, dotfiles and data visibility limited to the pinned context subtree.
Client runtime [on a linux OS] ensures all configured apps(flatpak), local roles(docker/podman), utils(stored), dotfiles(git) and data(stored) are available on your host system for the context you are currently working in. You can pin a canvas client to a specific workspace(context), for example say your work notebook to `universe://work` and your htpc to `universe://home/living-room`, both with its own (sub-)set of apps, roles, utils, dotfiles and data visibility limited to the pinned context subtree.


Some of the technologies used in no particular order:
Expand All @@ -145,59 +156,13 @@ Some of the technologies used in no particular order:

## Installation instructions

### ! Slowly separating *some* of the modules into their own repos for easier maintainability
### Bash client

- https://github.com/idncsk/canvas-ui-shell
- https://github.com/idncsk/canvas-ui-firefox
- https://github.com/idncsk/canvas-ui-chrome

### Canvas server

```bash
$ git clone git@github.com:idncsk/canvas.git /path/to/canvas
$ cd /path/to/canvas/app
$ npm install
$ npm run server # Server backend only
$ npm run repl # Server repl CLI
```

(Optional): Add `/path/to/canvas/bin` to your `$PATH`

```bash
$ echo PATH="$PATH:/path/to/canvas/bin" >> ~/.bashrc
```

### Canvas bash client

You can also install a bare-bones bash REST client:

```bash
$ git clone git@github.com:idncsk/canvas-ui-shell.git /path/to/canvas-shell
$ echo ". /path/to/canvas-shell/context.sh" >> ~/.bashrc
$ cd /path/to/canvas/app && npm run server
```

Currently, we only support a very limited API used mainly for development/testing purposes

- set: Sets a context URL
- url: Returns the current context url
- path: Returns the current context path
- paths: Returns the path representation of the current context tree
- tree: Returns the full Canvas context tree in plain JSON format
- bitmaps: Returns a summary of all in-memory bitmaps for the current context
- list: Lists all documents linked to the current context
- tabs: data/abstraction/tab
- notes: data/abstraction/note
- todo: data/abstraction/todo

### Canvas firefox extension

To install the firefox browser extension:
### Firefox extension

- Open your browser and navigate to
**about:debugging#/runtime/this-firefox**
- Click on "Load Temporary Add-on"
- Navigate to canvas/ext/browser/firefox
- https://github.com/idncsk/canvas-ui-firefox


### Portable installation
Expand All @@ -212,9 +177,8 @@ For **portable** use, download and extract nodejs and electron into the canvas/r

## Configuration paths

Global app config: ``canvas/config``
Default user home for portable use: ``canvas/user``
default user home: ``$HOME/.canvas``
Default user home for portable use: `canvas/user`
Default user home: `$HOME/.canvas`

Environment variables:

Expand All @@ -227,21 +191,6 @@ Environment variables:
- NODE_ENV
- LOG_LEVEL

<br />


## Using Canvas | CLI

TODO

## Using Canvas | REPL

TODO

## Using Canvas | RestAPI

TODO

## Social

I'm trying to motivate myself to do daily code updates by doing not-yet-but-soon-to-be live coding sessions(~~usually ~5AM - 6AM CEST~~). Wouldn't watch any of the existing videos _yet_, mostly OBS audio tests and a showcase of sleep deprivation, but you can subscribe for updates nevertheless.
Expand All @@ -261,7 +210,6 @@ YT Channel + Some (royalty-free) music used in my videos
- By sponsoring some quality coffee via
- <https://opencollective.com/idncsk>
- <https://www.buymeacoffee.com/idncsk>
- **Or**, since I'd like to work on this project in an official part-time setup(stop saying open-source is free, it's not), by a monthly recurring payment of 10EUR (I tolerate some margin of error:) to IBAN: SK95 8330 0000 0023 0250 2806

**Any suggestions welcome** ("you should use \<module\> to do \<stuff\> instead of \<whatever nightmare you have currently implemented\>"), as a hobby-programmer this is really appreciated!

Expand Down
20 changes: 0 additions & 20 deletions app/.eslintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion app/.npmrc

This file was deleted.

1 change: 0 additions & 1 deletion app/.nvmrc

This file was deleted.

22 changes: 0 additions & 22 deletions app/canvas-server.js

This file was deleted.

Loading

0 comments on commit 1ade15c

Please sign in to comment.