Skip to content

Commit 0e011c0

Browse files
authored
Merge pull request #36 from Team-Commonly/discord-integration
2 parents 8c01d3c + 36010d0 commit 0e011c0

154 files changed

Lines changed: 36531 additions & 15870 deletions

File tree

Some content is hidden

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

CLAUDE.md

Lines changed: 545 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 357 additions & 86 deletions
Large diffs are not rendered by default.

backend/.eslintignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ build/
44
dist/
55
.env
66
.env.*
7-
*.log
7+
*.log
8+
test-discord-*.js
9+
scripts/deploy-discord-commands.js
10+
scripts/register-discord-commands.js
11+
services/discordService.js
12+
services/discordCommandService.js

backend/.eslintrc.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ module.exports = {
44
es6: true,
55
jest: true,
66
},
7-
extends: [
8-
'airbnb-base',
9-
],
7+
extends: ['airbnb-base'],
108
parserOptions: {
119
ecmaVersion: 2020,
1210
},
@@ -18,10 +16,13 @@ module.exports = {
1816
'consistent-return': 'off',
1917

2018
// Allow unused variables in certain contexts
21-
'no-unused-vars': ['warn', {
22-
argsIgnorePattern: '^_',
23-
varsIgnorePattern: '^_',
24-
}],
19+
'no-unused-vars': [
20+
'warn',
21+
{
22+
argsIgnorePattern: '^_',
23+
varsIgnorePattern: '^_',
24+
},
25+
],
2526
'max-len': ['warn', { code: 120 }],
2627
'no-underscore-dangle': 'off', // Allow _id from MongoDB
2728
'no-param-reassign': ['error', { props: false }],
@@ -44,7 +45,12 @@ module.exports = {
4445
},
4546
{
4647
// For migration and utility scripts
47-
files: ['**/migrations/**/*.js', '**/utils/**/*.js', 'sync-pods.js', 'testPG.js'],
48+
files: [
49+
'**/migrations/**/*.js',
50+
'**/utils/**/*.js',
51+
'sync-pods.js',
52+
'testPG.js',
53+
],
4854
rules: {
4955
'no-restricted-syntax': 'off',
5056
'no-await-in-loop': 'off',

backend/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:16
1+
FROM node:18
22

33
WORKDIR /app
44

@@ -14,5 +14,8 @@ EXPOSE 5000
1414
# Add a label to indicate testing is supported
1515
LABEL com.commonly.testing="true"
1616

17-
# The default command still starts the server
18-
CMD ["node", "server.js"]
17+
# Make the startup script executable
18+
RUN chmod +x /app/start.sh
19+
20+
# Use the startup script as the default command
21+
CMD ["/bin/bash", "/app/start.sh"]

backend/Dockerfile.dev

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM node:18
2+
3+
WORKDIR /app
4+
5+
# Copy package files
6+
COPY package*.json ./
7+
8+
# Install all dependencies including dev dependencies
9+
RUN npm install --include=dev
10+
11+
# Copy the rest of the application code
12+
COPY . .
13+
14+
EXPOSE 5000
15+
16+
# Add a label to indicate this is development
17+
LABEL com.commonly.environment="development"
18+
19+
# Make scripts executable
20+
RUN chmod +x /app/start.sh
21+
RUN chmod +x /app/scripts/*.js || true
22+
23+
# For development, use nodemon for auto-restart
24+
CMD ["npm", "run", "dev"]

0 commit comments

Comments
 (0)