Skip to content

Commit 78942f9

Browse files
Initial Commit
0 parents  commit 78942f9

Some content is hidden

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

67 files changed

+13645
-0
lines changed

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
charset = utf-8
6+
indent_style = tab
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.yml]
12+
indent_style = space

.eslintignore

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Compiled Output
2+
/dist
3+
/build
4+
/node_modules
5+
/.webpack
6+
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
lerna-debug.log*
14+
15+
# OS
16+
.DS_Store
17+
18+
# Tests
19+
/coverage
20+
/.nyc_output
21+
22+
# IDEs and editors
23+
/.idea
24+
.project
25+
.classpath
26+
.c9/
27+
*.launch
28+
.settings/
29+
*.sublime-workspace
30+
31+
# IDE - VSCode
32+
.vscode/*
33+
!.vscode/settings.json
34+
!.vscode/tasks.json
35+
!.vscode/launch.json
36+
!.vscode/extensions.json
37+
38+
# Enviroment
39+
*.env*
40+
!.env.docker
41+
42+
# Core
43+
src/core
44+
45+
# Local Database
46+
/mongo-volume
47+
48+
# Docker
49+
docker/
50+
51+
# tsconfig
52+
tsconfig*
53+
!tsconfig.json
54+
!tsconfig.paths.json
55+
!tsconfig.build.json
56+
57+
# Deploy
58+
.serverless
59+
60+
# GraphQL
61+
schema.gql
62+
63+
# Serverless
64+
serverless.ts
65+
serverless.d.ts
66+
serverless.js
67+
serverless.js.map

.eslintrc.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"@techmmunity/eslint-config/common",
5+
"@techmmunity/eslint-config/jest",
6+
"@techmmunity/eslint-config/typescript"
7+
],
8+
"rules": {
9+
"import-helpers/order-imports": [
10+
"warn",
11+
{
12+
"groups": [
13+
"module",
14+
["parent", "sibling", "index"],
15+
"/service$/",
16+
"/^./service/",
17+
"/consumers/",
18+
"/shared/",
19+
"/job/",
20+
"/helpers/",
21+
"/validate/",
22+
"/module/",
23+
"/controller/",
24+
"/\\.entity/",
25+
"/utils/",
26+
"/enums/",
27+
"/config/",
28+
"/assets/",
29+
"/types/",
30+
"/mocks/"
31+
]
32+
}
33+
]
34+
}
35+
}

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @techmmunity/reviewers-backend

.github/PULL_REQUEST_TEMPLATE.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
## What this PR introduces?
2+
3+
<!-- Please, includes description of this pull request -->
4+
5+
## PR Checklist
6+
7+
Please check if your PR fulfills the following requirements:
8+
9+
- [ ] I followed GitFlow pattern to create the branch
10+
- [ ] My code produces no warnings or errors in the console
11+
- [ ] Tests for the changes have been added / updated
12+
- [ ] Swagger Docs for all the possible requests and responses have been added / updated
13+
- [ ] Mocks fot the database have been added / updated
14+
- [ ] Lib of the service have been updated
15+
- [ ] Lib package.json version have been increased and follow semantic versioning
16+
17+
## PR Type
18+
19+
What kind of change does this PR introduce?
20+
21+
```
22+
[ ] Hotfix
23+
[ ] Bugfix
24+
[ ] Feature
25+
[ ] Documentation update
26+
[ ] Code style update (formatting, local variables)
27+
[ ] Refactoring (no functional changes, no api changes)
28+
[ ] CI/CD related changes
29+
```
30+
31+
## Does this PR introduce a breaking change?
32+
33+
```
34+
[ ] Yes
35+
[ ] No
36+
```
37+
38+
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
39+
40+
## Other information (Prints, details, etc)

.github/workflows/deploy.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Add SSH Key
15+
uses: webfactory/[email protected]
16+
with:
17+
ssh-private-key: ${{ secrets.CORE_REPOSITORY_SSH_KEY }}
18+
19+
- name: Clone Core Repository
20+
run: |
21+
git clone [email protected]:techmmunity/core.git
22+
mv core/src src/core
23+
rm -rf core
24+
25+
- name: Install Dependencies
26+
run: |
27+
yarn
28+
29+
- name: Run Tests
30+
run: |
31+
yarn test:cov
32+
33+
- name: Build
34+
run: yarn build
35+
36+
- name: Create .env
37+
run: printf "NODE_ENV=production\nMONGODB_URL=${{ secrets.MONGODB_URL }}\nKEY_PLACTRONIC=${{ secrets.KEY_PLACTRONIC }}\nKEY_WILL=${{ secrets.KEY_WILL }}\nKEY_RAZAL=${{ secrets.KEY_RAZAL }}" > .env
38+
39+
- name: Deploy AWS
40+
uses: serverless/github-action@master
41+
with:
42+
args: deploy
43+
env:
44+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
45+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/tests.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Add SSH Key
18+
uses: webfactory/[email protected]
19+
with:
20+
ssh-private-key: ${{ secrets.CORE_REPOSITORY_SSH_KEY }}
21+
22+
- name: Clone Core Repository
23+
run: |
24+
git clone [email protected]:techmmunity/core.git
25+
mv core/src src/core
26+
rm -rf core
27+
28+
- name: Install Dependencies
29+
run: |
30+
yarn
31+
32+
- name: Test TypeScript Syntax
33+
run: |
34+
yarn temp:test-tsc
35+
36+
# - name: Run Tests
37+
# run: |
38+
# yarn test:cov
39+
40+
# - name: Colect Coverage
41+
# if: github.event_name == 'push' && github.ref == 'refs/heads/master'
42+
# uses: coverallsapp/[email protected]
43+
# with:
44+
# github-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Compiled Output
2+
/dist
3+
/build
4+
/node_modules
5+
/.webpack
6+
7+
# Logs
8+
logs
9+
*.log
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
lerna-debug.log*
14+
15+
# OS
16+
.DS_Store
17+
18+
# Tests
19+
/coverage
20+
/.nyc_output
21+
22+
# IDEs and editors
23+
/.idea
24+
.project
25+
.classpath
26+
.c9/
27+
*.launch
28+
.settings/
29+
*.sublime-workspace
30+
31+
# IDE - VSCode
32+
.vscode/*
33+
!.vscode/settings.json
34+
!.vscode/tasks.json
35+
!.vscode/launch.json
36+
!.vscode/extensions.json
37+
38+
# Enviroment
39+
*.env*
40+
!.env.docker
41+
42+
# Core
43+
src/core
44+
45+
# Local Database
46+
/mongo-volume
47+
48+
# Docker
49+
docker/
50+
51+
# tsconfig
52+
tsconfig*
53+
!tsconfig.json
54+
!tsconfig.paths.json
55+
!tsconfig.build.json
56+
57+
# Deploy
58+
.serverless
59+
60+
# GraphQL
61+
schema.gql
62+
63+
# Serverless
64+
serverless.d.ts
65+
serverless.js
66+
serverless.js.map

.husky/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn husky:pre-commit

.husky/pre-push

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn test:cov

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v14

.vscode/extensions.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"recommendations": [
3+
"editorconfig.editorconfig",
4+
"irongeek.vscode-env",
5+
"dbaeumer.vscode-eslint",
6+
"eamodio.gitlens",
7+
"bierner.markdown-preview-github-styles",
8+
"pkief.material-icon-theme",
9+
"esbenp.prettier-vscode",
10+
"gruntfuggly.todo-tree",
11+
"shardulm94.trailing-spaces"
12+
]
13+
}

0 commit comments

Comments
 (0)