Skip to content

Commit 61378ee

Browse files
committed
chore: add scaffold
1 parent 798259a commit 61378ee

File tree

191 files changed

+13495
-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.

191 files changed

+13495
-0
lines changed

.deepsource.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version = 1
2+
3+
[[analyzers]]
4+
enabled = true
5+
name = "javascript"
6+
7+
[[transformers]]
8+
enabled = true
9+
name = "prettier"
10+
11+
test_patterns = [
12+
"test/**/*",
13+
"**/*.spec.ts"
14+
]
15+
16+
exclude_patterns = [
17+
"**/node_modules/",
18+
"**/*memory*"
19+
]

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
# The JSON files contain newlines inconsistently
13+
[*.json]
14+
insert_final_newline = ignore
15+
16+
[*.md]
17+
trim_trailing_whitespace = false
18+

.env.example

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Environment
2+
NODE_ENV=development
3+
4+
# Server
5+
HOST=localhost
6+
PORT=3331
7+
RATE_MAX_REQUEST=100
8+
RATE_INTERVAL=1000
9+
10+
# Database
11+
DB_HOST=localhost
12+
DB_PORT=27125
13+
DB_USERNAME=root
14+
DB_PASSWORD=secret
15+
DB_DATABASE=app
16+
17+
# JWT
18+
JWT_EXPIRES=365d
19+
JWT_SECRET=secret
20+
21+
# S3
22+
S3_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
23+
S3_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
24+
S3_BUCKET=default
25+
S3_ENDPOINT=http://127.0.0.1:9000
26+
27+
28+
SES_REGION=us-east-1
29+
SES_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
30+
SES_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
31+
SES_BCC=
32+
33+
# Docker Registry
34+
DOCKER_REGISTRY_URI=registry.example.com
35+
36+
# Docker Compose
37+
COMPOSE_PROJECT_NAME=nestjs-mongodb-hexagonal-template

.eslintrc.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module',
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: [
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:prettier/recommended',
11+
'plugin:yml/standard',
12+
],
13+
root: true,
14+
env: {
15+
node: true,
16+
jest: true,
17+
},
18+
ignorePatterns: ['.eslintrc.js'],
19+
rules: {
20+
'@typescript-eslint/interface-name-prefix': 'off',
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/explicit-module-boundary-types': 'off',
23+
'@typescript-eslint/no-explicit-any': 'off',
24+
},
25+
};

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Docker Image Build
2+
3+
on:
4+
pull_request:
5+
branches: [ "main", "develop" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Build the Docker image
13+
run: docker build . --tag app:$(date +%s)

.github/workflows/lint.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches: ["main", "develop"]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [18.x]
13+
defaults:
14+
run:
15+
working-directory: .
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- name: Install libraries
24+
run: yarn install
25+
- name: Run linter
26+
run: yarn lint

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches: ["main", "develop"]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [18.x]
13+
defaults:
14+
run:
15+
working-directory: .
16+
steps:
17+
- uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
- name: Install libraries
24+
run: yarn install
25+
- name: Run test
26+
run: yarn test

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,15 @@ dist
128128
.yarn/build-state.yml
129129
.yarn/install-state.gz
130130
.pnp.*
131+
132+
# MacOS
133+
.DS_Store
134+
135+
# Env files
136+
.env
137+
.env.*
138+
!.env.example
139+
140+
# Docker resources
141+
.mongodb
142+
.minio

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v.18

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "all",
4+
"printWidth": 96
5+
}

0 commit comments

Comments
 (0)