Skip to content

Commit 5eb19db

Browse files
Prettier + Added google authentication validation + A LOT of other changes.
1 parent 0b4d8f2 commit 5eb19db

File tree

78 files changed

+6638
-4280
lines changed

Some content is hidden

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

78 files changed

+6638
-4280
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ jobs:
1010
name: '🐳 Build & Deploy'
1111

1212
steps:
13-
1413
- name: '🔍 Checkout Code'
1514
uses: actions/checkout@v4
1615

17-
1816
- name: '🔒 Verify Secrets Exist'
1917
run: |
2018
if [ -z "${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}" ]; then
@@ -39,8 +37,6 @@ jobs:
3937
echo "${{ secrets.ENV_FILE_CONTENT }}" > .env
4038
echo "" >> .env
4139
42-
43-
4440
# =======================================================
4541
# 🐳 Docker Operations
4642
# =======================================================
@@ -114,4 +110,4 @@ jobs:
114110
115111
- name: '🗑 Prune Old Docker Images'
116112
if: always()
117-
run: docker image prune -af
113+
run: docker image prune -af

.prettierrc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"printWidth": 180,
3-
"tabWidth": 4,
2+
"printWidth": 120,
3+
"tabWidth": 2,
44
"useTabs": false,
55
"semi": true,
66
"singleQuote": true,
@@ -9,5 +9,5 @@
99
"arrowParens": "always",
1010
"endOfLine": "lf",
1111
"editor.formatOnSave": true,
12-
"jsxSingleQuote": false
13-
}
12+
"jsxSingleQuote": true
13+
}

.vscode/settings.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"sqltools.connections": [
3-
{
4-
"mysqlOptions": {
5-
"authProtocol": "default",
6-
"enableSsl": "Disabled"
7-
},
8-
"previewLimit": 50,
9-
"server": "localhost",
10-
"port": 3306,
11-
"driver": "MariaDB",
12-
"name": "MySQL",
13-
"database": "codebuilder_main",
14-
"username": "codebuilder",
15-
"password": "joker123"
16-
}
17-
]
18-
}
2+
"sqltools.connections": [
3+
{
4+
"mysqlOptions": {
5+
"authProtocol": "default",
6+
"enableSsl": "Disabled"
7+
},
8+
"previewLimit": 50,
9+
"server": "localhost",
10+
"port": 3306,
11+
"driver": "MariaDB",
12+
"name": "MySQL",
13+
"database": "codebuilder_main",
14+
"username": "codebuilder",
15+
"password": "joker123"
16+
}
17+
]
18+
}

default.json

