Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
9f5e22d
init: re-initialize project
paring-chan Sep 21, 2022
d32b763
chore: add memory usage to metrics + exclude dist
paring-chan Sep 21, 2022
1078428
feat: collect metircs(TODO: push)
paring-chan Sep 22, 2022
8bfe079
chore: preserve output
paring-chan Sep 22, 2022
0e0b609
init: backend
paring-chan Sep 22, 2022
cc0b450
feat: basic web server
paring-chan Sep 22, 2022
7b8430d
feat: routing
paring-chan Sep 22, 2022
fc8dbe3
chore: install typescript plugin
paring-chan Sep 22, 2022
1f3033e
feat: authentication
paring-chan Sep 22, 2022
79650d8
feat: user api
paring-chan Sep 22, 2022
19ae25d
feat: migration to mikro orm
paring-chan Sep 22, 2022
89eab0d
fix: entities
paring-chan Sep 22, 2022
f40ea51
feat: get user rules
paring-chan Sep 22, 2022
32b091e
feat: create rule
paring-chan Sep 22, 2022
b999607
feat: better api structure
paring-chan Sep 22, 2022
f2287a6
feat: token encryption
paring-chan Sep 23, 2022
e81a06a
feat: get rule by id
paring-chan Sep 23, 2022
fe0e010
feat: rule list pagination
paring-chan Sep 23, 2022
f729745
feat: more search params
paring-chan Sep 23, 2022
405e0b5
feat: all available rule list
paring-chan Sep 23, 2022
2ba4d4d
chore: include description
paring-chan Sep 23, 2022
d993ef8
feat: rule element model
paring-chan Sep 23, 2022
26ec9d1
chore: export RuleElement
paring-chan Sep 23, 2022
5798cb7
feat: json transformer for rule element
paring-chan Sep 23, 2022
ef13e4f
fix: QueryString -> Querystring
paring-chan Sep 23, 2022
ce3ec74
chore: add await to register
paring-chan Sep 23, 2022
b97e637
feat: schema for pagination querystring
paring-chan Sep 23, 2022
33aff1e
feat: list rule elements
paring-chan Sep 23, 2022
9368160
feat: create rule element
paring-chan Sep 23, 2022
e627118
chore: move rule element list to separate file
paring-chan Sep 23, 2022
2b03812
feat: setup meilisearch
paring-chan Sep 23, 2022
ffb6a23
feat: use meilisearch on rule search
paring-chan Sep 23, 2022
7347781
feat: rule element search with meilisearch
paring-chan Sep 23, 2022
25541cc
feat: add search document on rule element create
paring-chan Sep 23, 2022
7aff1cb
feat: add search document on rule create
paring-chan Sep 23, 2022
89fee32
chore: decrease brief min length
paring-chan Sep 23, 2022
13ea14d
feat: setup admin routes
paring-chan Sep 23, 2022
5ebf421
feat: reindex api(admin only)
paring-chan Sep 23, 2022
1ddf927
feat: update rule element
paring-chan Sep 23, 2022
d7e671d
feat: update rule
paring-chan Sep 23, 2022
5ad94e2
fix: visibility option not working
paring-chan Sep 23, 2022
7c47f7f
feat: ues meilisearch on user rule list
paring-chan Sep 23, 2022
9007607
chore: use enum value
paring-chan Sep 23, 2022
3cdb9b4
feat: delete rules, rule elements
paring-chan Sep 23, 2022
3fa36cb
chore: add license
paring-chan Sep 25, 2022
089ce6c
chore: add missing env example
paring-chan Sep 25, 2022
c1a9d4f
chore: export redis url in config
paring-chan Sep 25, 2022
668a89e
feat: get user guilds
paring-chan Sep 25, 2022
d6c90e4
chore: make require auth handler optional
paring-chan Sep 25, 2022
1b2800f
fix: guild type
paring-chan Sep 25, 2022
14050d6
chore: remove dist directory
paring-chan Sep 25, 2022
cd8bf25
feat: init rpc on backend
paring-chan Sep 25, 2022
d3b8443
feat: bot guilds lookup handler
paring-chan Sep 25, 2022
80a4329
feat: guilds lookup handler
paring-chan Sep 25, 2022
11f4fd3
feat: check if bot is invited
paring-chan Sep 25, 2022
a8bd7ce
feat: lookup single guild
paring-chan Sep 25, 2022
e1d1c3f
feat: get single guild by id
paring-chan Sep 25, 2022
453fa42
feat: channel list
paring-chan Sep 25, 2022
291d089
chore: remove type
paring-chan Sep 30, 2022
610cc38
feat: fetch channel by id
paring-chan Oct 1, 2022
93d400a
feat: get channel rules
paring-chan Oct 1, 2022
e8824ed
feat: add rule to channel
paring-chan Oct 2, 2022
2d8d96e
feat: rpc auth
paring-chan Oct 28, 2022
6be529b
feat: setup eslint & fix all eslint errors
paring-chan Oct 28, 2022
28c05ae
chore: update turborepo
paring-chan Nov 18, 2022
d53cd17
fix: monorepo dev command
paring-chan Nov 18, 2022
fbf260f
fix: mikro orm issue
paring-chan Nov 18, 2022
976e973
fix: pgcrypto not installed
paring-chan Nov 18, 2022
bdd055a
fix: serialize user error
paring-chan Nov 18, 2022
2e2791d
fix: channel list not working
paring-chan Nov 18, 2022
a8df28e
fix: index not found
paring-chan Nov 19, 2022
faed622
fix: toJSON is undefined
paring-chan Nov 19, 2022
7fdf7bc
feat: readme
paring-chan Nov 20, 2022
681f7f0
feat: type on rule element
paring-chan Nov 20, 2022
833a349
fix: channel rule list is not populated
paring-chan Nov 20, 2022
5c8c58e
feat: init frontend project
paring-chan Nov 20, 2022
832dc47
fix: eslint config
paring-chan Nov 20, 2022
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.{js,json,yml}]
charset = utf-8
indent_style = space
indent_size = 2
21 changes: 12 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
DISCORD_BOT_TOKEN=
BOT_TOKEN=
RPC_URL=ws://localhost:9876
RPC_SECRET=
CLUSTER_ID=0

