Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #509 from egovernments/pgr-develop
Browse files Browse the repository at this point in the history
Pgr develop
  • Loading branch information
rahuldevgarg authored Aug 29, 2023
2 parents 5840214 + 6d60af6 commit 8e4b3b5
Show file tree
Hide file tree
Showing 1,814 changed files with 182,603 additions and 6 deletions.
17 changes: 11 additions & 6 deletions build/build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ config:
image-name: "egov-pg-service"
dockerfile: "build/maven/Dockerfile"
- work-dir: "core-services/egov-pg-service/src/main/resources/db"
image-name: "egov-pg-service-db"
image-name: "egov-pg-service-db"
- name: "builds/mGramSeva/municipal-services/ws-calculator"
build:
- work-dir: "municipal-services/ws-calculator"
Expand Down Expand Up @@ -71,29 +71,34 @@ config:
build:
- work-dir: "business-services/billing-service"
image-name: "billing-service"
dockerfile: "build/maven/Dockerfile"
dockerfile: "build/maven/Dockerfile"
- work-dir: "business-services/billing-service/src/main/resources/db"
image-name: "billing-service-db"
image-name: "billing-service-db"
- name: "builds/mGramSeva/frontend/frontend-mgramseva"
build:
- work-dir: "frontend/mgramseva"
image-name: "frontend-mgramseva"
dockerfile: "frontend/mgramseva/docker/Dockerfile"
- name: "builds/mGramSeva/frontend/mgramseva-digit-ui"
build:
- work-dir: "frontend/micro-ui"
image-name: "mgramseva-digit-ui"
dockerfile: "frontend/micro-ui/web/docker/Dockerfile"
- name: "builds/mGramSeva/core-services/user-otp"
build:
- work-dir: "core-services/user-otp"
image-name: "user-otp"
dockerfile: "build/maven/Dockerfile"
dockerfile: "build/maven/Dockerfile"
- name: "builds/mGramSeva/core-services/egov-notification-sms"
build:
- work-dir: "core-services/egov-notification-sms"
image-name: "egov-notification-sms"
dockerfile: "build/maven/Dockerfile"
dockerfile: "build/maven/Dockerfile"
- name: "builds/mGramSeva/utilities/mdms-read-cronjob"
build:
- work-dir: "utilities/mdms-read-cronjob"
image-name: "api-cronjob"
dockerfile: "utilities/mdms-read-cronjob/Dockerfile"
dockerfile: "utilities/mdms-read-cronjob/Dockerfile"
- name: "builds/mGramSeva/municipal-services/egov-user-event"
build:
- work-dir: "municipal-services/egov-user-event"
Expand Down
33 changes: 33 additions & 0 deletions frontend/micro-ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

web/digit-ui-internals
.env
.eslintcache

# yarn $
.yarn
yarn.lock
.yarnrc.yml

# dependencies
node_modules
.yarn
/.pnp
.pnp.js

# testing
/coverage

# production
/web/build
dist
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions frontend/micro-ui/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @jagankumar-egov @saurabh-egov @sathishp-eGov
33 changes: 33 additions & 0 deletions frontend/micro-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Digit UI
DIGIT (Digital Infrastructure for Governance, Impact & Transformation) is India's largest platform for governance services. Visit https://www.digit.org for more details.

This repository contains source code for web implementation of the new Digit UI modules with dependencies and libraries.

#### Starting local server
1. To run server locally first change directory to **web** subdirectory
1. In the project run **yarn install** to install node modules and dependencies
1. Run **yarn start** to start the local server

#### Updating modules
To update the modules run *install-dep.sh* script this will pull all the updates from *micro-ui-internals* subfolder

#### Reference Docs

###### Module wise reference docs
Module | Reference Docs
------ | --------------
PGR | https://digit-discuss.atlassian.net/wiki/spaces/EPE/pages/1285587062/PGR+UI+Implementation+-+Guidelines+FAQs
FSM | https://digit-discuss.atlassian.net/wiki/spaces/EPE/pages/1290567710/FSM+UI+Implementation+-+Guidelines+FAQs
DIGIT Services | https://digit-discuss.atlassian.net/wiki/spaces/DD/pages/647364616/DIGIT+Services

###### Dependencies and their references
1. https://www.npmjs.com/package/react-query
2. https://react-redux.js.org/
3. https://react-hook-form.com/
4. https://www.npmjs.com/package/react-table
5. https://www.npmjs.com/package/react-time-picker
6. https://reactrouter.com/web/guides/quick-start
7. https://recharts.org/