Lines changed: 99 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,100 @@
11
{
2-
"APP_SETTINGS": {
3-
"port": 8090,
4-
"body_limit": "50mb",
5-
"body_parameter_limit": 50000
6-
},
7-
"JWT_ACCESS_SECRET": "tasdasdklaslkdaslkd",
8-
"CORS_SETTINGS": {
9-
"allowed_origins": [],
10-
"allowed_paths": [],
11-
"allowed_methods": [
12-
"GET",
13-
"POST",
14-
"PUT",
15-
"PATCH",
16-
"DELETE",
17-
"OPTIONS"
18-
],
19-
"allowed_credentials": false,
20-
"allowed_headers": []
21-
},
22-
"LOGGER_SETTINGS": {
23-
"level": "info",
24-
"silence": [
25-
"healthz"
26-
]
27-
},
28-
"DB_SETTINGS": {
29-
"host": "pg-1.dexcelerate.com",
30-
"port": 5432,
31-
"username": "nestjswebsockettest",
32-
"password": "joker123!",
33-
"database": "nestjswebsockettest",
34-
"logging": "all",
35-
"synchronize": true
36-
},
37-
"JWT_SETTINGS": {
38-
"secret_key": "secret_key",
39-
"algorithm": "HS512",
40-
"access_token_expires_in": 20,
41-
"refresh_token_expires_in": 10080
42-
},
43-
"REDIS_SETTINGS": {
44-
"host": "redis-1.dexcelerate.com",
45-
"port": 7001,
46-
"key": "nestjs_example"
47-
},
48-
"REDIS_SERVERS": {
49-
"STANDALONE": {
50-
"host": "redis-1.dexcelerate.com",
51-
"port": 6379,
52-
"tls": true,
53-
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
54-
},
55-
"RATE": {
56-
"host": "redis-1.dexcelerate.com",
57-
"port": 3788,
58-
"tls": false,
59-
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
60-
},
61-
"AUTH": {
62-
"host": "redis-1.dexcelerate.com",
63-
"port": 7001,
64-
"tls": true,
65-
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
66-
},
67-
"TOKENS": {
68-
"host": "redis-1.dexcelerate.com",
69-
"port": 7001,
70-
"tls": true,
71-
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
72-
},
73-
"CHAT": {
74-
"host": "redis-1.dexcelerate.com",
75-
"port": 7001,
76-
"tls": true,
77-
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
78-
}
79-
},
80-
"WSS_SETTINGS": {
81-
"port": 8091,
82-
"ping_interval": 3000,
83-
"ping_timeout": 10000,
84-
"path": "/socket.io"
85-
},
86-
"RABBITMQ_SETTINGS": {
87-
"exchange": "nestjs_example_service",
88-
"name": "rabbitmq",
89-
"host": "localhost",
90-
"vhost": "vhost",
91-
"port": 5672,
92-
"username": "admin",
93-
"password": "password"
94-
},
95-
"GRAPHQL_SETTINGS": {
96-
"playground": true,
97-
"debug": true,
98-
"introspection": true,
99-
"installSubscriptionHandlers": true
100-
},
101-
"GRAPHQL_APIS": {
102-
"api_1": "http://localhost:8090/graphql",
103-
"api_2": "http://localhost:8091/graphql"
104-
},
105-
"GRAPHQL_GUARD": {
106-
"username": "admin",
107-
"password": "password"
108-
}
109-
}
2+
"APP_SETTINGS": {
3+
"port": 8090,
4+
"body_limit": "50mb",
5+
"body_parameter_limit": 50000
6+
},
7+
"JWT_ACCESS_SECRET": "tasdasdklaslkdaslkd",
8+
"CORS_SETTINGS": {
9+
"allowed_origins": [],
10+
"allowed_paths": [],
11+
"allowed_methods": ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
12+
"allowed_credentials": false,
13+
"allowed_headers": []
14+
},
15+
"LOGGER_SETTINGS": {
16+
"level": "info",
17+
"silence": ["healthz"]
18+
},
19+
"DB_SETTINGS": {
20+
"host": "pg-1.dexcelerate.com",
21+
"port": 5432,
22+
"username": "nestjswebsockettest",
23+
"password": "joker123!",
24+
"database": "nestjswebsockettest",
25+
"logging": "all",
26+
"synchronize": true
27+
},
28+
"JWT_SETTINGS": {
29+
"secret_key": "secret_key",
30+
"algorithm": "HS512",
31+
"access_token_expires_in": 20,
32+
"refresh_token_expires_in": 10080
33+
},
34+
"REDIS_SETTINGS": {
35+
"host": "redis-1.dexcelerate.com",
36+
"port": 7001,
37+
"key": "nestjs_example"
38+
},
39+
"REDIS_SERVERS": {
40+
"STANDALONE": {
41+
"host": "redis-1.dexcelerate.com",
42+
"port": 6379,
43+
"tls": true,
44+
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
45+
},
46+
"RATE": {
47+
"host": "redis-1.dexcelerate.com",
48+
"port": 3788,
49+
"tls": false,
50+
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
51+
},
52+
"AUTH": {
53+
"host": "redis-1.dexcelerate.com",
54+
"port": 7001,
55+
"tls": true,
56+
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
57+
},
58+
"TOKENS": {
59+
"host": "redis-1.dexcelerate.com",
60+
"port": 7001,
61+
"tls": true,
62+
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
63+
},
64+
"CHAT": {
65+
"host": "redis-1.dexcelerate.com",
66+
"port": 7001,
67+
"tls": true,
68+
"password": "aslkdjkkjadwkljdaslkjdwqklqajd39821ikdjal"
69+
}
70+
},
71+
"WSS_SETTINGS": {
72+
"port": 8091,
73+
"ping_interval": 3000,
74+
"ping_timeout": 10000,
75+
"path": "/socket.io"
76+
},
77+
"RABBITMQ_SETTINGS": {
78+
"exchange": "nestjs_example_service",
79+
"name": "rabbitmq",
80+
"host": "localhost",
81+
"vhost": "vhost",
82+
"port": 5672,
83+
"username": "admin",
84+
"password": "password"
85+
},
86+
"GRAPHQL_SETTINGS": {
87+
"playground": true,
88+
"debug": true,
89+
"introspection": true,
90+
"installSubscriptionHandlers": true
91+
},
92+
"GRAPHQL_APIS": {
93+
"api_1": "http://localhost:8090/graphql",
94+
"api_2": "http://localhost:8091/graphql"
95+
},
96+
"GRAPHQL_GUARD": {
97+
"username": "admin",
98+
"password": "password"
99+
}
100+
}

docker-compose.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
services:
2-
32
db:
43
image: postgres:15-alpine
54
container_name: codebuilder-postgres-db
@@ -11,18 +10,17 @@ services:
1110
networks:
1211
- codebuilder-net
1312
ports:
14-
- "5434:5432"
13+
- '5434:5432'
1514

1615
redis:
1716
image: redis:7-alpine
1817
container_name: codebuilder-redis
1918
restart: unless-stopped
2019
ports:
21-
- "6376:6379"
20+
- '6376:6379'
2221
networks:
2322
- codebuilder-net
2423

25-
2624
api:
2725
build:
2826
context: .
@@ -39,23 +37,20 @@ services:
3937
# Override application Redis servers config to use redis container
4038
REDIS_SERVERS: '{"AUTH":{"host":"redis","port":6379,"password":"","tls":false},"CACHE":{"host":"redis","port":6379,"password":"","tls":false}}'
4139
ports:
42-
- "4000:4001"
40+
- '4000:4001'
4341
depends_on:
4442
- db
4543
- redis
4644
networks:
4745
- codebuilder-net
4846
# Override default command to run the compiled production bundle
49-
command: ["pnpm", "start:prod"]
50-
51-
47+
command: ['pnpm', 'start:prod']
5248

5349
volumes:
5450
postgres-data:
5551
external: true
5652
name: codebuilder-postgres-data
5753

58-
5954
networks:
6055
codebuilder-net:
61-
external: true
56+
external: true

ecosystem.config.cjs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
module.exports = {
2-
apps: [{
3-
name: 'codebuilder-api',
4-
script: 'dist/main.js',
5-
env: {
6-
PORT: 4001,
7-
NODE_ENV: 'production',
2+
apps: [
3+
{
4+
name: 'codebuilder-api',
5+
script: 'dist/main.js',
6+
env: {
7+
PORT: 4001,
8+
NODE_ENV: 'production',
9+
},
810
},
9-
}],
10-
};
11+
],
12+
};

0 commit comments

Comments
 (0)