Skip to content

Commit

Permalink
feat: replace old studio with new implementation (#133)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonas Lagoni <[email protected]>
Co-authored-by: David Boyne <[email protected]>
Co-authored-by: David Boyne <[email protected]>
  • Loading branch information
4 people authored Oct 26, 2021
1 parent b05a3d3 commit b8ea164
Show file tree
Hide file tree
Showing 215 changed files with 101,237 additions and 16,701 deletions.
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

5 changes: 0 additions & 5 deletions .env-template

This file was deleted.

4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
public
docs
lib
139 changes: 139 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
env:
es6: true
browser: true

parser: "@typescript-eslint/parser"

plugins:
- "@typescript-eslint"
- sonarjs
- security
- react

extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- plugin:sonarjs/recommended
- plugin:react/recommended
- plugin:security/recommended

parserOptions:
ecmaVersion: 2018
sourceType: module
ecmaFeatures:
jsx: true
settings:
react:
version: detect

rules:
# Ignore Rules
strict: 0
no-underscore-dangle: 0
no-mixed-requires: 0
no-process-exit: 0
no-warning-comments: 0
curly: 0
no-multi-spaces: 0
no-alert: 0
consistent-return: 0
consistent-this: [0, self]
func-style: 0
max-nested-callbacks: 0
camelcase: 0

# Warnings
no-debugger: 1
no-empty: 1
no-invalid-regexp: 1
no-unused-expressions: 0
no-native-reassign: 1
no-fallthrough: 1
sonarjs/cognitive-complexity: 1

# Errors
eqeqeq: 2
no-undef: 2
no-dupe-keys: 2
no-empty-character-class: 2
no-self-compare: 2
valid-typeof: 2
no-unused-vars: [2, { "args": "none" }]
handle-callback-err: 2
no-shadow-restricted-names: 2
no-new-require: 2
no-mixed-spaces-and-tabs: 2
block-scoped-var: 2
no-else-return: 2
no-throw-literal: 2
no-void: 2
radix: 2
wrap-iife: [2, outside]
no-shadow: 0
no-path-concat: 2
valid-jsdoc: [0, {requireReturn: false, requireParamDescription: false, requireReturnDescription: false}]

# stylistic errors
no-spaced-func: 2
semi-spacing: 2
quotes: [2, 'single']
key-spacing: [2, { beforeColon: false, afterColon: true }]
indent: [2, 2]
no-lonely-if: 2
no-floating-decimal: 2
brace-style: [2, 1tbs, { allowSingleLine: true }]
comma-style: [2, last]
no-multiple-empty-lines: [2, {max: 1}]
no-nested-ternary: 2
operator-assignment: [2, always]
padded-blocks: [2, never]
quote-props: [2, as-needed]
keyword-spacing: [2, {'before': true, 'after': true, 'overrides': {}}]
space-before-blocks: [2, always]
array-bracket-spacing: [2, never]
computed-property-spacing: [2, never]
space-in-parens: [2, never]
space-unary-ops: [2, {words: true, nonwords: false}]
wrap-regex: 2
linebreak-style: 0
semi: [2, always]
arrow-spacing: [2, {before: true, after: true}]
no-class-assign: 2
no-const-assign: 2
no-dupe-class-members: 2
no-this-before-super: 2
no-var: 2
object-shorthand: [2, always]
prefer-arrow-callback: 2
prefer-const: 2
prefer-spread: 2
prefer-template: 2

# React
react/jsx-uses-react: off
react/react-in-jsx-scope: off

# TypeScript
"@typescript-eslint/no-empty-interface": "off"
# disable JS rule
no-use-before-define: "off"
"@typescript-eslint/no-use-before-define": ["error"]
"@typescript-eslint/no-empty-function": "off"
"@typescript-eslint/ban-ts-comment": "off"
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/explicit-module-boundary-types": "off"
"@typescript-eslint/no-this-alias": "off"

overrides:
- files:
- "*.spec.ts"
- "*.spec.tsx"
- "*.test.ts"
- "*.test.tsx"
rules:
no-undef: "off"
no-console: "off"
prefer-arrow-callback: 0
sonarjs/no-duplicate-string: 0
security/detect-object-injection: 0
29 changes: 0 additions & 29 deletions .eslintrc.js

This file was deleted.

10 changes: 2 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
node_modules
.next
cache/*
!cache/.gitkeep
.env
src/pages/_plugins/*
!src/pages/_plugins/[...].js
config/ui.json
/node_modules
.vscode/
4 changes: 4 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Disable specific file since it would introduce more complexity to reduce it - mainly code complexity and complex template literals
sonar.exclusions=public/js/monaco/**
# Disable duplicate code in tests since it would introduce more complexity to reduce it.
sonar.cpd.exclusions=public/js/monaco/**
3 changes: 0 additions & 3 deletions CHECKS

This file was deleted.

21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

20 changes: 0 additions & 20 deletions Dockerfile-dev

This file was deleted.

49 changes: 0 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@
# AsyncAPI Studio

> :warning: This repo is still in the early stages. We'll work on its documentation as soon as possible.
## Requirements

* Docker
* Docker Compose
* Node.js 14+

## Using it locally

If it's your first time, run:

```
npm install
npm run dev:prepare
docker-compose up -d session db
```

Then run the following command to start Studio:

```
npm run dev
```

## Customizing it

### Customizable UI areas

|Area|Type|Description|
|---|---|---|
| Settings > Organization > Sidebar Menu | JSON | Add new items to the menu.
| Settings > Organization > Custom Page | Page | Where the Sidebar Menu item points to.

### Customizable server areas

|Area|Description|
|---|---|
| Pages | Register new pages.
| Routes | Register routes in the server.
| Middlewares | Register middlewares in the server.
| Events | Subscribe to server events and react accordingly.
| Hooks | Subscribe to hooks and modify behavior.

#### Server hooks

|Hook|Description|
|---|---|
| `auth:github` | Triggered when user signs in using Github.
Empty file removed cache/.gitkeep
Empty file.
46 changes: 0 additions & 46 deletions config/common.json

This file was deleted.

4 changes: 0 additions & 4 deletions config/plugins.json

This file was deleted.

32 changes: 0 additions & 32 deletions config/ui.defaults.json

This file was deleted.

Loading

0 comments on commit b8ea164

Please sign in to comment.