Skip to content

Commit 5e000a4

Browse files
p lhp lh
authored andcommitted
feat: init project
0 parents  commit 5e000a4

File tree

94 files changed

+6081
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+6081
-0
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages/db/.env

.github/lighthouse/budget.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
[
2+
{
3+
"path": "/*",
4+
"resourceSizes": [
5+
{
6+
"resourceType": "document",
7+
"budget": 60
8+
},
9+
{
10+
"resourceType": "script",
11+
"budget": 150
12+
},
13+
{
14+
"resourceType": "stylesheet",
15+
"budget": 20
16+
},
17+
{
18+
"resourceType": "total",
19+
"budget": 700
20+
}
21+
]
22+
}
23+
]
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
run-name: ${{ github.actor }} check chatroom code quality 🔍
14+
15+
on:
16+
push:
17+
branches: [develop]
18+
pull_request:
19+
# The branches below must be a subset of the branches above
20+
branches: [develop]
21+
schedule:
22+
- cron: "27 12 * * 6"
23+
24+
jobs:
25+
analyze:
26+
name: Analyze
27+
runs-on: ubuntu-latest
28+
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
language: ["javascript"]
33+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
34+
# Learn more:
35+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v2
40+
41+
# Initializes the CodeQL tools for scanning.
42+
- name: Initialize CodeQL
43+
uses: github/codeql-action/init@v1
44+
with:
45+
languages: ${{ matrix.language }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
50+
51+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
52+
# If this step fails, then you should remove it and run the build manually (see below)
53+
- name: Autobuild
54+
uses: github/codeql-action/autobuild@v1
55+
56+
# ℹ️ Command-line programs to run using the OS shell.
57+
# 📚 https://git.io/JvXDl
58+
59+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
60+
# and modify them (or add more) to build your code if your project
61+
# uses a compiled language
62+
63+
#- run: |
64+
# make bootstrap
65+
# make release
66+
67+
- name: Perform CodeQL Analysis
68+
uses: github/codeql-action/analyze@v1
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: GitHub Actions CICD
2+
run-name: ${{ github.actor }} deploy ScienceOS 🚀
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
jobs:
8+
Ansible-Actions:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out repository code
12+
uses: actions/checkout@v3
13+
14+
- name: Install SSH Key
15+
uses: shimataro/ssh-key-action@v2
16+
with:
17+
key: ${{ secrets.SSH_PRIVATE_KEY }}
18+
name: qwe.pem # Write the key to /home/runner/.ssh/qwe.pem
19+
known_hosts: "just-a-placeholder-so-we-dont-get-errors"
20+
config: |
21+
Host vultr
22+
HostName ${{ secrets.SSH_HOST }}
23+
CheckHostIP no
24+
Port 22
25+
User root
26+
27+
- name: Adding Known Hosts
28+
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
29+
30+
- name: run ansible
31+
run: |
32+
cd ansible && ansible-playbook cicd-vultr.yml

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Lighthouse CI
2+
on: push
3+
jobs:
4+
lighthouse:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Audit URLs using Lighthouse
9+
uses: treosh/lighthouse-ci-action@v9
10+
with:
11+
urls: |
12+
https://sos-svelte.vercel.app/
13+
budgetPath: ./budget.json # test performance budgets
14+
uploadArtifacts: true # save results as an action artifacts
15+
temporaryPublicStorage: true # upload lighthouse report to the temporary

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
node_modules/
2+
mongodb/data/
3+
*.log
4+
dist
5+
static/*
6+
.DS_Store
7+
.eslintcache
8+
# terraform/variable.tf
9+
terraform.tfstate.backup
10+
.terraform
11+
.terraform.lock.hcl
12+
terraform.tfstate
13+
.terraform.tfstate.lock.info
14+
15+
# .circleci
16+
*.log
17+
.history
18+
.pnpm-store/
19+
# *.pem
20+
21+
# ssh_config
22+
.vercel

.lintstagedrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"**/*.{json,md,html}": ["pnpm run lint:prettier"],
3+
"**/frontend/**/*.{js,ts,tsx}": ["pnpm run lint:prettier"],
4+
"**/backend/**/*.{js,ts,tsx}": ["pnpm run lint:prettier"],
5+
"**/*.css": "stylelint",
6+
"**/*.scss": ["pnpm run lint:prettier", "stylelint --customSyntax=post-scss"]
7+
}

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# registry="https://registry.yarnpkg.com"
2+
registry="https://registry.npmjs.org"
3+
# registry="https://registry.npmmirror.com"

.stylelintrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "stylelint-config-standard-scss",
3+
"rules": {
4+
"at-rule-no-unknown": null,
5+
"scss/at-rule-no-unknown": [
6+
true,
7+
{
8+
"ignoreAtRules": ["tailwind"]
9+
}
10+
]
11+
}
12+
}

.vscode/settings.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"eslint.run": "onSave",
3+
"editor.formatOnSave": true,
4+
"prettier.enable": true,
5+
"eslint.format.enable": true,
6+
"git.ignoreLimitWarning": true,
7+
"cSpell.words": [
8+
"chakra",
9+
"cmdk",
10+
"plhh",
11+
"unplugin",
12+
"virtua",
13+
"VITE",
14+
"wechat",
15+
"Xmark"
16+
],
17+
"liveServer.settings.port": 5501
18+
}

0 commit comments

Comments
 (0)