├── Jenkins-Server-TF ├── provider.tf ├── iam-instance-profile.tf ├── variables.tf ├── gather.tf ├── iam-policy.tf ├── variables.tfvars ├── iam-role.tf ├── backend.tf ├── ec2.tf ├── vpc.tf └── tools-install.sh ├── Application-Code ├── frontend │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html │ ├── src │ │ ├── index.js │ │ ├── services │ │ │ └── taskServices.js │ │ ├── index.css │ │ ├── App.css │ │ ├── Tasks.js │ │ └── App.js │ ├── .dockerignore │ ├── package.json │ └── Dockerfile └── backend │ ├── models │ └── task.js │ ├── package.json │ ├── .dockerignore │ ├── db.js │ ├── Dockerfile │ ├── routes │ └── tasks.js │ ├── index.js │ └── package-lock.json ├── assets └── Three-Tier.gif ├── Kubernetes-Manifests-file ├── Database │ ├── secrets.yaml │ ├── service.yaml │ ├── pv.yaml │ ├── pvc.yaml │ └── deployment.yaml ├── Backend │ ├── service.yaml │ └── deployment.yaml ├── Frontend │ ├── service.yaml │ └── deployment.yaml └── ingress.yaml ├── eks ├── backend.tf ├── variables.tf ├── dev.tfvars └── main.tf ├── modules ├── Jenkinsfile └── LICENSE ├── README.md ├── Jenkins-Pipeline-Code ├── Jenkinsfile-Backend └── Jenkinsfile-Frontend └── LICENSE /Jenkins-Server-TF/provider.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | region = "eu-north-1" 3 | } 4 | -------------------------------------------------------------------------------- /Application-Code/frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /assets/Three-Tier.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project/HEAD/assets/Three-Tier.gif -------------------------------------------------------------------------------- /Jenkins-Server-TF/iam-instance-profile.tf: -------------------------------------------------------------------------------- 1 | resource "aws_iam_instance_profile" "instance-profile" { 2 | name = "Jenkins-instance-profile" 3 | role = aws_iam_role.iam-role.name 4 | } -------------------------------------------------------------------------------- /Application-Code/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project/HEAD/Application-Code/frontend/public/favicon.ico -------------------------------------------------------------------------------- /Application-Code/frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project/HEAD/Application-Code/frontend/public/logo192.png -------------------------------------------------------------------------------- /Application-Code/frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project/HEAD/Application-Code/frontend/public/logo512.png -------------------------------------------------------------------------------- /Jenkins-Server-TF/variables.tf: -------------------------------------------------------------------------------- 1 | variable "vpc-name" {} 2 | variable "igw-name" {} 3 | variable "rt-name" {} 4 | variable "subnet-name" {} 5 | variable "sg-name" {} 6 | variable "instance-name" {} 7 | variable "key-name" {} 8 | variable "iam-role" {} -------------------------------------------------------------------------------- /Jenkins-Server-TF/gather.tf: -------------------------------------------------------------------------------- 1 | data "aws_ami" "ami" { 2 | most_recent = true 3 | 4 | filter { 5 | name = "name" 6 | values = ["ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"] 7 | } 8 | 9 | owners = ["715841356019"] 10 | } 11 | -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Database/secrets.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | namespace: three-tier 5 | name: mongo-sec 6 | type: Opaque 7 | data: 8 | password: cGFzc3dvcmQxMjM= #Three-Tier-Project 9 | username: YWRtaW4= #admin -------------------------------------------------------------------------------- /Jenkins-Server-TF/iam-policy.tf: -------------------------------------------------------------------------------- 1 | resource "aws_iam_role_policy_attachment" "iam-policy" { 2 | role = aws_iam_role.iam-role.name 3 | # Just for testing purpose, don't try to give administrator access 4 | policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess" 5 | } -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Backend/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: api 5 | namespace: three-tier 6 | spec: 7 | ports: 8 | - port: 3500 9 | protocol: TCP 10 | type: ClusterIP 11 | selector: 12 | role: api -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Frontend/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: frontend 5 | namespace: three-tier 6 | spec: 7 | ports: 8 | - port: 3000 9 | protocol: TCP 10 | type: ClusterIP 11 | selector: 12 | role: frontend -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Database/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | namespace: three-tier 5 | name: mongodb-svc 6 | spec: 7 | selector: 8 | app: mongodb 9 | ports: 10 | - name: mongodb-svc 11 | protocol: TCP 12 | port: 27017 13 | targetPort: 27017 -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Database/pv.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolume 3 | metadata: 4 | name: mongo-pv 5 | namespace: three-tier 6 | spec: 7 | capacity: 8 | storage: 1Gi 9 | volumeMode: Filesystem 10 | accessModes: 11 | - ReadWriteOnce 12 | hostPath: 13 | path: /data/db -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Database/pvc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: PersistentVolumeClaim 3 | metadata: 4 | name: mongo-volume-claim 5 | namespace: three-tier 6 | spec: 7 | accessModes: 8 | - ReadWriteOnce 9 | storageClassName: "" 10 | resources: 11 | requests: 12 | storage: 1Gi -------------------------------------------------------------------------------- /Jenkins-Server-TF/variables.tfvars: -------------------------------------------------------------------------------- 1 | vpc-name = "Jenkins-vpc" 2 | igw-name = "Jenkins-igw" 3 | subnet-name = "Jenkins-subnet" 4 | rt-name = "Jenkins-route-table" 5 | sg-name = "Jenkins-sg" 6 | instance-name = "Jenkins-server" 7 | key-name = "maryammairaj" 8 | iam-role = "Jenkins-iam-role" 9 | -------------------------------------------------------------------------------- /Application-Code/frontend/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import "./index.css"; 4 | import App from "./App"; 5 | 6 | ReactDOM.render( 7 | 8 |
9 | 10 |
11 |
, 12 | document.getElementById("root") 13 | ); 14 | 15 | -------------------------------------------------------------------------------- /Jenkins-Server-TF/iam-role.tf: -------------------------------------------------------------------------------- 1 | resource "aws_iam_role" "iam-role" { 2 | name = var.iam-role 3 | assume_role_policy = < { 4 | try { 5 | const connectionParams = { 6 | useNewUrlParser: true, 7 | useUnifiedTopology: true, 8 | }; 9 | const useDBAuth = process.env.USE_DB_AUTH || false; 10 | if(useDBAuth){ 11 | connectionParams.user = process.env.MONGO_USERNAME; 12 | connectionParams.pass = process.env.MONGO_PASSWORD; 13 | } 14 | await mongoose.connect( 15 | process.env.MONGO_CONN_STR, 16 | connectionParams 17 | ); 18 | console.log("Connected to database."); 19 | } catch (error) { 20 | console.log("Could not connect to database.", error); 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /Application-Code/backend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14 2 | WORKDIR /usr/src/app 3 | COPY package*.json ./ 4 | RUN npm install 5 | COPY . . 6 | CMD ["node", "index.js"] 7 | 8 | # # Stage 1: Build stage 9 | # FROM node:14 AS builder 10 | # WORKDIR /usr/src/app 11 | 12 | # # Copy package.json and install dependencies 13 | # COPY package*.json ./ 14 | # RUN npm install 15 | 16 | # # Copy the rest of the application code 17 | # COPY . . 18 | 19 | # # Build the application (optional if you need to build assets or compile TypeScript) 20 | # # RUN npm run build 21 | 22 | # # Stage 2: Production stage (distroless) 23 | # FROM gcr.io/distroless/nodejs:14 24 | 25 | # # Copy only the necessary files from the build stage 26 | # WORKDIR /usr/src/app 27 | # COPY --from=builder /usr/src/app /usr/src/app 28 | 29 | # # Use distroless entrypoint 30 | # CMD ["index.js"] 31 | -------------------------------------------------------------------------------- /Application-Code/frontend/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: 'Roboto', sans-serif; 5 | background-color: #f4f4f4; 6 | color: #333; 7 | line-height: 1.6; 8 | } 9 | 10 | .app-wrapper { 11 | display: flex; 12 | justify-content: center; 13 | align-items: center; 14 | min-height: 100vh; 15 | padding: 20px; 16 | background: linear-gradient(135deg, #6e8efb, #a777e3); 17 | } 18 | 19 | /* Optional: Add some more global styles for typography */ 20 | h1, h2, h3, h4, h5, h6 { 21 | font-weight: 400; 22 | } 23 | 24 | a { 25 | color: #333; 26 | text-decoration: none; 27 | } 28 | 29 | a:hover { 30 | color: #6e8efb; 31 | } 32 | 33 | /* Styling for any code elements */ 34 | code { 35 | background-color: #eee; 36 | padding: 2px 4px; 37 | border-radius: 4px; 38 | font-family: 'Courier New', monospace; 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Frontend/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: frontend 5 | namespace: three-tier 6 | labels: 7 | role: frontend 8 | env: demo 9 | spec: 10 | replicas: 1 11 | strategy: 12 | type: RollingUpdate 13 | rollingUpdate: 14 | maxSurge: 1 15 | maxUnavailable: 25% 16 | selector: 17 | matchLabels: 18 | role: frontend 19 | template: 20 | metadata: 21 | labels: 22 | role: frontend 23 | spec: 24 | imagePullSecrets: 25 | - name: ecr-registry-secret 26 | containers: 27 | - name: frontend 28 | image: 715841356019.dkr.ecr.eu-north-1.amazonaws.com/frontend:10 29 | imagePullPolicy: Always 30 | env: 31 | - name: REACT_APP_BACKEND_URL 32 | value: "http://maryammairaj.local" 33 | ports: 34 | - containerPort: 3000 35 | -------------------------------------------------------------------------------- /Application-Code/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.11.4", 7 | "@testing-library/jest-dom": "^5.14.1", 8 | "@testing-library/react": "^11.2.7", 9 | "@testing-library/user-event": "^12.8.3", 10 | "axios": "^0.21.1", 11 | "react": "^17.0.2", 12 | "react-dom": "^17.0.2", 13 | "react-scripts": "4.0.3", 14 | "web-vitals": "^1.1.2" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject" 21 | }, 22 | "eslintConfig": { 23 | "extends": [ 24 | "react-app", 25 | "react-app/jest" 26 | ] 27 | }, 28 | "browserslist": { 29 | "production": [ 30 | ">0.2%", 31 | "not dead", 32 | "not op_mini all" 33 | ], 34 | "development": [ 35 | "last 1 chrome version", 36 | "last 1 firefox version", 37 | "last 1 safari version" 38 | ] 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Application-Code/frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14 2 | WORKDIR /usr/src/app 3 | COPY package*.json ./ 4 | RUN npm install 5 | COPY . . 6 | EXPOSE 3000 7 | CMD [ "npm", "start" ] 8 | 9 | # # Stage 1: Build stage 10 | # FROM node:14 AS builder 11 | 12 | # # Set the working directory in the container 13 | # WORKDIR /usr/src/app 14 | 15 | # # Copy package.json and package-lock.json to install dependencies 16 | # COPY package*.json ./ 17 | 18 | # # Install all dependencies (production and development) 19 | # RUN npm install 20 | 21 | # # Copy the application code 22 | # COPY . . 23 | 24 | # # Optional: Run any build steps if necessary (e.g., for React, TypeScript, etc.) 25 | # # RUN npm run build 26 | 27 | # # Stage 2: Production stage (distroless) 28 | # FROM gcr.io/distroless/nodejs:14 29 | 30 | # # Set the working directory 31 | # WORKDIR /usr/src/app 32 | 33 | # # Copy only the necessary files from the build stage 34 | # COPY --from=builder /usr/src/app /usr/src/app 35 | 36 | # # Expose the port your app runs on 37 | # EXPOSE 3000 38 | 39 | # # Set the command to start your app 40 | # CMD ["npm", "start"] 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Application-Code/backend/routes/tasks.js: -------------------------------------------------------------------------------- 1 | const Task = require("../models/task"); 2 | const express = require("express"); 3 | const router = express.Router(); 4 | 5 | router.post("/", async (req, res) => { 6 | try { 7 | const task = await new Task(req.body).save(); 8 | res.send(task); 9 | } catch (error) { 10 | res.send(error); 11 | } 12 | }); 13 | 14 | router.get("/", async (req, res) => { 15 | try { 16 | const tasks = await Task.find(); 17 | res.send(tasks); 18 | } catch (error) { 19 | res.send(error); 20 | } 21 | }); 22 | 23 | router.put("/:id", async (req, res) => { 24 | try { 25 | const task = await Task.findOneAndUpdate( 26 | { _id: req.params.id }, 27 | req.body 28 | ); 29 | res.send(task); 30 | } catch (error) { 31 | res.send(error); 32 | } 33 | }); 34 | 35 | router.delete("/:id", async (req, res) => { 36 | try { 37 | const task = await Task.findByIdAndDelete(req.params.id); 38 | res.send(task); 39 | } catch (error) { 40 | res.send(error); 41 | } 42 | }); 43 | 44 | module.exports = router; 45 | -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Database/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | namespace: three-tier 5 | name: mongodb 6 | spec: 7 | replicas: 1 8 | selector: 9 | matchLabels: 10 | app: mongodb 11 | template: 12 | metadata: 13 | labels: 14 | app: mongodb 15 | spec: 16 | containers: 17 | - name: mon 18 | image: mongo:4.4.6 19 | command: 20 | - "numactl" 21 | - "--interleave=all" 22 | - "mongod" 23 | - "--wiredTigerCacheSizeGB" 24 | - "0.1" 25 | - "--bind_ip" 26 | - "0.0.0.0" 27 | ports: 28 | - containerPort: 27017 29 | env: 30 | - name: MONGO_INITDB_ROOT_USERNAME 31 | valueFrom: 32 | secretKeyRef: 33 | name: mongo-sec 34 | key: username 35 | - name: MONGO_INITDB_ROOT_PASSWORD 36 | valueFrom: 37 | secretKeyRef: 38 | name: mongo-sec 39 | key: password 40 | volumeMounts: 41 | - name: mongo-volume 42 | mountPath: /data/db 43 | volumes: 44 | - name: mongo-volume 45 | persistentVolumeClaim: 46 | claimName: mongo-volume-claim -------------------------------------------------------------------------------- /Application-Code/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | .app { 2 | display: flex; 3 | flex-direction: column; 4 | height: 100vh; 5 | } 6 | 7 | .app-header { 8 | background-color: #282c34; 9 | color: white; 10 | padding: 10px 20px; 11 | text-align: center; 12 | font-size: 1.5rem; 13 | } 14 | 15 | .main-content { 16 | flex-grow: 1; 17 | display: flex; 18 | justify-content: center; 19 | align-items: center; 20 | padding: 20px; 21 | } 22 | 23 | .todo-container { 24 | width: 100%; 25 | max-width: 600px; 26 | padding: 20px; 27 | } 28 | 29 | .task-form { 30 | display: flex; 31 | gap: 10px; 32 | margin-bottom: 20px; 33 | } 34 | 35 | .task-input { 36 | flex-grow: 1; 37 | } 38 | 39 | .add-task-btn, .delete-task-btn { 40 | flex-shrink: 0; 41 | box-shadow: 0px 2px 5px rgba(0,0,0,0.2); 42 | transition: transform 0.1s ease-in-out; 43 | } 44 | 45 | .add-task-btn:hover, .delete-task-btn:hover { 46 | transform: scale(1.05); 47 | } 48 | 49 | .tasks-list { 50 | margin-top: 10px; 51 | } 52 | 53 | .task-item { 54 | display: flex; 55 | align-items: center; 56 | margin-top: 10px; 57 | padding: 10px; 58 | box-shadow: 0px 2px 5px rgba(0,0,0,0.1); 59 | } 60 | 61 | .task-text { 62 | flex-grow: 1; 63 | margin: 0 10px; 64 | } 65 | 66 | .task-text.completed { 67 | text-decoration: line-through; 68 | } 69 | 70 | -------------------------------------------------------------------------------- /eks/variables.tf: -------------------------------------------------------------------------------- 1 | variable "aws-region" {} 2 | variable "env" {} 3 | variable "cluster-name" {} 4 | variable "vpc-cidr-block" {} 5 | variable "vpc-name" {} 6 | variable "igw-name" {} 7 | variable "pub-subnet-count" {} 8 | variable "pub-cidr-block" { 9 | type = list(string) 10 | } 11 | variable "pub-availability-zone" { 12 | type = list(string) 13 | } 14 | variable "pub-sub-name" {} 15 | variable "pri-subnet-count" {} 16 | variable "pri-cidr-block" { 17 | type = list(string) 18 | } 19 | variable "pri-availability-zone" { 20 | type = list(string) 21 | } 22 | variable "pri-sub-name" {} 23 | variable "public-rt-name" {} 24 | variable "private-rt-name" {} 25 | variable "eip-name" {} 26 | variable "ngw-name" {} 27 | variable "eks-sg" {} 28 | 29 | 30 | # EKS 31 | variable "is-eks-cluster-enabled" {} 32 | variable "cluster-version" {} 33 | variable "endpoint-private-access" {} 34 | variable "endpoint-public-access" {} 35 | variable "ondemand_instance_types" { 36 | default = ["t3a.medium"] 37 | } 38 | 39 | variable "spot_instance_types" {} 40 | variable "desired_capacity_on_demand" {} 41 | variable "min_capacity_on_demand" {} 42 | variable "max_capacity_on_demand" {} 43 | variable "desired_capacity_spot" {} 44 | variable "min_capacity_spot" {} 45 | variable "max_capacity_spot" {} 46 | variable "addons" { 47 | type = list(object({ 48 | name = string 49 | version = string 50 | })) 51 | } 52 | -------------------------------------------------------------------------------- /Application-Code/backend/index.js: -------------------------------------------------------------------------------- 1 | const tasks = require("./routes/tasks"); 2 | const connection = require("./db"); 3 | const cors = require("cors"); 4 | const express = require("express"); 5 | const app = express(); 6 | const mongoose = require('mongoose'); 7 | 8 | connection(); 9 | 10 | app.use(express.json()); 11 | app.use(cors()); 12 | 13 | // Health check endpoints 14 | 15 | // Basic health check to see if the server is running 16 | app.get('/healthz', (req, res) => { 17 | res.status(200).send('Healthy'); 18 | }); 19 | 20 | let lastReadyState = null; 21 | // Readiness check to see if the server is ready to serve requests 22 | app.get('/ready', (req, res) => { 23 | // Here you can add logic to check database connection or other dependencies 24 | const isDbConnected = mongoose.connection.readyState === 1; 25 | if (isDbConnected !== lastReadyState) { 26 | console.log(`Database readyState: ${mongoose.connection.readyState}`); 27 | lastReadyState = isDbConnected; 28 | } 29 | 30 | if (isDbConnected) { 31 | res.status(200).send('Ready'); 32 | } else { 33 | res.status(503).send('Not Ready'); 34 | } 35 | }); 36 | 37 | // Startup check to ensure the server has started correctly 38 | app.get('/started', (req, res) => { 39 | // Assuming the server has started correctly if this endpoint is reachable 40 | res.status(200).send('Started'); 41 | }); 42 | 43 | app.use("/api/tasks", tasks); 44 | 45 | const port = process.env.PORT || 3500; 46 | app.listen(port, () => console.log(`Listening on port ${port}...`)); 47 | -------------------------------------------------------------------------------- /Jenkins-Server-TF/vpc.tf: -------------------------------------------------------------------------------- 1 | resource "aws_vpc" "vpc" { 2 | cidr_block = "10.0.0.0/16" 3 | 4 | tags = { 5 | Name = var.vpc-name 6 | } 7 | } 8 | 9 | resource "aws_internet_gateway" "igw" { 10 | vpc_id = aws_vpc.vpc.id 11 | 12 | tags = { 13 | Name = var.igw-name 14 | } 15 | } 16 | 17 | resource "aws_subnet" "public-subnet" { 18 | vpc_id = aws_vpc.vpc.id 19 | cidr_block = "10.0.1.0/24" 20 | availability_zone = "us-east-1a" 21 | map_public_ip_on_launch = true 22 | 23 | tags = { 24 | Name = var.subnet-name 25 | } 26 | } 27 | 28 | resource "aws_route_table" "rt" { 29 | vpc_id = aws_vpc.vpc.id 30 | route { 31 | cidr_block = "0.0.0.0/0" 32 | gateway_id = aws_internet_gateway.igw.id 33 | } 34 | 35 | tags = { 36 | Name = var.rt-name 37 | } 38 | } 39 | 40 | resource "aws_route_table_association" "rt-association" { 41 | route_table_id = aws_route_table.rt.id 42 | subnet_id = aws_subnet.public-subnet.id 43 | } 44 | 45 | resource "aws_security_group" "security-group" { 46 | vpc_id = aws_vpc.vpc.id 47 | description = "Allowing Jenkins, Sonarqube, SSH Access" 48 | 49 | ingress = [ 50 | for port in [22, 8080, 9000, 9090, 80] : { 51 | description = "TLS from VPC" 52 | from_port = port 53 | to_port = port 54 | protocol = "tcp" 55 | ipv6_cidr_blocks = ["::/0"] 56 | self = false 57 | prefix_list_ids = [] 58 | security_groups = [] 59 | cidr_blocks = ["0.0.0.0/0"] 60 | } 61 | ] 62 | 63 | egress { 64 | from_port = 0 65 | to_port = 0 66 | protocol = "-1" 67 | cidr_blocks = ["0.0.0.0/0"] 68 | } 69 | 70 | tags = { 71 | Name = var.sg-name 72 | } 73 | } -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/Backend/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: api 5 | namespace: three-tier 6 | labels: 7 | role: api 8 | env: demo 9 | spec: 10 | replicas: 2 11 | strategy: 12 | type: RollingUpdate 13 | rollingUpdate: 14 | maxSurge: 1 15 | maxUnavailable: 25% 16 | selector: 17 | matchLabels: 18 | role: api 19 | template: 20 | metadata: 21 | labels: 22 | role: api 23 | spec: 24 | imagePullSecrets: 25 | - name: ecr-registry-secret 26 | containers: 27 | - name: api 28 | image: 715841356019.dkr.ecr.eu-north-1.amazonaws.com/backend:3 29 | imagePullPolicy: Always 30 | env: 31 | - name: MONGO_CONN_STR 32 | value: mongodb://mongodb-svc:27017/todo?directConnection=true 33 | - name: MONGO_USERNAME 34 | valueFrom: 35 | secretKeyRef: 36 | name: mongo-sec 37 | key: username 38 | - name: MONGO_PASSWORD 39 | valueFrom: 40 | secretKeyRef: 41 | name: mongo-sec 42 | key: password 43 | ports: 44 | - containerPort: 3500 45 | livenessProbe: 46 | httpGet: 47 | path: /healthz 48 | port: 3500 49 | initialDelaySeconds: 2 50 | periodSeconds: 5 51 | readinessProbe: 52 | httpGet: 53 | path: /ready 54 | port: 3500 55 | initialDelaySeconds: 5 56 | periodSeconds: 5 57 | successThreshold: 1 58 | startupProbe: 59 | httpGet: 60 | path: /started 61 | port: 3500 62 | initialDelaySeconds: 0 63 | periodSeconds: 10 64 | failureThreshold: 30 65 | -------------------------------------------------------------------------------- /eks/dev.tfvars: -------------------------------------------------------------------------------- 1 | env = "dev" 2 | aws-region = "eu-north-1" 3 | vpc-cidr-block = "10.16.0.0/16" 4 | vpc-name = "vpc" 5 | igw-name = "igw" 6 | pub-subnet-count = 3 7 | pub-cidr-block = ["10.16.0.0/20", "10.16.16.0/20", "10.16.32.0/20"] 8 | pub-availability-zone = ["eu-north-1a", "eu-north-1b", "eu-north-1c"] 9 | pub-sub-name = "subnet-public" 10 | pri-subnet-count = 3 11 | pri-cidr-block = ["10.16.128.0/20", "10.16.144.0/20", "10.16.160.0/20"] 12 | pri-availability-zone = ["eu-north-1a", "eu-north-1b", "eu-north-1c"] 13 | pri-sub-name = "subnet-private" 14 | public-rt-name = "public-route-table" 15 | private-rt-name = "private-route-table" 16 | eip-name = "elasticip-ngw" 17 | ngw-name = "ngw" 18 | eks-sg = "eks-sg" 19 | 20 | # EKS 21 | is-eks-cluster-enabled = true 22 | cluster-version = "1.30" 23 | cluster-name = "eks-cluster" 24 | endpoint-private-access = true 25 | endpoint-public-access = false 26 | ondemand_instance_types = ["t3.medium"] 27 | spot_instance_types = ["c5a.large", "c5a.xlarge", "m5a.large", "m5a.xlarge", "c5.large", "m5.large", "t3.large", "t3.xlarge"] 28 | desired_capacity_on_demand = "1" 29 | min_capacity_on_demand = "1" 30 | max_capacity_on_demand = "5" 31 | desired_capacity_spot = "1" 32 | min_capacity_spot = "1" 33 | max_capacity_spot = "10" 34 | addons = [ 35 | { 36 | name = "vpc-cni", 37 | version = "v1.18.1-eksbuild.1" 38 | }, 39 | { 40 | name = "coredns" 41 | version = "v1.11.1-eksbuild.9" 42 | }, 43 | { 44 | name = "kube-proxy" 45 | version = "v1.29.3-eksbuild.2" 46 | }, 47 | { 48 | name = "aws-ebs-csi-driver" 49 | version = "v1.30.0-eksbuild.1" 50 | } 51 | # Add more addons as needed 52 | ] 53 | -------------------------------------------------------------------------------- /Application-Code/frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | TO-DO App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /eks/main.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | org = "medium" 3 | env = var.env 4 | } 5 | 6 | module "eks" { 7 | source = "../module" 8 | 9 | env = var.env 10 | cluster-name = "${local.env}-${local.org}-${var.cluster-name}" 11 | cidr-block = var.vpc-cidr-block 12 | vpc-name = "${local.env}-${local.org}-${var.vpc-name}" 13 | igw-name = "${local.env}-${local.org}-${var.igw-name}" 14 | pub-subnet-count = var.pub-subnet-count 15 | pub-cidr-block = var.pub-cidr-block 16 | pub-availability-zone = var.pub-availability-zone 17 | pub-sub-name = "${local.env}-${local.org}-${var.pub-sub-name}" 18 | pri-subnet-count = var.pri-subnet-count 19 | pri-cidr-block = var.pri-cidr-block 20 | pri-availability-zone = var.pri-availability-zone 21 | pri-sub-name = "${local.env}-${local.org}-${var.pri-sub-name}" 22 | public-rt-name = "${local.env}-${local.org}-${var.public-rt-name}" 23 | private-rt-name = "${local.env}-${local.org}-${var.private-rt-name}" 24 | eip-name = "${local.env}-${local.org}-${var.eip-name}" 25 | ngw-name = "${local.env}-${local.org}-${var.ngw-name}" 26 | eks-sg = var.eks-sg 27 | 28 | is_eks_role_enabled = true 29 | is_eks_nodegroup_role_enabled = true 30 | ondemand_instance_types = var.ondemand_instance_types 31 | spot_instance_types = var.spot_instance_types 32 | desired_capacity_on_demand = var.desired_capacity_on_demand 33 | min_capacity_on_demand = var.min_capacity_on_demand 34 | max_capacity_on_demand = var.max_capacity_on_demand 35 | desired_capacity_spot = var.desired_capacity_spot 36 | min_capacity_spot = var.min_capacity_spot 37 | max_capacity_spot = var.max_capacity_spot 38 | is-eks-cluster-enabled = var.is-eks-cluster-enabled 39 | cluster-version = var.cluster-version 40 | endpoint-private-access = var.endpoint-private-access 41 | endpoint-public-access = var.endpoint-public-access 42 | 43 | addons = var.addons 44 | } 45 | -------------------------------------------------------------------------------- /Application-Code/frontend/src/Tasks.js: -------------------------------------------------------------------------------- 1 | import { Component } from "react"; 2 | import { 3 | addTask, 4 | getTasks, 5 | updateTask, 6 | deleteTask, 7 | } from "./services/taskServices"; 8 | 9 | class Tasks extends Component { 10 | state = { tasks: [], currentTask: "" }; 11 | 12 | async componentDidMount() { 13 | try { 14 | const { data } = await getTasks(); 15 | this.setState({ tasks: data }); 16 | } catch (error) { 17 | console.log(error); 18 | } 19 | } 20 | 21 | handleChange = ({ currentTarget: input }) => { 22 | this.setState({ currentTask: input.value }); 23 | }; 24 | 25 | handleSubmit = async (e) => { 26 | e.preventDefault(); 27 | const originalTasks = this.state.tasks; 28 | try { 29 | const { data } = await addTask({ task: this.state.currentTask }); 30 | const tasks = originalTasks; 31 | tasks.push(data); 32 | this.setState({ tasks, currentTask: "" }); 33 | } catch (error) { 34 | console.log(error); 35 | } 36 | }; 37 | 38 | handleUpdate = async (currentTask) => { 39 | const originalTasks = this.state.tasks; 40 | try { 41 | const tasks = [...originalTasks]; 42 | const index = tasks.findIndex((task) => task._id === currentTask); 43 | tasks[index] = { ...tasks[index] }; 44 | tasks[index].completed = !tasks[index].completed; 45 | this.setState({ tasks }); 46 | await updateTask(currentTask, { 47 | completed: tasks[index].completed, 48 | }); 49 | } catch (error) { 50 | this.setState({ tasks: originalTasks }); 51 | console.log(error); 52 | } 53 | }; 54 | 55 | handleDelete = async (currentTask) => { 56 | const originalTasks = this.state.tasks; 57 | try { 58 | const tasks = originalTasks.filter( 59 | (task) => task._id !== currentTask 60 | ); 61 | this.setState({ tasks }); 62 | await deleteTask(currentTask); 63 | } catch (error) { 64 | this.setState({ tasks: originalTasks }); 65 | console.log(error); 66 | } 67 | }; 68 | } 69 | 70 | export default Tasks; 71 | -------------------------------------------------------------------------------- /modules/Jenkinsfile: -------------------------------------------------------------------------------- 1 | properties([ 2 | parameters([ 3 | string( 4 | defaultValue: 'dev', 5 | name: 'Environment' 6 | ), 7 | choice( 8 | choices: ['plan', 'apply', 'destroy'], 9 | name: 'Terraform_Action' 10 | )]) 11 | ]) 12 | pipeline { 13 | agent any 14 | stages { 15 | stage('Preparing') { 16 | steps { 17 | sh 'echo Preparing' 18 | } 19 | } 20 | stage('Git Pulling') { 21 | steps { 22 | git branch: 'main', url: 'https://github.com/MaryamMairaj123/EKS-Terraform-GitHub-Actions-master.git' 23 | } 24 | } 25 | stage('Init') { 26 | steps { 27 | withAWS(credentials: 'aws-cred', region: 'eu-north-1') { 28 | sh 'terraform -chdir=eks/ init' 29 | // sh 'terraform -chdir=eks/ init -migrate-state' // Migrate the state to the new backend configuration 30 | // sh 'terraform -chdir=eks/ init -reconfigure' // Reconfigure backend without migrating state 31 | 32 | 33 | } 34 | } 35 | } 36 | stage('Validate') { 37 | steps { 38 | withAWS(credentials: 'aws-cred', region: 'eu-north-1') { 39 | sh 'terraform -chdir=eks/ validate' 40 | } 41 | } 42 | } 43 | stage('Action') { 44 | steps { 45 | withAWS(credentials: 'aws-cred', region: 'eu-north-1') { 46 | script { 47 | if (params.Terraform_Action == 'plan') { 48 | sh "terraform -chdir=eks/ plan -var-file=${params.Environment}.tfvars" 49 | } else if (params.Terraform_Action == 'apply') { 50 | sh "terraform -chdir=eks/ apply -var-file=${params.Environment}.tfvars -auto-approve" 51 | } else if (params.Terraform_Action == 'destroy') { 52 | sh "terraform -chdir=eks/ destroy -var-file=${params.Environment}.tfvars -auto-approve" 53 | } else { 54 | error "Invalid value for Terraform_Action: ${params.Terraform_Action}" 55 | } 56 | } 57 | } 58 | } 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /Kubernetes-Manifests-file/ingress.yaml: -------------------------------------------------------------------------------- 1 | # apiVersion: networking.k8s.io/v1 2 | # kind: Ingress 3 | # metadata: 4 | # name: mainlb 5 | # namespace: three-tier 6 | # annotations: 7 | # alb.ingress.kubernetes.io/scheme: internet-facing 8 | # alb.ingress.kubernetes.io/target-type: ip 9 | # alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' 10 | # alb.ingress.kubernetes.io/subnets: "subnet-007a5e0ca8c6db2b4,subnet-0e72bbde732547118,subnet-0e4370e2b139ed788" 11 | # spec: 12 | # ingressClassName: alb 13 | # rules: 14 | # - host: maryammairaj.local 15 | # http: 16 | # paths: 17 | # - path: /api 18 | # pathType: Prefix 19 | # backend: 20 | # service: 21 | # name: api 22 | # port: 23 | # number: 3500 24 | # - path: /healthz 25 | # pathType: Exact 26 | # backend: 27 | # service: 28 | # name: api 29 | # port: 30 | # number: 3500 31 | # - path: /ready 32 | # pathType: Exact 33 | # backend: 34 | # service: 35 | # name: api 36 | # port: 37 | # number: 3500 38 | # - path: /started 39 | # pathType: Exact 40 | # backend: 41 | # service: 42 | # name: api 43 | # port: 44 | # number: 3500 45 | # - path: / 46 | # pathType: Prefix 47 | # backend: 48 | # service: 49 | # name: frontend 50 | # port: 51 | # number: 3000 52 | 53 | 54 | apiVersion: networking.k8s.io/v1 55 | kind: Ingress 56 | metadata: 57 | name: mainlb 58 | namespace: three-tier 59 | annotations: 60 | alb.ingress.kubernetes.io/scheme: internet-facing 61 | alb.ingress.kubernetes.io/target-type: ip 62 | alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}]' 63 | alb.ingress.kubernetes.io/subnets: "subnet-007a5e0ca8c6db2b4,subnet-0e72bbde732547118,subnet-0e4370e2b139ed788" 64 | spec: 65 | ingressClassName: alb 66 | rules: 67 | - host: maryammairaj.local 68 | http: 69 | paths: 70 | - path: /api* 71 | pathType: Prefix 72 | backend: 73 | service: 74 | name: api 75 | port: 76 | number: 3500 77 | - path: / 78 | pathType: Prefix 79 | backend: 80 | service: 81 | name: frontend 82 | port: 83 | number: 3000 84 | 85 | -------------------------------------------------------------------------------- /Application-Code/frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Tasks from "./Tasks"; 3 | import { Paper, TextField, Checkbox, Button } from "@material-ui/core"; 4 | import "./App.css"; // Update your CSS file accordingly 5 | 6 | class App extends Tasks { 7 | state = { tasks: [], currentTask: "" }; 8 | 9 | render() { 10 | const { tasks, currentTask } = this.state; 11 | return ( 12 |
13 |
14 |

My To-Do List

15 |
16 |
17 | 18 |
19 | 28 | 31 | 32 |
33 | {tasks.map((task) => ( 34 | 35 | this.handleUpdate(task._id)} 38 | color="primary" 39 | /> 40 |
41 | {task.task} 42 |
43 | 46 |
47 | ))} 48 |
49 |
50 |
51 |
52 | ); 53 | } 54 | } 55 | 56 | export default App; 57 | 58 | -------------------------------------------------------------------------------- /Jenkins-Server-TF/tools-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # For Ubuntu 22.04 3 | # Intsalling Java 4 | sudo apt update -y 5 | sudo apt install openjdk-17-jre -y 6 | sudo apt install openjdk-17-jdk -y 7 | java --version 8 | 9 | # Installing Jenkins 10 | curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \ 11 | /usr/share/keyrings/jenkins-keyring.asc > /dev/null 12 | echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ 13 | https://pkg.jenkins.io/debian binary/ | sudo tee \ 14 | /etc/apt/sources.list.d/jenkins.list > /dev/null 15 | sudo apt-get update -y 16 | sudo apt-get install jenkins -y 17 | 18 | # Installing Docker 19 | #!/bin/bash 20 | sudo apt update 21 | sudo apt install docker.io -y 22 | sudo usermod -aG docker jenkins 23 | sudo usermod -aG docker ubuntu 24 | sudo systemctl restart docker 25 | sudo chmod 777 /var/run/docker.sock 26 | 27 | # If you don't want to install Jenkins, you can create a container of Jenkins 28 | # docker run -d -p 8080:8080 -p 50000:50000 --name jenkins-container jenkins/jenkins:lts 29 | 30 | # Run Docker Container of Sonarqube 31 | #!/bin/bash 32 | docker run -d --name sonar -p 9000:9000 sonarqube:lts-community 33 | 34 | 35 | # Installing AWS CLI 36 | #!/bin/bash 37 | curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" 38 | sudo apt install unzip -y 39 | unzip awscliv2.zip 40 | sudo ./aws/install 41 | 42 | # Installing Kubectl 43 | #!/bin/bash 44 | sudo apt update 45 | sudo apt install curl -y 46 | sudo curl -LO "https://dl.k8s.io/release/v1.28.4/bin/linux/amd64/kubectl" 47 | sudo chmod +x kubectl 48 | sudo mv kubectl /usr/local/bin/ 49 | kubectl version --client 50 | 51 | 52 | # Installing eksctl 53 | #! /bin/bash 54 | curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp 55 | sudo mv /tmp/eksctl /usr/local/bin 56 | eksctl version 57 | 58 | # Installing Terraform 59 | #!/bin/bash 60 | wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg 61 | echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list 62 | sudo apt update 63 | sudo apt install terraform -y 64 | 65 | # Installing Trivy 66 | #!/bin/bash 67 | sudo apt-get install wget apt-transport-https gnupg lsb-release -y 68 | wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add - 69 | echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list 70 | sudo apt update 71 | sudo apt install trivy -y 72 | 73 | 74 | # Intalling Helm 75 | #! /bin/bash 76 | sudo snap install helm --classic -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Three-Tier Web Application Deployment on AWS EKS using AWS EKS, ArgoCD, Prometheus, Grafana, and Jenkins 2 | [![LinkedIn](https://img.shields.io/badge/Connect%20with%20me%20on-LinkedIn-blue.svg)](https://www.linkedin.com/in/aman-devops/) 3 | [![Discord](https://img.shields.io/badge/Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.com/invite/jdzF8kTtw2) 4 | [![Medium](https://img.shields.io/badge/Medium-12100E?style=for-the-badge&logo=medium&logoColor=white)](https://medium.com/@amanpathakdevops) 5 | [![GitHub](https://img.shields.io/github/stars/AmanPathak-DevOps.svg?style=social)](https://github.com/AmanPathak-DevOps) 6 | [![AWS](https://img.shields.io/badge/AWS-%F0%9F%9B%A1-orange)](https://aws.amazon.com) 7 | [![Terraform](https://img.shields.io/badge/Terraform-%E2%9C%A8-lightgrey)](https://www.terraform.io) 8 | 9 | ![Three-Tier Banner](assets/Three-Tier.gif) 10 | 11 | Welcome to the Three-Tier Web Application Deployment project! 🚀 12 | 13 | This repository hosts the implementation of a Three-Tier Web App using ReactJS, NodeJS, and MongoDB, deployed on AWS EKS. The project covers a wide range of tools and practices for a robust and scalable DevOps setup. 14 | 15 | ## Table of Contents 16 | - [Application Code](#application-code) 17 | - [Jenkins Pipeline Code](#jenkins-pipeline-code) 18 | - [Jenkins Server Terraform](#jenkins-server-terraform) 19 | - [Kubernetes Manifests Files](#kubernetes-manifests-files) 20 | - [Project Details](#project-details) 21 | 22 | ## Application Code 23 | The `Application-Code` directory contains the source code for the Three-Tier Web Application. Dive into this directory to explore the frontend and backend implementations. 24 | 25 | ## Jenkins Pipeline Code 26 | In the `Jenkins-Pipeline-Code` directory, you'll find Jenkins pipeline scripts. These scripts automate the CI/CD process, ensuring smooth integration and deployment of your application. 27 | 28 | ## Jenkins Server Terraform 29 | Explore the `Jenkins-Server-TF` directory to find Terraform scripts for setting up the Jenkins Server on AWS. These scripts simplify the infrastructure provisioning process. 30 | 31 | ## Kubernetes Manifests Files 32 | The `Kubernetes-Manifests-Files` directory holds Kubernetes manifests for deploying your application on AWS EKS. Understand and customize these files to suit your project needs. 33 | 34 | ## Project Details 35 | 🛠️ **Tools Explored:** 36 | - Terraform & AWS CLI for AWS infrastructure 37 | - Jenkins, Sonarqube, Terraform, Kubectl, and more for CI/CD setup 38 | - Helm, Prometheus, and Grafana for Monitoring 39 | - ArgoCD for GitOps practices 40 | 41 | 🚢 **High-Level Overview:** 42 | - IAM User setup & Terraform magic on AWS 43 | - Jenkins deployment with AWS integration 44 | - EKS Cluster creation & Load Balancer configuration 45 | - Private ECR repositories for secure image management 46 | - Helm charts for efficient monitoring setup 47 | - GitOps with ArgoCD - the cherry on top! 48 | 49 | 📈 **The journey covered everything from setting up tools to deploying a Three-Tier app, ensuring data persistence, and implementing CI/CD pipelines.** 50 | 51 | ## Getting Started 52 | To get started with this project, refer to our [comprehensive guide](https://amanpathakdevops.medium.com/advanced-end-to-end-devsecops-kubernetes-three-tier-project-using-aws-eks-argocd-prometheus-fbbfdb956d1a) that walks you through IAM user setup, infrastructure provisioning, CI/CD pipeline configuration, EKS cluster creation, and more. 53 | 54 | ## Contributing 55 | We welcome contributions! If you have ideas for enhancements or find any issues, please open a pull request or file an issue. 56 | 57 | ## License 58 | This project is licensed under the [MIT License](LICENSE). 59 | 60 | Happy Coding! 🚀 61 | -------------------------------------------------------------------------------- /Jenkins-Pipeline-Code/Jenkinsfile-Backend: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | tools { 4 | nodejs 'nodejs' 5 | } 6 | environment { 7 | SCANNER_HOME=tool 'sonar-scanner' 8 | AWS_ACCOUNT_ID = credentials('AWS-ACCOUNT-ID ') 9 | AWS_ECR_REPO_NAME = credentials('ECR-backend-id ') 10 | AWS_DEFAULT_REGION = 'eu-north-1' 11 | REPOSITORY_URI = "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/" 12 | } 13 | stages { 14 | stage('Cleaning Workspace') { 15 | steps { 16 | cleanWs() 17 | } 18 | } 19 | stage('Checkout from Git') { 20 | steps { 21 | git branch: 'main', credentialsId: 'Git-cred', url: 'https://github.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project.git' 22 | } 23 | } 24 | stage('Sonarqube Analysis') { 25 | steps { 26 | dir('Application-Code/backend') { 27 | withSonarQubeEnv('sonar-server') { 28 | sh ''' $SCANNER_HOME/bin/sonar-scanner \ 29 | -Dsonar.projectName=backend \ 30 | -Dsonar.projectKey=backend ''' 31 | } 32 | } 33 | } 34 | } 35 | stage('Quality Check') { 36 | steps { 37 | script { 38 | waitForQualityGate abortPipeline: false, credentialsId: 'sonar-token' 39 | } 40 | } 41 | } 42 | // stage('OWASP Dependency-Check Scan') { 43 | // steps { 44 | // dir('Application-Code/backend') { 45 | // dependencyCheck additionalArguments: '--scan ./ --disableYarnAudit --disableNodeAudit', odcInstallation: 'DP-Check' 46 | // dependencyCheckPublisher pattern: '**/dependency-check-report.xml' 47 | // } 48 | // } 49 | // } 50 | stage('Trivy File Scan') { 51 | steps { 52 | dir('Application-Code/backend') { 53 | sh 'trivy fs . > trivyfs.txt' 54 | } 55 | } 56 | } 57 | stage("Docker Image Build") { 58 | steps { 59 | script { 60 | dir('Application-Code/backend') { 61 | sh 'docker system prune -f' 62 | sh 'docker container prune -f' 63 | sh 'docker build -t ${AWS_ECR_REPO_NAME} .' 64 | } 65 | } 66 | } 67 | } 68 | stage("ECR Image Pushing") { 69 | steps { 70 | script { 71 | sh 'aws ecr get-login-password --region ${AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${REPOSITORY_URI}' 72 | sh 'docker tag ${AWS_ECR_REPO_NAME} ${REPOSITORY_URI}${AWS_ECR_REPO_NAME}:${BUILD_NUMBER}' 73 | sh 'docker push ${REPOSITORY_URI}${AWS_ECR_REPO_NAME}:${BUILD_NUMBER}' 74 | } 75 | } 76 | } 77 | stage("TRIVY Image Scan") { 78 | steps { 79 | sh 'trivy image ${REPOSITORY_URI}${AWS_ECR_REPO_NAME}:${BUILD_NUMBER} > trivyimage.txt' 80 | } 81 | } 82 | stage('Checkout Code') { 83 | steps { 84 | git branch: 'main', credentialsId: 'Git-cred', url: 'https://github.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project.git' 85 | } 86 | } 87 | stage('Update Deployment file') { 88 | environment { 89 | GIT_REPO_NAME = "End-to-End-Kubernetes-Three-Tier-DevSecOps-Project" 90 | GIT_USER_NAME = "MaryamMairaj123" 91 | } 92 | steps { 93 | dir('Kubernetes-Manifests-file/Backend') { 94 | withCredentials([string(credentialsId: 'GITHUB', variable: 'Git-cred')]) { 95 | sh ''' 96 | git config user.email "maryammairaj53@gmail.com" 97 | git config user.name "MaryamMairaj123" 98 | BUILD_NUMBER=${BUILD_NUMBER} 99 | echo $BUILD_NUMBER 100 | imageTag=$(grep -oP '(?<=backend:)[^ ]+' deployment.yaml) 101 | echo $imageTag 102 | sed -i "s/${AWS_ECR_REPO_NAME}:${imageTag}/${AWS_ECR_REPO_NAME}:${BUILD_NUMBER}/" deployment.yaml 103 | git add deployment.yaml 104 | git commit -m "Update deployment Image to version \${BUILD_NUMBER}" 105 | git push https://MaryamMairaj123:@github.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project HEAD:main 106 | ''' 107 | } 108 | } 109 | } 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Jenkins-Pipeline-Code/Jenkinsfile-Frontend: -------------------------------------------------------------------------------- 1 | pipeline { 2 | agent any 3 | tools { 4 | nodejs 'nodejs' 5 | } 6 | environment { 7 | SCANNER_HOME=tool 'sonar-scanner' 8 | AWS_ACCOUNT_ID = credentials('AWS-ACCOUNT-ID') 9 | AWS_ECR_REPO_NAME = credentials('ECR-frontend-id') 10 | AWS_DEFAULT_REGION = 'eu-north-1' 11 | REPOSITORY_URI = "${AWS_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com/" 12 | } 13 | stages { 14 | stage('Cleaning Workspace') { 15 | steps { 16 | cleanWs() 17 | } 18 | } 19 | stage('Checkout from Git') { 20 | steps { 21 | git branch: 'main', credentialsId: 'Git-cred', url: 'https://github.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project.git' 22 | } 23 | } 24 | stage('Sonarqube Analysis') { 25 | steps { 26 | dir('Application-Code/frontend') { 27 | withSonarQubeEnv('sonar-server') { 28 | sh ''' $SCANNER_HOME/bin/sonar-scanner \ 29 | -Dsonar.projectName=frontend \ 30 | -Dsonar.projectKey=frontend ''' 31 | } 32 | } 33 | } 34 | } 35 | stage('Quality Check') { 36 | steps { 37 | script { 38 | waitForQualityGate abortPipeline: false, credentialsId: 'sonar-token' 39 | } 40 | } 41 | } 42 | // stage('OWASP Dependency-Check Scan') { 43 | // steps { 44 | // dir('Application-Code/frontend') { 45 | // dependencyCheck additionalArguments: '--scan ./ --disableYarnAudit --disableNodeAudit', odcInstallation: 'dependencycheck' 46 | // dependencyCheckPublisher pattern: '**/dependency-check-report.xml' 47 | // } 48 | // } 49 | // } 50 | stage('Trivy File Scan') { 51 | steps { 52 | dir('Application-Code/frontend') { 53 | sh 'trivy fs . > trivyfs.txt' 54 | } 55 | } 56 | } 57 | stage("Docker Image Build") { 58 | steps { 59 | script { 60 | dir('Application-Code/frontend') { 61 | sh 'docker system prune -f' 62 | sh 'docker container prune -f' 63 | sh 'docker build -t ${AWS_ECR_REPO_NAME} .' 64 | } 65 | } 66 | } 67 | } 68 | stage("ECR Image Pushing") { 69 | steps { 70 | script { 71 | sh 'aws ecr get-login-password --region ${AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${REPOSITORY_URI}' 72 | sh 'docker tag ${AWS_ECR_REPO_NAME} ${REPOSITORY_URI}${AWS_ECR_REPO_NAME}:${BUILD_NUMBER}' 73 | sh 'docker push ${REPOSITORY_URI}${AWS_ECR_REPO_NAME}:${BUILD_NUMBER}' 74 | } 75 | } 76 | } 77 | stage("TRIVY Image Scan") { 78 | steps { 79 | sh 'trivy image ${REPOSITORY_URI}${AWS_ECR_REPO_NAME}:${BUILD_NUMBER} > trivyimage.txt' 80 | } 81 | } 82 | stage('Checkout Code') { 83 | steps { 84 | git branch: 'main', credentialsId: 'Git-cred', url: 'https://github.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project.git' 85 | } 86 | } 87 | stage('Update Deployment file') { 88 | environment { 89 | GIT_REPO_NAME = "End-to-End-Kubernetes-Three-Tier-DevSecOps-Project" 90 | GIT_USER_NAME = "MaryamMairaj123" 91 | } 92 | steps { 93 | dir('Kubernetes-Manifests-file/Frontend') { 94 | withCredentials([string(credentialsId: 'GITHUB', variable: 'Git-cred')]) { 95 | sh ''' 96 | git config user.email "maryammairaj53@gmail.com" 97 | git config user.name "MaryamMairaj123" 98 | BUILD_NUMBER=${BUILD_NUMBER} 99 | echo $BUILD_NUMBER 100 | imageTag=$(grep -oP '(?<=frontend:)[^ ]+' deployment.yaml) 101 | echo $imageTag 102 | sed -i "s/${AWS_ECR_REPO_NAME}:${imageTag}/${AWS_ECR_REPO_NAME}:${BUILD_NUMBER}/" deployment.yaml 103 | git add deployment.yaml 104 | git commit -m "Update deployment Image to version \${BUILD_NUMBER}" 105 | git push https://MaryamMairaj123:@github.com/MaryamMairaj123/End-to-End-Kubernetes-Three-Tier-DevSecOps-Project HEAD:main 106 | 107 | ''' 108 | } 109 | } 110 | } 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /modules/LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Application-Code/backend/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@types/bson": { 8 | "version": "4.0.3", 9 | "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.3.tgz", 10 | "integrity": "sha512-mVRvYnTOZJz3ccpxhr3wgxVmSeiYinW+zlzQz3SXWaJmD1DuL05Jeq7nKw3SnbKmbleW5qrLG5vdyWe/A9sXhw==", 11 | "requires": { 12 | "@types/node": "*" 13 | } 14 | }, 15 | "@types/mongodb": { 16 | "version": "3.6.18", 17 | "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.18.tgz", 18 | "integrity": "sha512-JSVFt9p0rTfZ4EgzXmVHUB3ue00xe3CRbQho8nXfImzEDDM4O7I3po1bwbWl/EIbLENxUreZxqLOc8lvcnLVPA==", 19 | "requires": { 20 | "@types/bson": "*", 21 | "@types/node": "*" 22 | } 23 | }, 24 | "@types/node": { 25 | "version": "15.12.2", 26 | "resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.2.tgz", 27 | "integrity": "sha512-zjQ69G564OCIWIOHSXyQEEDpdpGl+G348RAKY0XXy9Z5kU9Vzv1GMNnkar/ZJ8dzXB3COzD9Mo9NtRZ4xfgUww==" 28 | }, 29 | "accepts": { 30 | "version": "1.3.7", 31 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", 32 | "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", 33 | "requires": { 34 | "mime-types": "~2.1.24", 35 | "negotiator": "0.6.2" 36 | } 37 | }, 38 | "array-flatten": { 39 | "version": "1.1.1", 40 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 41 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 42 | }, 43 | "bl": { 44 | "version": "2.2.1", 45 | "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", 46 | "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", 47 | "requires": { 48 | "readable-stream": "^2.3.5", 49 | "safe-buffer": "^5.1.1" 50 | } 51 | }, 52 | "bluebird": { 53 | "version": "3.5.1", 54 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", 55 | "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" 56 | }, 57 | "body-parser": { 58 | "version": "1.19.0", 59 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", 60 | "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", 61 | "requires": { 62 | "bytes": "3.1.0", 63 | "content-type": "~1.0.4", 64 | "debug": "2.6.9", 65 | "depd": "~1.1.2", 66 | "http-errors": "1.7.2", 67 | "iconv-lite": "0.4.24", 68 | "on-finished": "~2.3.0", 69 | "qs": "6.7.0", 70 | "raw-body": "2.4.0", 71 | "type-is": "~1.6.17" 72 | } 73 | }, 74 | "bson": { 75 | "version": "1.1.6", 76 | "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", 77 | "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==" 78 | }, 79 | "bytes": { 80 | "version": "3.1.0", 81 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", 82 | "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" 83 | }, 84 | "content-disposition": { 85 | "version": "0.5.3", 86 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", 87 | "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", 88 | "requires": { 89 | "safe-buffer": "5.1.2" 90 | } 91 | }, 92 | "content-type": { 93 | "version": "1.0.4", 94 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 95 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 96 | }, 97 | "cookie": { 98 | "version": "0.4.0", 99 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", 100 | "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" 101 | }, 102 | "cookie-signature": { 103 | "version": "1.0.6", 104 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 105 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 106 | }, 107 | "core-util-is": { 108 | "version": "1.0.2", 109 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 110 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 111 | }, 112 | "cors": { 113 | "version": "2.8.5", 114 | "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", 115 | "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", 116 | "requires": { 117 | "object-assign": "^4", 118 | "vary": "^1" 119 | } 120 | }, 121 | "debug": { 122 | "version": "2.6.9", 123 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 124 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 125 | "requires": { 126 | "ms": "2.0.0" 127 | } 128 | }, 129 | "denque": { 130 | "version": "1.5.0", 131 | "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.0.tgz", 132 | "integrity": "sha512-CYiCSgIF1p6EUByQPlGkKnP1M9g0ZV3qMIrqMqZqdwazygIA/YP2vrbcyl1h/WppKJTdl1F85cXIle+394iDAQ==" 133 | }, 134 | "depd": { 135 | "version": "1.1.2", 136 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 137 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 138 | }, 139 | "destroy": { 140 | "version": "1.0.4", 141 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 142 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 143 | }, 144 | "ee-first": { 145 | "version": "1.1.1", 146 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 147 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 148 | }, 149 | "encodeurl": { 150 | "version": "1.0.2", 151 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 152 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 153 | }, 154 | "escape-html": { 155 | "version": "1.0.3", 156 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 157 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 158 | }, 159 | "etag": { 160 | "version": "1.8.1", 161 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 162 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 163 | }, 164 | "express": { 165 | "version": "4.17.1", 166 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", 167 | "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", 168 | "requires": { 169 | "accepts": "~1.3.7", 170 | "array-flatten": "1.1.1", 171 | "body-parser": "1.19.0", 172 | "content-disposition": "0.5.3", 173 | "content-type": "~1.0.4", 174 | "cookie": "0.4.0", 175 | "cookie-signature": "1.0.6", 176 | "debug": "2.6.9", 177 | "depd": "~1.1.2", 178 | "encodeurl": "~1.0.2", 179 | "escape-html": "~1.0.3", 180 | "etag": "~1.8.1", 181 | "finalhandler": "~1.1.2", 182 | "fresh": "0.5.2", 183 | "merge-descriptors": "1.0.1", 184 | "methods": "~1.1.2", 185 | "on-finished": "~2.3.0", 186 | "parseurl": "~1.3.3", 187 | "path-to-regexp": "0.1.7", 188 | "proxy-addr": "~2.0.5", 189 | "qs": "6.7.0", 190 | "range-parser": "~1.2.1", 191 | "safe-buffer": "5.1.2", 192 | "send": "0.17.1", 193 | "serve-static": "1.14.1", 194 | "setprototypeof": "1.1.1", 195 | "statuses": "~1.5.0", 196 | "type-is": "~1.6.18", 197 | "utils-merge": "1.0.1", 198 | "vary": "~1.1.2" 199 | } 200 | }, 201 | "finalhandler": { 202 | "version": "1.1.2", 203 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", 204 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", 205 | "requires": { 206 | "debug": "2.6.9", 207 | "encodeurl": "~1.0.2", 208 | "escape-html": "~1.0.3", 209 | "on-finished": "~2.3.0", 210 | "parseurl": "~1.3.3", 211 | "statuses": "~1.5.0", 212 | "unpipe": "~1.0.0" 213 | } 214 | }, 215 | "forwarded": { 216 | "version": "0.2.0", 217 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", 218 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==" 219 | }, 220 | "fresh": { 221 | "version": "0.5.2", 222 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 223 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 224 | }, 225 | "http-errors": { 226 | "version": "1.7.2", 227 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", 228 | "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", 229 | "requires": { 230 | "depd": "~1.1.2", 231 | "inherits": "2.0.3", 232 | "setprototypeof": "1.1.1", 233 | "statuses": ">= 1.5.0 < 2", 234 | "toidentifier": "1.0.0" 235 | } 236 | }, 237 | "iconv-lite": { 238 | "version": "0.4.24", 239 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 240 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 241 | "requires": { 242 | "safer-buffer": ">= 2.1.2 < 3" 243 | } 244 | }, 245 | "inherits": { 246 | "version": "2.0.3", 247 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 248 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 249 | }, 250 | "ipaddr.js": { 251 | "version": "1.9.1", 252 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", 253 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==" 254 | }, 255 | "isarray": { 256 | "version": "1.0.0", 257 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 258 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 259 | }, 260 | "kareem": { 261 | "version": "2.3.2", 262 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz", 263 | "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ==" 264 | }, 265 | "media-typer": { 266 | "version": "0.3.0", 267 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 268 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 269 | }, 270 | "memory-pager": { 271 | "version": "1.5.0", 272 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", 273 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", 274 | "optional": true 275 | }, 276 | "merge-descriptors": { 277 | "version": "1.0.1", 278 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 279 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 280 | }, 281 | "methods": { 282 | "version": "1.1.2", 283 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 284 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 285 | }, 286 | "mime": { 287 | "version": "1.6.0", 288 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 289 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 290 | }, 291 | "mime-db": { 292 | "version": "1.48.0", 293 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", 294 | "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==" 295 | }, 296 | "mime-types": { 297 | "version": "2.1.31", 298 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", 299 | "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", 300 | "requires": { 301 | "mime-db": "1.48.0" 302 | } 303 | }, 304 | "mongodb": { 305 | "version": "3.6.8", 306 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.8.tgz", 307 | "integrity": "sha512-sDjJvI73WjON1vapcbyBD3Ao9/VN3TKYY8/QX9EPbs22KaCSrQ5rXo5ZZd44tWJ3wl3FlnrFZ+KyUtNH6+1ZPQ==", 308 | "requires": { 309 | "bl": "^2.2.1", 310 | "bson": "^1.1.4", 311 | "denque": "^1.4.1", 312 | "optional-require": "^1.0.3", 313 | "safe-buffer": "^5.1.2", 314 | "saslprep": "^1.0.0" 315 | } 316 | }, 317 | "mongoose": { 318 | "version": "5.12.14", 319 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.12.14.tgz", 320 | "integrity": "sha512-1lMRY8cfGYFWHqe5DLnVgNQDyD0fEbSoWIQe9Mllt/ZtayZ5XUFQt+o5VKrB44vsT5cLNzgwEFO0NvwTwqLluQ==", 321 | "requires": { 322 | "@types/mongodb": "^3.5.27", 323 | "bson": "^1.1.4", 324 | "kareem": "2.3.2", 325 | "mongodb": "3.6.8", 326 | "mongoose-legacy-pluralize": "1.0.2", 327 | "mpath": "0.8.3", 328 | "mquery": "3.2.5", 329 | "ms": "2.1.2", 330 | "regexp-clone": "1.0.0", 331 | "safe-buffer": "5.2.1", 332 | "sift": "13.5.2", 333 | "sliced": "1.0.1" 334 | }, 335 | "dependencies": { 336 | "ms": { 337 | "version": "2.1.2", 338 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 339 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 340 | }, 341 | "safe-buffer": { 342 | "version": "5.2.1", 343 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", 344 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" 345 | } 346 | } 347 | }, 348 | "mongoose-legacy-pluralize": { 349 | "version": "1.0.2", 350 | "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", 351 | "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" 352 | }, 353 | "mpath": { 354 | "version": "0.8.3", 355 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.3.tgz", 356 | "integrity": "sha512-eb9rRvhDltXVNL6Fxd2zM9D4vKBxjVVQNLNijlj7uoXUy19zNDsIif5zR+pWmPCWNKwAtqyo4JveQm4nfD5+eA==" 357 | }, 358 | "mquery": { 359 | "version": "3.2.5", 360 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz", 361 | "integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==", 362 | "requires": { 363 | "bluebird": "3.5.1", 364 | "debug": "3.1.0", 365 | "regexp-clone": "^1.0.0", 366 | "safe-buffer": "5.1.2", 367 | "sliced": "1.0.1" 368 | }, 369 | "dependencies": { 370 | "debug": { 371 | "version": "3.1.0", 372 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 373 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 374 | "requires": { 375 | "ms": "2.0.0" 376 | } 377 | } 378 | } 379 | }, 380 | "ms": { 381 | "version": "2.0.0", 382 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 383 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 384 | }, 385 | "negotiator": { 386 | "version": "0.6.2", 387 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", 388 | "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" 389 | }, 390 | "object-assign": { 391 | "version": "4.1.1", 392 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", 393 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" 394 | }, 395 | "on-finished": { 396 | "version": "2.3.0", 397 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 398 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 399 | "requires": { 400 | "ee-first": "1.1.1" 401 | } 402 | }, 403 | "optional-require": { 404 | "version": "1.0.3", 405 | "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz", 406 | "integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA==" 407 | }, 408 | "parseurl": { 409 | "version": "1.3.3", 410 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", 411 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" 412 | }, 413 | "path-to-regexp": { 414 | "version": "0.1.7", 415 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 416 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 417 | }, 418 | "process-nextick-args": { 419 | "version": "2.0.1", 420 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", 421 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" 422 | }, 423 | "proxy-addr": { 424 | "version": "2.0.7", 425 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", 426 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", 427 | "requires": { 428 | "forwarded": "0.2.0", 429 | "ipaddr.js": "1.9.1" 430 | } 431 | }, 432 | "qs": { 433 | "version": "6.7.0", 434 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", 435 | "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" 436 | }, 437 | "range-parser": { 438 | "version": "1.2.1", 439 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", 440 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" 441 | }, 442 | "raw-body": { 443 | "version": "2.4.0", 444 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", 445 | "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", 446 | "requires": { 447 | "bytes": "3.1.0", 448 | "http-errors": "1.7.2", 449 | "iconv-lite": "0.4.24", 450 | "unpipe": "1.0.0" 451 | } 452 | }, 453 | "readable-stream": { 454 | "version": "2.3.7", 455 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", 456 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", 457 | "requires": { 458 | "core-util-is": "~1.0.0", 459 | "inherits": "~2.0.3", 460 | "isarray": "~1.0.0", 461 | "process-nextick-args": "~2.0.0", 462 | "safe-buffer": "~5.1.1", 463 | "string_decoder": "~1.1.1", 464 | "util-deprecate": "~1.0.1" 465 | } 466 | }, 467 | "regexp-clone": { 468 | "version": "1.0.0", 469 | "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz", 470 | "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==" 471 | }, 472 | "safe-buffer": { 473 | "version": "5.1.2", 474 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 475 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" 476 | }, 477 | "safer-buffer": { 478 | "version": "2.1.2", 479 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 480 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" 481 | }, 482 | "saslprep": { 483 | "version": "1.0.3", 484 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", 485 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", 486 | "optional": true, 487 | "requires": { 488 | "sparse-bitfield": "^3.0.3" 489 | } 490 | }, 491 | "send": { 492 | "version": "0.17.1", 493 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", 494 | "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", 495 | "requires": { 496 | "debug": "2.6.9", 497 | "depd": "~1.1.2", 498 | "destroy": "~1.0.4", 499 | "encodeurl": "~1.0.2", 500 | "escape-html": "~1.0.3", 501 | "etag": "~1.8.1", 502 | "fresh": "0.5.2", 503 | "http-errors": "~1.7.2", 504 | "mime": "1.6.0", 505 | "ms": "2.1.1", 506 | "on-finished": "~2.3.0", 507 | "range-parser": "~1.2.1", 508 | "statuses": "~1.5.0" 509 | }, 510 | "dependencies": { 511 | "ms": { 512 | "version": "2.1.1", 513 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 514 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 515 | } 516 | } 517 | }, 518 | "serve-static": { 519 | "version": "1.14.1", 520 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", 521 | "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", 522 | "requires": { 523 | "encodeurl": "~1.0.2", 524 | "escape-html": "~1.0.3", 525 | "parseurl": "~1.3.3", 526 | "send": "0.17.1" 527 | } 528 | }, 529 | "setprototypeof": { 530 | "version": "1.1.1", 531 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", 532 | "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" 533 | }, 534 | "sift": { 535 | "version": "13.5.2", 536 | "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz", 537 | "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA==" 538 | }, 539 | "sliced": { 540 | "version": "1.0.1", 541 | "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", 542 | "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" 543 | }, 544 | "sparse-bitfield": { 545 | "version": "3.0.3", 546 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", 547 | "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", 548 | "optional": true, 549 | "requires": { 550 | "memory-pager": "^1.0.2" 551 | } 552 | }, 553 | "statuses": { 554 | "version": "1.5.0", 555 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", 556 | "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" 557 | }, 558 | "string_decoder": { 559 | "version": "1.1.1", 560 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", 561 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", 562 | "requires": { 563 | "safe-buffer": "~5.1.0" 564 | } 565 | }, 566 | "toidentifier": { 567 | "version": "1.0.0", 568 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", 569 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" 570 | }, 571 | "type-is": { 572 | "version": "1.6.18", 573 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", 574 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", 575 | "requires": { 576 | "media-typer": "0.3.0", 577 | "mime-types": "~2.1.24" 578 | } 579 | }, 580 | "unpipe": { 581 | "version": "1.0.0", 582 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 583 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 584 | }, 585 | "util-deprecate": { 586 | "version": "1.0.2", 587 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 588 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 589 | }, 590 | "utils-merge": { 591 | "version": "1.0.1", 592 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", 593 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" 594 | }, 595 | "vary": { 596 | "version": "1.1.2", 597 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 598 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 599 | } 600 | } 601 | } 602 | --------------------------------------------------------------------------------