Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into PRO-2207-Admin_Conf…
Browse files Browse the repository at this point in the history
…ig_Changes
  • Loading branch information
vignesha22 committed Feb 29, 2024
2 parents ee14a3a + b380f8e commit 74ff007
Show file tree
Hide file tree
Showing 32 changed files with 1,201 additions and 130 deletions.
109 changes: 78 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,100 @@
name: Build Arka docker image
name: Build Arka Docker image

on:
push:
branches:
- "master"

jobs:
build:
build_frontend:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Login to Docker Hub
uses: docker/login-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout frontend
uses: actions/checkout@v4
- name: Get frontend package version
id: get_frontend_version
run: echo frontend_version=$(node -p "require('./frontend/package.json').version") >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push frontend Docker image
uses: docker/build-push-action@v5
with:
context: ./frontend
file: ./frontend/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/arka-frontend:${{ steps.get_frontend_version.outputs.frontend_version }}
${{ secrets.DOCKERHUB_USERNAME }}/arka-frontend:latest
platforms: linux/amd64,linux/arm64

-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Get Arka backend package version
id: get_version
run: echo version=$(node -p "require('./backend/package.json').version") >> $GITHUB_OUTPUT
-
name: Build and push
uses: docker/build-push-action@v4
build_admin_frontend:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout admin_frontend
uses: actions/checkout@v4
- name: Get admin_frontend package version
id: get_admin_frontend_version
run: echo admin_frontend_version=$(node -p "require('./admin_frontend/package.json').version") >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
context: ./backend
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push admin_frontend Docker image
uses: docker/build-push-action@v5
with:
context: ./admin_frontend
file: ./admin_frontend/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/arka-admin-frontend:${{ steps.get_admin_frontend_version.outputs.admin_frontend_version }}
${{ secrets.DOCKERHUB_USERNAME }}/arka-admin-frontend:latest
platforms: linux/amd64,linux/arm64

build_backend:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout backend
uses: actions/checkout@v4
- name: Get backend package version
id: get_backend_version
run: echo backend_version=$(node -p "require('./backend/package.json').version") >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push backend Docker image
uses: docker/build-push-action@v5
with:
context: ./backend
file: ./backend/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/arka:${{ steps.get_version.outputs.version }}
${{ secrets.DOCKERHUB_USERNAME }}/arka:latest
-
name: Create GitHub release
${{ secrets.DOCKERHUB_USERNAME }}/arka-backend:${{ steps.get_backend_version.outputs.backend_version }}
${{ secrets.DOCKERHUB_USERNAME }}/arka-backend:latest
platforms: linux/amd64,linux/arm64
- name: Create GitHub release
uses: "marvinpinto/action-automatic-releases@6273874b61ebc8c71f1a61b2d98e234cf389b303"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ steps.get_version.outputs.version }}
automatic_release_tag: ${{ steps.get_backend_version.outputs.backend_version }}
prerelease: false
title: Release ${{ steps.get_version.outputs.version }}
-
name: Trigger pipeline
run: ${{ secrets.PIPELINE_TRIGGER }}
title: Arka ${{ steps.get_backend_version.outputs.backend_version }}
- name: Trigger pipeline
run: ${{ secrets.PIPELINE_TRIGGER }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ There is an option to run the code locally without using AWS and only using loca
}
} which also needs to be converted into `base64` value

## API KEY VALIDATION
- In ARKA Admin Frontend, create an API_KEY with the following format -
* Min length - 8 Max length - 20
* contains atleast one Special characters out of these - `@$!%*-_&`
* contains atleast one lowercase alphabet
* contains atleast one uppercase alphabet
* contains atleast one digit 0-9


## 🔙 Arka Backend

Expand Down
42 changes: 21 additions & 21 deletions admin_frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions admin_frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.3",
"@mui/lab": "^5.0.0-alpha.159",
"@mui/material": "^5.15.3",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"buffer": "^6.0.3",
"ethers": "^5.7.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1",
"react-router-dom": "^6.21.1",
"@emotion/react": "11.11.3",
"@emotion/styled": "11.11.0",
"@mui/icons-material": "5.15.3",
"@mui/lab": "5.0.0-alpha.159",
"@mui/material": "5.15.3",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "13.4.0",
"@testing-library/user-event": "13.5.0",
"buffer": "6.0.3",
"ethers": "5.7.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hot-toast": "2.4.1",
"react-router-dom": "6.21.1",
"react-scripts": "5.0.1",
"styled-components": "^6.1.8",
"web-vitals": "^2.1.4"
"styled-components": "6.1.8",
"web-vitals": "2.1.4"
},
"scripts": {
"start": "PORT=3002 react-scripts start",
Expand All @@ -46,9 +46,9 @@
]
},
"devDependencies": {
"autoprefixer": "^10.4.16",
"json-loader": "^0.5.7",
"postcss": "^8.4.33",
"tailwindcss": "^3.4.1"
"autoprefixer": "10.4.16",
"json-loader": "0.5.7",
"postcss": "8.4.33",
"tailwindcss": "3.4.1"
}
}
5 changes: 5 additions & 0 deletions admin_frontend/src/constants/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const ENDPOINTS = {
'getKeys': '/getKeys',
'saveKey' : '/saveKey',
'deleteKey': '/deleteKey',
}
6 changes: 5 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ config.json
database.sqlite

package-lock.json
pnpm-lock.yaml
pnpm-lock.yaml

# Ponder
/indexer/.ponder
/indexer/generated
4 changes: 3 additions & 1 deletion backend/demo.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ API_HOST=127.0.0.1
API_PORT=5050

STACKUP_API_KEY=
SUPPORTED_NETWORKS=
SUPPORTED_NETWORKS=
ADMIN_WALLET_ADDRESS=
DEFAULT_INDEXER_ENDPOINT=http://localhost:3003
3 changes: 3 additions & 0 deletions backend/indexer/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "ponder"
}
21 changes: 21 additions & 0 deletions backend/indexer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Dependencies
/node_modules

# Debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# Misc
.DS_Store

# Env files
.env*.local

# Ponder
/generated/
/.ponder/

package-lock.json

Loading

0 comments on commit 74ff007

Please sign in to comment.