Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore → .github/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@ package-lock.json
yarn.lock

# Ignore any other sensitive or generated files
.npmrc
.npmrc
.npmignore
Empty file added .github/ISSUE_TEMPLATE.md
Empty file.
Empty file.
26 changes: 26 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach by Process ID",
"processId": "${command:PickProcess}",
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/microservices/user-service/src/controllers.js"
}
]
}
2 changes: 1 addition & 1 deletion gateway/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Microservices Suite

## API-GATEWAY Package
## API-GATEWAY Package. Remember to provide redundancy to eliminate the `single point of failure`

The API-GATEWAY serves as the front-facing layer of our Microservices Suite, designed to efficiently route client requests to the appropriate internal service. By abstracting the internal services network from the client, it exposes a singular endpoint that consolidates and manages access to your suite of APIs.

Expand Down
5 changes: 5 additions & 0 deletions microservices/cart-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9009
DATABASE_URL=mongodb://host.docker.internal:27017/cart_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/cart-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9009
DATABASE_URL=mongodb://host.docker.internal:27017/cart_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/customer-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9000
DATABASE_URL=mongodb://host.docker.internal:27017/customer_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/customer-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9000
DATABASE_URL=mongodb://host.docker.internal:27017/customer_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/email-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9008
DATABASE_URL=mongodb://host.docker.internal:27017/email_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/email-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9008
DATABASE_URL=mongodb://host.docker.internal:27017/email_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/notification-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9007
DATABASE_URL=mongodb://host.docker.internal:27017/notification_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/notification-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9007
DATABASE_URL=mongodb://host.docker.internal:27017/notification_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/payment-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9006
DATABASE_URL=mongodb://host.docker.internal:27017/payment_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/payment-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9006
DATABASE_URL=mongodb://host.docker.internal:27017/payment_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/product-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9002
DATABASE_URL=mongodb://host.docker.internal:27017/payment_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/product-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9002
DATABASE_URL=mongodb://host.docker.internal:27017/payment_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/rbac-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9005
DATABASE_URL=mongodb://host.docker.internal:27017/rbac_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/rbac-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9005
DATABASE_URL=mongodb://host.docker.internal:27017/rbac_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/supplier-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9001
DATABASE_URL=mongodb://host.docker.internal:27017/supplier_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/supplier-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9001
DATABASE_URL=mongodb://host.docker.internal:27017/supplier_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
4 changes: 2 additions & 2 deletions microservices/supplier-service/dockerFile.dev
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:alpine
FROM node:18-alpine3.18

WORKDIR /app

COPY package.json ./
COPY package.json .
RUN yarn install

COPY . .
Expand Down
1 change: 1 addition & 0 deletions microservices/supplier-service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const {rabbitMQMiddleware} = require('./middlewares/rabbitmq')
const { config, morgan, logger } = require('@microservices-suite/config');



app.use(express.json())


Expand Down
15 changes: 7 additions & 8 deletions microservices/supplier-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@
"description": "The supplier service serves as the central repo for the supplier CRUD operation",
"main": "index.js",
"dependencies": {
"@microservices-suite/config": "^1.0.3",
"@microservices-suite/config": "1.0.7",
"@microservices-suite/errors": "^1.1.6",
"@microservices-suite/utilities": "^1.0.6",
"@microservices-suite/validations": "^1.0.9",
"amqplib": "0.10.3",
"express": "*",
"mongoose": "*",
"mongodb": "^6.5.0",
"nodemon": "3.1.0",
"amqplib": "0.10.3"
"mongoose": "*",
"nodemon": "3.1.0"
},
"scripts": {
"start": "node index.js",
"dev": "set NODE_ENV=dev && nodemon index.js"
},
"devDependencies": {
"dev": "NODE_ENV=dev nodemon index.js"
},
"devDependencies": {},
"author": "Dhairya Doshi",
"license": "ISC"
}
}
5 changes: 5 additions & 0 deletions microservices/upload-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9004
DATABASE_URL=mongodb://host.docker.internal:27017/upload_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
5 changes: 5 additions & 0 deletions microservices/upload-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PORT=9004
DATABASE_URL=mongodb://host.docker.internal:27017/upload_service_db_dev
CLOUD_NAME=dh3brnwfp
API_KEY=945719211841459
API_SECRET=z6UrZ9lnTq5_iM3261H4aVYao20
2 changes: 2 additions & 0 deletions microservices/user-service/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DATABASE_URL=mongodb://mongodb:27017/user_service_db_dev
PORT=9003
2 changes: 2 additions & 0 deletions microservices/user-service/.env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DATABASE_URL=mongodb://mongodb:27017/user_service_db_dev
PORT=9003
8 changes: 4 additions & 4 deletions microservices/user-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"author": "Gilbert Andanje",
"license": "ISC",
"dependencies": {
"@microservices-suite/config": "^1.0.3",
"@microservices-suite/errors": "^1.1.6",
"@microservices-suite/utilities": "^1.0.6",
"@microservices-suite/validations": "^1.0.9",
"@microservices-suite/config": "1.0.3",
"@microservices-suite/errors": "1.1.6",
"@microservices-suite/utilities": "1.0.6",
"@microservices-suite/validations": "1.0.9",
"dotenv": "^16.4.5",
"express": "^4.18.3",
"helmet": "^7.1.0",
Expand Down
10 changes: 8 additions & 2 deletions shared/config/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
{
"name": "@microservices-suite/config",
"version": "1.0.3",
"version": "1.0.7",
"description": "This contains common configurations for things like env files,loggers etc for easy setup of environment specific settings",
"main": "index.js",
"author": "Gilbert Andanje",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"private": false
"private": false,
"dependencies": {
"dotenv": "^16.4.5",
"joi": "^17.12.3",
"morgan": "^1.10.0",
"winston": "^3.13.0"
}
}