Skip to content

Commit

Permalink
feat: more coherent readme
Browse files Browse the repository at this point in the history
  • Loading branch information
davay42 committed May 10, 2023
1 parent a7bb266 commit d61f8be
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,40 @@

## Vue + Gun p2p crypto graph db toolkit

Gun-vue is where the peer-to-peer javascript database **Gun** meets the reactivity system of **Vue**. Pluggable components for UX designers. Easily importable composables for UI developers. Relay peer for p2p network enthusiasts. Demos and docs for beginners. Open source for everyone! ✊
Gun-vue is a versatile toolkit that combines the power of the peer-to-peer JavaScript database Gun with the reactivity system of Vue into small, but precise to the purpose apps for everyone to make, share, use and discard whenever we want. It offers pluggable components for UX designers to compose, easily importable composables for UI developers to use, and a 2 LOC starter Relay peer for new p2p network enthusiasts to run on almost any hardware. With growing collection of demos and documentation, Gun-Vue is open-source and accessible to everyone! ✊

## What is @gun-vue?

@gun-vue is a open collection of interconnected building blocks for making a whole range of decentralized apps for online and offline collaboration. It's a place where we can feel the nature of distributed networking and have fun together!

[Gun](https://gun.eco) is a CRDT based distributed graph database, [Vue](https://vuejs.org) is a reactive JS UI framework. And SEA is web-browser cryptography adapter. Together they evolve into an ecosystem of multiple app levels.

The project is committed to give all the basic tools for everyone to participate in exploring this new graph universe. You can find your own way in it for yourself.
@gun-vue is an open collection of interconnected building blocks designed for creating a wide range of decentralized apps for online and offline collaboration. It combines the strengths of Gun (a CRDT-based distributed graph database), Vue (a reactive JavaScript UI framework), and SEA (a web-browser cryptography adapter) to create an ecosystem of multiple app levels. The project aims to provide basic tools for everyone to participate in exploring this new graph universe and find their own way within it.

There code is organised into distinct layers in the [@gun-vue npmjs.com organisation](https://www.npmjs.com/org/gun-vue) for you to install and use in your P2P apps.

## @gun-vue/app

The main [gun-vue.js.org](https://gun-vue.js.org) web-site is a demo Gun-Vue Vite SPA. It's also automagically gets built into a set of desktop apps.
The main [gun-vue.js.org](https://gun-vue.js.org) web-site is a demo Gun-Vue SPA, which is also automatically built into a set of desktop apps as playground and example of what can be made with it today.

### [Web app](https://gun-vue.js.org) hosted at GitHub pages and JS.org domain

The app is reachable via the free [js.org](https://js.org) subdomain since [Jan 2022](https://github.com/js-org/js.org/commit/56a145bb39e53c6d63edf63b26d331cf30c35061). Yet it's build with the relative base path and can be served from any domain and path.
The app is accessible via the free for open source [js.org](https://js.org) subdomain since [Jan 2022](https://github.com/js-org/js.org/commit/56a145bb39e53c6d63edf63b26d331cf30c35061) and hosted at GitHub pages. It's built as a single HTML file that can be served from any domain or just opened as a local file. You can just press `Save Page As...` and have your local-first reactive p2p webapp with you everywhere.

### [Desktop app releases](https://github.com/DeFUCC/gun-vue/releases) via GitHub Actions and Tauri

Every time a new version of Gun-Vue is published, an automated action creates a new release draft with a full kit of lightweight native desktop apps for Windows, Mac OS and Linux with [Tauri](https://tauri.app) by a [GitHub Action](https://github.com/DeFUCC/gun-vue/actions/workflows/tauri.yml). Mobile apps are coming.
Whenever a new version of Gun-Vue is published, an automated action creates a new release draft with a full kit of lightweight native desktop apps for Windows, Mac OS and Linux with [Tauri](https://tauri.app) by a [GitHub Action](https://github.com/DeFUCC/gun-vue/actions/workflows/tauri.yml). Mobile apps are coming too. This is a very nice way to have Gun-Vue available in case of DNS interuptions. Local relay should become a part of it, especially once GUN Rust port is stable enougth to be somehow integrated into Tauri app structure. So it can be essentially a full GUN node in a <10Mb native app.


### [Open source code](https://github.com/DeFUCC/gun-vue/tree/master/src) at GitHub [pnpm](https://pnpm.io) monorepo

The code is cut into vertical slices as small interconnectable apps in the common [source folder](https://github.com/DeFUCC/gun-vue/tree/master/src).

This means that each folder in the `src` directory is a quite convenient section of the whole codebase. Each holds shared basic structure, but has distinct functionality.
This means that each folder in the `src` directory is a convenient section of the entire codebase, holding a shared basic structure but having distinct functionality.

All the code get build locally to the `_dist` folder and it's then deployed to the free [GitHub Pages](https://github.com/DeFUCC/gun-vue/tree/gh-pages) static site hosting.
All the source code gets built by GitHub Actions on each tag being published. The resulting HTML code goes to the `_dist` folder and is deployed to the [GitHub Pages](https://github.com/DeFUCC/gun-vue/tree/gh-pages) static site hosting.

---

## @gun-vue/components

Ready to use Vue 3 components as building blocks to implement Gun powered interactivity in seconds.
@gun-vue/components provides ready-to-use Vue 3 components as building blocks to implement Gun-powered interactivity in seconds.

<a href="https://www.npmjs.com/package/@gun-vue/components" target="_blank"><img src="https://img.shields.io/npm/v/@gun-vue/components?color=E23C92&logo=npm&style=for-the-badge" alt="NPM version"></a>

Expand All @@ -57,7 +53,7 @@ Native web-components may be implemented in future.

<a href="https://www.npmjs.com/package/@gun-vue/composables" target="_blank"><img src="https://img.shields.io/npm/v/@gun-vue/composables?color=E23C92&logo=npm&style=for-the-badge" alt="NPM version"></a>

Composable functions for use with Vue 3 Composition API
Composable functions for use with Vue 3 Composition API. They hold the core reactive logics that power the whole visual UI representation while being totally agnostic of it. You can combine these composables in Vanilla HTML+JS or import them into any of your existing static web-site builds for any realtime p2p activity.

### [Documentation](https://gun-vue.js.org/composables) with Typedoc and Vitepress

Expand All @@ -67,7 +63,7 @@ Composable functions for use with Vue 3 Composition API

## [@gun-vue/relay](https://github.com/DeFUCC/gun-vue/tree/master/relay)

A simple no-store Gun server to throw at any free tier Node.js environment.
A simple no-store Gun server to throw at any Node.js environment. From old laptops, Raspbery Pi's and free-tier hostings to high-load VPS and dedicated servers.

<a href="https://www.npmjs.com/package/@gun-vue/relay" target="__blank"><img src="https://img.shields.io/npm/v/@gun-vue/relay?color=E23C92&logo=npm&style=for-the-badge" alt="NPM version"></a>

Expand All @@ -80,15 +76,17 @@ A simple no-store Gun server to throw at any free tier Node.js environment.

You can find shorter feature announcements there along with longer live coding sessions.

## How to build the workspace repo yourself?
## How to build the workspace repo yourself

1. Clone the repo
2. Use [pnpm](https://pnpm.io/) to install all the dependencies in the workspaces
1. Clone this monorepo
2. Install [pnpm](https://pnpm.io/installation)
3. Use `pnpm i` to recursively install all dependencies in the workspaces
4. Use `pnpm run dev`, `pnpm run docs` and `pnpm run app` scripts in the root folder to run corresponding dev servers.
5. Use `builds` script to have all packages built and ready to be published in the `_dist` folder.

```bash
npm i -G pnpm
corepack enable
pnpm i
```

1. Use `dev` and `docs` scripts in the root `package.json` to run corresponding dev servers.
2. Use `npm run build` to build the whole project to the `_dist` folder.
pnpm run builds
open ./_dist/index.html
```
4 changes: 2 additions & 2 deletions src/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export default [

export const rootRoutes = {
"/": "Home",
"/my/": "User",
"/private/": "Messages",
"/space/": "Space",
"/chat/": "Chat",
"/posts/": "Posts",
Expand All @@ -23,7 +25,5 @@ export const rootRoutes = {
"/rooms/": "Rooms",
"/dict/": "Dictionary",
"/file/": "Files",
"/my/": "User",
"/private/": "Messages",
"/qr/": "QR Lab",
}
5 changes: 5 additions & 0 deletions src/space/SpaceStatus.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

<script setup>
import { defineProps, computed } from 'vue';
import { useUser } from '../user/useUser';
const { user } = useUser()
const props = defineProps({
pub: {
type: String,
},
content: {
type: String,
required: true
Expand Down

0 comments on commit d61f8be

Please sign in to comment.