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

refactor(chatio): delete everything and start fresh #42

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
/node_modules
.eslintrc.js
babel.config.js
/src-ssr
/src-ssr
42 changes: 21 additions & 21 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
const { resolve } = require('path');
module.exports = {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
root: true,

// https://eslint.vuejs.org/user-guide/#how-to-use-custom-parser
// https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
// Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
// `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
parserOptions: {
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#configuration
// https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#eslint
// Needed to make the parser take into account 'vue' files
parser: require.resolve('@typescript-eslint/parser'),
extraFileExtensions: ['.vue'],
parser: '@typescript-eslint/parser',
project: resolve(__dirname, './tsconfig.json'),
tsconfigRootDir: __dirname,
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module' // Allows for the use of imports
},

env: {
browser: true
browser: true,
es2021: true,
node: true,
'vue/setup-compiler-macros': true,
},

// Rules order is important, please avoid shuffling them
Expand All @@ -32,8 +27,6 @@ module.exports = {
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
// ESLint typescript rules
'plugin:@typescript-eslint/recommended',
// consider disabling this class of rules if linting takes too long
'plugin:@typescript-eslint/recommended-requiring-type-checking',

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
Expand All @@ -44,14 +37,14 @@ module.exports = {

// https://github.com/prettier/eslint-config-prettier#installation
// usage with Prettier, provided by 'eslint-config-prettier'.
'prettier'
'prettier',
],

plugins: [
// required to apply rules which need type information
'@typescript-eslint',

// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue',

Expand All @@ -70,19 +63,26 @@ module.exports = {
__QUASAR_SSR_PWA__: 'readonly',
process: 'readonly',
Capacitor: 'readonly',
chrome: 'readonly'
chrome: 'readonly',
},

// add your custom rules here
rules: {
'prefer-promise-reject-errors': 'off',

// TypeScript
quotes: ['warn', 'single', { avoidEscape: true }],

// this rule, if on, would require explicit return type on the `render` function
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',

// in plain CommonJS modules, you can't use `import foo = require('foo')` to pass this rule, so it has to be disabled
'@typescript-eslint/no-var-requires': 'off',

// The core 'no-unused-vars' rules (in the eslint:recommended ruleset)
// does not work with type definitions
'no-unused-vars': 'off',

// allow debugger during development only
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
}
}
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
};
7 changes: 4 additions & 3 deletions .postcssrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
/* eslint-disable */
// https://github.com/michael-ciniawsky/postcss-load-config

module.exports = {
plugins: [
// to edit target browsers: use "browserslist" field in package.json
require('autoprefixer')
]
}
require('autoprefixer'),
],
};
5 changes: 4 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"octref.vetur"
"editorconfig.editorconfig",
"johnsoncodehk.volar",
"wayou.vscode-todo-highlight"
],
"unwantedRecommendations": [
"octref.vetur",
"hookyqr.beautify",
"dbaeumer.jshint",
"ms-vscode.vscode-typescript-tslint-plugin"
Expand Down
10 changes: 6 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"vetur.validation.template": false,
"vetur.format.enable": false,
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": true,
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
"typescript.tsdk": "node_modules/typescript/lib",
"vetur.experimental.templateInterpolationService": true
"typescript.tsdk": "node_modules/typescript/lib"
}
52 changes: 23 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,39 @@
# chatio

A peer-to-peer audio/video PWA.
A peer-to-peer audio/video progressive web application desgined for mobile, desktop, and tablets.

## Table of Contents