DISCORD_CLIENT_ID=
DISCORD_CLIENT_SECRET=
DISCORD_REDIRECT_URI=http://127.0.0.1:5173/login
DISCORD_INVITE_CALLBACK=http://127.0.0.1:5173/invite
DISCORD_REDIRECT_URI=

DEV_GUILD=
JWT_TOKEN=
COMMAND_GUILDS=
JWT_SECRET=

BOT_SENTRY_DSN=
PG_DSN=
DB_SECRET=

FRONTEND_BASE_URL=http://127.0.0.1:5173
MEILISEARCH_URL=
MEILISEARCH_TOKEN=

METRICS_TOKEN=
REDIS_URL=redis://localhost:6379/1
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
38 changes: 38 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const path = require('path')

module.exports = {
root: true,
env: {
browser: true,
es2021: true
},
extends: 'standard-with-typescript',
plugins: [
'arca'
],
overrides: [],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: [
path.join(__dirname, 'packages/*/tsconfig.json')
// './packages/bot/tsconfig.json',
// './packages/database/tsconfig.json',
// './packages/rpc/tsconfig.json'

]
},
rules: {
semi: ['error', 'never'],
'arca/import-absolutes': 2,
'arca/import-align': [2, { collapseExtraSpaces: true }],
'arca/import-ordering': 2,
'arca/jsx-longhand-props': 2,
'arca/melted-constructs': 2,
'arca/newline-after-import-section': 2,
'arca/no-default-export': 2,
'no-multi-spaces': ['error', { exceptions: { ImportDeclaration: true } }],
'@typescript-eslint/restrict-template-expressions': 0,
'@typescript-eslint/consistent-type-imports': 2
}
}
24 changes: 17 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
node_modules
dist
.idea
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Swap the comments on the following lines if you don't wish to use zero-installs
# Documentation here: https://yarnpkg.com/features/zero-installs
# !.yarn/cache
.pnp.*

.env
build
data
postgres-data
yarn-error.log
dist
/data

node_modules
.turbo
3 changes: 0 additions & 3 deletions .prettierrc

This file was deleted.

6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint"
]
}
29 changes: 29 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"typescript.enablePromptUseWorkspaceTsdk": true,
"javascript.preferences.importModuleSpecifierEnding": "js",
"typescript.preferences.importModuleSpecifierEnding": "js",
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
"**/node_modules": true
},
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"typescript.tsdk": "node_modules/typescript/lib",
"[json]": {
"editor.formatOnSave": true
},
"[jsonc]": {
"editor.formatOnSave": true
}
}
9 changes: 9 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

Large diffs are not rendered by default.

783 changes: 783 additions & 0 deletions .yarn/releases/yarn-3.2.3.cjs

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
packageExtensions:
[email protected]:
dependencies:
"#ansi-styles": "npm:[email protected]"
"#supports-color": "npm:[email protected]"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.2.3.cjs
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# YPBOT
# ypbot

디스코드 채팅 검열 봇
## Development

## 빌드 / 실행
```sh
gh repo clone kimusoft/ypbot

`yarn workspaces run build`
cd ypbot

`pm2 start ecosystem.config.js`
corepack enable

yarn

docker compose -f docker-compose.dev.yml up -d

cp .env.example .env

yarn dev
```
36 changes: 0 additions & 36 deletions bot/package.json

This file was deleted.

82 changes: 0 additions & 82 deletions bot/sql/findRule.sql

This file was deleted.

Loading