Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev to UAT #4

Merged
merged 13 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
22 changes: 22 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// .eslintignore
build/*
dist/*
public/*
**/out/*
**/node_modules/*

**/.next/*
next.config.js

vite.config.js
vite.config.ts

src/reportWebVitals.js
src/service-worker.js
src/serviceWorkerRegistration.js
src/setupTests.js

src/reportWebVitals.ts
src/service-worker.ts
src/serviceWorkerRegistration.ts
src/setupTests.ts
165 changes: 165 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
{
"root": true,
"env": {
"browser": true,
"es2021": true
},
"plugins": [
"perfectionist",
"unused-imports",
"@typescript-eslint",
"prettier"
],
"extends": [
"airbnb",
"airbnb-typescript",
"airbnb/hooks",
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"rules": {
"no-alert": 0,
"camelcase": 0,
"no-console": 0,
"no-unused-vars": 0,
"no-param-reassign": 0,
"no-underscore-dangle": 0,
"no-restricted-exports": 0,
"react/no-children-prop": 0,
"react/react-in-jsx-scope": 0,
"jsx-a11y/anchor-is-valid": 0,
"react/no-array-index-key": 0,
"no-promise-executor-return": 0,
"react/require-default-props": 0,
"react/jsx-props-no-spreading": 0,
"import/prefer-default-export": 0,
"react/function-component-definition": 0,
"@typescript-eslint/naming-convention": 0,
"jsx-a11y/control-has-associated-label": 0,
"@typescript-eslint/no-use-before-define": 0,
"react/jsx-no-useless-fragment": [
1,
{
"allowExpressions": true
}
],
"prefer-destructuring": [
1,
{
"object": true,
"array": false
}
],
"react/no-unstable-nested-components": [
1,
{
"allowAsProps": true
}
],
"@typescript-eslint/no-unused-vars": [
1,
{
"args": "none"
}
],
"react/jsx-no-duplicate-props": [
1,
{
"ignoreCase": false
}
],
// unused-imports
// https://www.npmjs.com/package/eslint-plugin-unused-imports
"unused-imports/no-unused-imports": 1,
"unused-imports/no-unused-vars": [
0,
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
// perfectionist
// https://eslint-plugin-perfectionist.azat.io/
"perfectionist/sort-named-imports": [
1,
{
"order": "asc",
"type": "line-length"
}
],
"perfectionist/sort-named-exports": [
1,
{
"order": "asc",
"type": "line-length"
}
],
"perfectionist/sort-exports": [
1,
{
"order": "asc",
"type": "line-length"
}
],
"perfectionist/sort-imports": [
1,
{
"order": "asc",
"type": "line-length",
"newlines-between": "always",
"groups": [
[
"builtin",
"external"
],
"custom-mui",
"custom-routes",
"custom-hooks",
"custom-utils",
"internal",
"custom-components",
"custom-sections",
"custom-types",
[
"parent",
"sibling",
"index"
],
"object",
"unknown"
],
"custom-groups": {
"value": {
"custom-mui": "@mui/**",
"custom-routes": "src/routes/**",
"custom-hooks": "src/hooks/**",
"custom-utils": "src/utils/**",
"custom-components": "src/components/**",
"custom-sections": "src/sections/**",
"custom-types": "src/types/**"
}
},
"internal-pattern": [
"src/**"
]
}
]
}
}
32 changes: 32 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI-CD Pipeline for UAT

on:
push:
branches: [ "UAT", "Dev" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Configure AWS ECR User Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, and push image to Amazon ECR
run: |
docker_tag="${GITHUB_REF_NAME}-${GITHUB_SHA:0:7}"
docker build -t propertycontrol-admin-dashboard .
docker tag propertycontrol-admin-dashboard:latest 281729579533.dkr.ecr.eu-central-1.amazonaws.com/propertycontrol-admin-dashboard:${docker_tag}
docker push 281729579533.dkr.ecr.eu-central-1.amazonaws.com/propertycontrol-admin-dashboard:${docker_tag}

36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# production
.next
.swc
_static
out
dist
build

# environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local

# misc
.DS_Store
.vercel
.netlify
.unimportedrc.json
tsconfig.tsbuildinfo
.vscode

npm-debug.log*
yarn-debug.log*
yarn-error.log*
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build/*
dist/*
public/*
**/out/*
**/.next/*
**/node_modules/*

package-lock.json
yarn.lock
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5",
"tabWidth": 2
}
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Use the official Node.js image from the Docker Hub
FROM node:21-alpine3.17

# Set the working directory inside the container
WORKDIR /app

# Copy the rest of the application files into the container
COPY . .

# Install dependencies
RUN npm install

# Expose the port the Vite server will run on (5173)
EXPOSE 8081 3306

# Specify the command to run when the container starts
CMD ["npm", "run", "dev", "--", "--host"]
44 changes: 44 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="theme-color" content="#000000" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<link rel="manifest" href="/manifest.json" />

<!-- Favicon -->
<link rel="icon" href="/favicon/favicon.ico" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon/favicon-16x16.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon/favicon-32x32.png" />
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png" />

<!-- Google Font -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>

<title>Property Control 360</title>

<meta
name="description"
content="The starting point for your next project with Minimal UI Kit, built on the newest version of Material-UI ©, ready to be customized to your style"
/>
<meta name="keywords" content="react,material,kit,application,dashboard,admin,template" />
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script>
const global = globalThis;
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
Loading