#### License
These reference apps are released under MIT
4 changes: 4 additions & 0 deletions frontend/micro-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "digit-ui",
"version": "1.7.0-beta.1"
}
5 changes: 5 additions & 0 deletions frontend/micro-ui/web/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": [
"@babel/preset-env","@babel/preset-react"
]
}
2 changes: 2 additions & 0 deletions frontend/micro-ui/web/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
REACT_APP_STATE_LEVEL_TENANT_ID=pb
REACT_APP_PROXY_URL=https://qa.digit.org
14 changes: 14 additions & 0 deletions frontend/micro-ui/web/brunch-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
exports.files = {
javascripts: {
joinTo: {
'vendor.js': /^(?!app)/,
'App.js': /^app/
}
},
stylesheets: {joinTo: 'app.css'}
};

exports.plugins = {
babel: {presets: ['latest', 'react']},
postcss: {processors: [require('autoprefixer')]}
};
28 changes: 28 additions & 0 deletions frontend/micro-ui/web/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM egovio/alpine-node-builder-14:yarn AS build
#FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build
RUN apk update && apk upgrade
RUN apk add --no-cache git>2.30.0
ARG WORK_DIR
WORKDIR /app
ENV NODE_OPTIONS "--max-old-space-size=4096"
ENV GENERATE_SOURCEMAP "false"

COPY ${WORK_DIR} .
RUN ls -lah

#RUN node web/envs.js
RUN cd web/ \
&& node envs.js \
&& node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' \
&& ./install-deps.sh \
&& yarn install \
&& yarn build

FROM nginx:mainline-alpine
#FROM ghcr.io/egovernments/nginx:mainline-alpine
ENV WORK_DIR=/var/web/digit-ui

RUN mkdir -p ${WORK_DIR}

COPY --from=build /app/web/build ${WORK_DIR}/
COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf
26 changes: 26 additions & 0 deletions frontend/micro-ui/web/docker/devDockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#FROM egovio/alpine-node-builder-14:yarn AS build
FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build
RUN apk update && apk upgrade
RUN apk add --no-cache git>2.30.0
ARG WORK_DIR
WORKDIR /app
ENV NODE_OPTIONS "--max-old-space-size=1792"

COPY ${WORK_DIR} .
RUN ls -lah

#RUN node web/envs.js
RUN cd web/ \
&& node envs.js \
&& ./install-deps.sh \
&& yarn install \
&& yarn build

#FROM nginx:mainline-alpine
FROM ghcr.io/egovernments/nginx:mainline-alpine
ENV WORK_DIR=/var/web/digit-ui

RUN mkdir -p ${WORK_DIR}

COPY --from=build /app/web/build ${WORK_DIR}/
COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf
25 changes: 25 additions & 0 deletions frontend/micro-ui/web/docker/masDockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#FROM egovio/alpine-node-builder-14:yarn AS build
FROM ghcr.io/egovernments/alpine-node-builder-14:yarn AS build
RUN apk update && apk upgrade
RUN apk add --no-cache git>2.30.0
ARG WORK_DIR
WORKDIR /app
ENV NODE_OPTIONS "--max-old-space-size=3792"

COPY ${WORK_DIR} .
RUN ls -lah

#RUN node web/envs.js
RUN cd web/ \
&& node envs.js \
&& yarn install \
&& yarn build

#FROM nginx:mainline-alpine
FROM ghcr.io/egovernments/nginx:mainline-alpine
ENV WORK_DIR=/var/web/digit-ui

RUN mkdir -p ${WORK_DIR}

COPY --from=build /app/web/build ${WORK_DIR}/
COPY --from=build /app/web/docker/nginx.conf /etc/nginx/conf.d/default.conf
12 changes: 12 additions & 0 deletions frontend/micro-ui/web/docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
server
{
listen 80;
underscores_in_headers on;

location /digit-ui
{
root /var/web;
index index.html index.htm;
try_files $uri $uri/ /digit-ui/index.html;
}
}
Empty file added frontend/micro-ui/web/envs.js
Empty file.
13 changes: 13 additions & 0 deletions frontend/micro-ui/web/install-deps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

BRANCH="$(git branch --show-current)"

INTERNALS="micro-ui-internals"

cd $INTERNALS && echo "installing packages" && yarn install && echo "starting build" && yarn build && echo "building finished" && find . -name "node_modules" -type d -prune -print -exec rm -rf '{}' \;
cd ..

rm -rf node_modules
rm -f yarn.lock

# yarn install
Loading

0 comments on commit 8e4b3b5

Please sign in to comment.