-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c94a47
commit 621cfee
Showing
2,599 changed files
with
140,143 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
.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* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @jagankumar-egov @sathishp-eGov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
library 'ci-libs' | ||
|
||
buildPipeline(configFile: './build/build-config.yml') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
|
||
# workbench ui | ||
|
||
A React App built on top of DIGIT UI Core. | ||
|
||
# DIGIT | ||
|
||
DIGIT eGovernance Platform Services | ||
|
||
DIGIT (Digital Infrastructure for Governance, Impact & Transformation) is India's largest platform for governance services. Visit https://core.digit.org/ for more details. | ||
|
||
DIGIT platform is microservices based API platform enabling quick rebundling of services as per specific needs. This is a repo that lays down the core platform on top of which other mission services depend. | ||
|
||
|
||
# DIGIT UI | ||
|
||
|
||
This repository contains source code for web implementation of the new Digit UI modules with dependencies and libraries. | ||
|
||
Workbench module is used to Manage the master data (MDMS V2 Service) used across the DIGIT Services / Applications | ||
|
||
It is also used to manage the Localisation data present in the system (Localisation service) | ||
|
||
|
||
## Run Locally | ||
|
||
Clone the project | ||
|
||
```bash | ||
git clone https://github.com/egovernments/DIGIT-Frontend.git | ||
``` | ||
|
||
Go to the Sub directory to run UI | ||
```bash | ||
cd into micro-ui/web/micro-ui-internals | ||
``` | ||
|
||
Install dependencies | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
Add .env file | ||
```bash | ||
micro-ui/web/micro-ui-internals/example/.env | ||
``` | ||
|
||
Start the server | ||
|
||
```bash | ||
yarn start | ||
``` | ||
|
||
|
||
## Environment Variables | ||
|
||
To run this project, you will need to add the following environment variables to your .env file | ||
|
||
`REACT_APP_PROXY_API` :: `{{server url}}` | ||
|
||
`REACT_APP_GLOBAL` :: `{{server url}}` | ||
|
||
`REACT_APP_PROXY_ASSETS` :: `{{server url}}` | ||
|
||
`REACT_APP_USER_TYPE` :: `{{EMPLOYEE||CITIZEN}}` | ||
|
||
`SKIP_PREFLIGHT_CHECK` :: `true` | ||
|
||
[sample .env file](https://github.com/egovernments/Digit-Core/blob/workbench/frontend/micro-ui/web/micro-ui-internals/example/.env-unifieddev) | ||
|
||
## Tech Stack | ||
|
||
**Libraries:** | ||
|
||
[React](https://react.dev/) | ||
|
||
[React Hook Form](https://www.react-hook-form.com/) | ||
|
||
[React Query](https://tanstack.com/query/v3/) | ||
|
||
[Tailwind CSS](https://tailwindcss.com/) | ||
|
||
[Webpack](https://webpack.js.org/) | ||
|
||
## License | ||
|
||
[MIT](https://choosealicense.com/licenses/mit/) | ||
|
||
|
||
## Author | ||
|
||
- [@jagankumar-egov](https://www.github.com/jagankumar-egov) | ||
|
||
|
||
## Documentation | ||
|
||
[Documentation](https://https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) | ||
|
||
|
||
## Support | ||
|
||
For support, add the issues in https://github.com/egovernments/DIGIT-core/issues. | ||
|
||
|
||
## Modules | ||
|
||
1. Core | ||
2. Workbench | ||
3. HRMS | ||
4. Dashboard | ||
5. Engagement | ||
6. Payment | ||
|
||
## Starting with Digit-UI App (Impelmentation Teams) - MICRO-UI | ||
|
||
|
||
Go to the Sub directory to run UI | ||
|
||
```bash | ||
cd into micro-ui/web | ||
``` | ||
|
||
```bash | ||
yarn install | ||
``` | ||
|
||
Add .env file | ||
```bash | ||
micro-ui/web/.env | ||
``` | ||
|
||
Start the server | ||
|
||
```bash | ||
yarn start | ||
``` | ||
|
||
|
||
![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "workbench-ui", | ||
"version": "1.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env","@babel/preset-react" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SKIP_PREFLIGHT_CHECK=true | ||
REACT_APP_STATE_LEVEL_TENANT_ID=pb | ||
REACT_APP_PROXY_URL=https://works-dev.digit.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import React from "react"; | ||
import { initLibraries } from "@egovernments/digit-ui-libraries"; | ||
import { | ||
paymentConfigs, | ||
PaymentLinks, | ||
PaymentModule, | ||
} from "@egovernments/digit-ui-module-common"; | ||
import { DigitUI } from "@egovernments/digit-ui-module-core"; | ||
import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; | ||
import { initEngagementComponents } from "@egovernments/digit-ui-module-engagement"; | ||
import { initHRMSComponents } from "@egovernments/digit-ui-module-hrms"; | ||
import { initUtilitiesComponents } from "@egovernments/digit-ui-module-utilities"; | ||
import { UICustomizations } from "./Customisations/UICustomizations"; | ||
import { initWorkbenchComponents } from "@egovernments/digit-ui-module-workbench"; | ||
|
||
window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); | ||
|
||
const enabledModules = [ | ||
"DSS", | ||
"NDSS", | ||
"Utilities", | ||
"HRMS", | ||
"Engagement", | ||
"Workbench", | ||
]; | ||
|
||
const moduleReducers = (initData) => ({ | ||
initData, | ||
}); | ||
|
||
const initDigitUI = () => { | ||
window.Digit.ComponentRegistryService.setupRegistry({ | ||
PaymentModule, | ||
...paymentConfigs, | ||
PaymentLinks, | ||
}); | ||
|
||
initDSSComponents(); | ||
initHRMSComponents(); | ||
initEngagementComponents(); | ||
initUtilitiesComponents(); | ||
initWorkbenchComponents(); | ||
|
||
window.Digit.Customizations = { | ||
PGR: {}, | ||
commonUiConfig: UICustomizations, | ||
}; | ||
}; | ||
|
||
initLibraries().then(() => { | ||
initDigitUI(); | ||
}); | ||
|
||
function App() { | ||
window.contextPath = window?.globalConfigs?.getConfig("CONTEXT_PATH"); | ||
const stateCode = | ||
window.globalConfigs?.getConfig("STATE_LEVEL_TENANT_ID") || | ||
process.env.REACT_APP_STATE_LEVEL_TENANT_ID; | ||
if (!stateCode) { | ||
return <h1>stateCode is not defined</h1>; | ||
} | ||
return ( | ||
<DigitUI | ||
stateCode={stateCode} | ||
enabledModules={enabledModules} | ||
moduleReducers={moduleReducers} | ||
// defaultLanding="employee" | ||
/> | ||
); | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
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=4792" | ||
|
||
COPY ${WORK_DIR} . | ||
RUN ls -lah | ||
|
||
#RUN node web/envs.js | ||
RUN cd web/ \ | ||
&& node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))' \ | ||
&& node -e 'console.log("core only")' \ | ||
&& cd core/ \ | ||
&& ./install-deps.sh \ | ||
&& cd ../ \ | ||
&& yarn install \ | ||
&& yarn build:webpack | ||
|
||
FROM nginx:mainline-alpine | ||
#FROM ghcr.io/egovernments/nginx:mainline-alpine | ||
ENV WORK_DIR=/var/web/core-ui | ||
|
||
RUN mkdir -p ${WORK_DIR} | ||
|
||
COPY --from=build /app/web/build ${WORK_DIR}/ | ||
COPY --from=build /app/web/core/nginx.conf /etc/nginx/conf.d/default.conf |
Oops, something went wrong.