* [Getting Started](#getting-started)
* [Security](#security)
* [Contributing](#contributing)
* [Development](#development)
* [Commit Standards](#commit-standards)
- [Getting Started](#getting-started)
- [In a Call](#in-a-call)
- [Technical Details](#technical-details)
- [Trust](#trust)
- [Message Specification](#message-specification)
- [Audio/Video Transmission](#audio/video-transmission)

## Getting Started

`chatio` is currently completely browser based which means you'll need an internet connection to use it for the first time. After that, it will be saved to your device and be used on any local network your connected to so long a signaling server is in reach.
To begin, simply navigate to [https://z5labs.github.io/chatio](https://z5labs.github.io/chatio) where you
will be presented with the home page of **chatio**. From there you can start
a new call with the simple tap of a button.

## Security
### In a Call

All peer traffic is encrypted and there is work under way for making `chatio` calls more secure.
_TODO_

### Development
## Technical Details

#### Installing
```bash
yarn
```
**chatio** is built on [libp2p](https://libp2p.io), a modular peer-to-peer network
stack, which powers many other decentralized networks including [Ethereum](https://ethereum.org).

#### Dev server
```bash
quasar dev
```
### Trust

#### Linting
```bash
yarn run lint
```
_TODO_

#### Build in production mode
```bash
quasar build
```
### Message Specification

### Commit Standards
`chatio` follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec in order
to have clear and concise messages, as well as, an auto-generated changelog using [standard-version](https://github.com/conventional-changelog/standard-version).
_TODO_

### Audio/Video Transmission

_TODO_
17 changes: 8 additions & 9 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
/* eslint-env node */
/* eslint-disable */

module.exports = api => {
module.exports = (api) => {
return {
presets: [
[
'@quasar/babel-preset-app',
api.caller(caller => caller && caller.target === 'node')
api.caller((caller) => caller && caller.target === 'node')
? { targets: { node: 'current' } }
: {}
]
]
}
}

: {},
],
],
};
};
59 changes: 35 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
{
"name": "chatio",
"version": "0.0.1",
"description": "Peer to peer video/audio client",
"description": "A P2P Audio/Video PWA",
"productName": "chatio",
"author": "Z5Labs <[email protected]>",
"author": "Z5Labs",
"private": true,
"scripts": {
"dev": "quasar dev",
"build": "quasar build",
"lint": "eslint --ext .js,.ts,.vue ./",
"format": "prettier --write \"**/*.{js,ts,vue,scss,html,md,json}\" --ignore-path .gitignore",
"test": "echo \"No test specified\" && exit 0"
},
"dependencies": {
"@chainsafe/libp2p-gossipsub": "^1.0.0",
"@chainsafe/libp2p-noise": "^6.1.1",
"@libp2p/crypto": "^0.22.13",
"@libp2p/interfaces": "^1.3.32",
"@libp2p/kad-dht": "^1.0.12",
"@libp2p/mplex": "^1.0.5",
"@libp2p/peer-collections": "^1.0.2",
"@libp2p/peer-id": "^1.1.10",
"@libp2p/peer-id-factory": "^1.0.10",
"@libp2p/pubsub": "^1.2.23",
"@libp2p/utils": "^1.0.10",
"@libp2p/webrtc-star": "^1.0.10",
"@libp2p/websockets": "^1.0.8",
"@multiformats/multiaddr": "^10.1.8",
"@quasar/extras": "^1.0.0",
"buffer": "^6.0.3",
"core-js": "^3.6.5",
"jose": "^3.14.0",
"libp2p": "^0.31.7",
"libp2p-gossipsub": "^0.10.0",
"libp2p-kad-dht": "^0.22.0",
"libp2p-mplex": "^0.10.3",
"libp2p-noise": "^3.0.0",
"libp2p-webrtc-star": "^0.22.4",
"libp2p-websockets": "^0.15.9",
"peer-id": "^0.14.8",
"process": "^0.11.10",
"quasar": "^2.0.0",
"ts-proto": "^1.82.0",
"vue-i18n": "^9.0.0-beta.0",
"vuex": "^4.0.1"
"libp2p": "0.37.0",
"pinia": "^2.0.11",
"protobufjs": "^6.11.2",
"quasar": "^2.6.0",
"vue": "^3.0.0",
"vue-i18n": "^9.0.0",
"vue-router": "^4.0.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.13.14",
"@quasar/app": "^3.0.0",
"@types/node": "^10.17.15",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"eslint": "^7.14.0",
"@quasar/app-webpack": "^3.0.0",
"@quasar/cli": "^1.3.2",
"@types/node": "^12.20.21",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"eslint": "^8.10.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-vue": "^7.0.0"
"eslint-plugin-vue": "^8.5.0",
"prettier": "^2.5.1",
"ts-proto": "^1.112.1"
},
"browserslist": [
"last 10 Chrome versions",
Expand Down
Loading