Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit ce08a2e

Browse files
authored
Merge pull request #34 from daita-technologies/develop
✨Release 1.0 `interface`
2 parents a1052d9 + 748a4a6 commit ce08a2e

200 files changed

Lines changed: 13384 additions & 1506 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
NODE_ENV=
2-
REACT_APP_API_URL=
3-
REACT_APP_PROJECT_API_URL=
4-
REACT_APP_INVITE_API_URL=
5-
REACT_APP_S3_BUCKET_NAME=
6-
REACT_APP_S3_REGION=
7-
REACT_APP_RECAPTCHA_SITE_KEY=
1+
NODE_ENV=run-environment
2+
REACT_APP_ENV=development
3+
REACT_APP_AUTH_API_URL=https://abc123.api.your-region.amazonaws.com
4+
REACT_APP_INVITE_API_URL=https://abc123.api.your-region.amazonaws.com
5+
REACT_APP_PROJECT_API_URL=https://abc123.api.your-region.amazonaws.com
6+
REACT_APP_GENERATE_API_URL=https://abc123.api.your-region.amazonaws.com
7+
REACT_APP_HEALTH_CHECK_API_URL=https://abc123.api.your-region.amazonaws.com
8+
REACT_APP_DOWNLOAD_ZIP_API=https://abc123.api.your-region.amazonaws.com
9+
REACT_APP_UPLOAD_ZIP_API=https://abc123.api.your-region.amazonaws.com
10+
REACT_APP_TASK_API_URL=https://abc123.api.your-region.amazonaws.com
11+
REACT_APP_S3_BUCKET_NAME=your-bucket
12+
REACT_APP_S3_REGION=your-region
13+
REACT_APP_RECAPTCHA_SITE_KEY=your-recaptcha-site-key
14+
REACT_APP_API_AMAZON_COGNITO=https://abc123.auth.your-region.amazoncognito.com/oauth2/authorize
15+
REACT_APP_COGNITO_REDIRECT_URI=https://abc123.api.your-region.amazonaws.com/dev/auth/login_social
16+
REACT_APP_COGNITO_CLIENTID=your-cognito-client-id
17+
REACT_APP_API_LOGOUT_SOCIAL=https://auth.com/logout?client_id=123
18+
REACT_APP_GITHUB_IDENTITY_PROVIDER=ProviderName

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
target-branch: "develop"
9+
labels:
10+
- "dependencies"
11+
assignees:
12+
- "locpnh1995"

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
## DD-MM-YYYY
4+
5+
### Added
6+
TBD
7+
8+
### Changed
9+
TBD
10+
11+
### Fixed
12+
TBD

README.md

Lines changed: 121 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,144 @@
1-
# Getting Started with Create React App
1+
# DAITA Platform User Interface
22

3-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
3+
React-based user interface for the DAITA platform.
44

5-
## Available Scripts
5+
## Libraries
66

7-
In the project directory, you can run:
7+
- UI: [MUI](https://mui.com)
8+
- State management: [Redux](https://redux.js.org)
9+
- Redux side effect manager: [Redux-Saga](https://redux-saga.js.org)
10+
- S3 client - AWS SDK for JavaScript v3: [@aws-sdk/client-s3](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/index.html)
11+
- HTTP client: [axios](https://www.npmjs.com/package/axios)
12+
13+
## Folder Structure
14+
15+
```bash
16+
public/
17+
...
18+
src/
19+
components/
20+
[ComponentName]/
21+
.tsx
22+
index.ts
23+
config/
24+
.ts
25+
constants/
26+
.ts
27+
hooks/
28+
.ts
29+
reduxes/
30+
[reducerName]/
31+
action.ts
32+
constants.ts
33+
reducer.ts
34+
selector.ts
35+
type.ts
36+
routes/
37+
[PageName]/
38+
index.tsx
39+
type.ts
40+
index.ts
41+
sagas/
42+
.ts
43+
services/
44+
.ts
45+
styles/
46+
.ts
47+
.css
48+
utils/
49+
.ts
50+
```
51+
52+
Files and directories related to React components should be **PascalCase** to separate words and file extension should be `.tsx` for TypeScript React.
53+
All other files and directories should be **camelCase** to separate words.
54+
55+
**public/**
56+
57+
Contains static files such as `index.html`, JavaScript library files, images, and other assets, etc.
58+
59+
**src/components/**
60+
61+
Contains components that are shared between pages.
862

9-
### `yarn start`
63+
**src/config/**
1064

11-
Runs the app in the development mode.\
12-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
65+
Contains configurations of the app.
1366

14-
The page will reload if you make edits.\
15-
You will also see any lint errors in the console.
67+
**src/contants/**
1668

17-
### `yarn test`
69+
Contains all constants of the app.
1870

19-
Launches the test runner in the interactive watch mode.\
20-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
71+
**src/hooks/**
2172

22-
### `yarn build`
73+
Contains shared React hooks.
2374

24-
Builds the app for production to the `build` folder.\
25-
It correctly bundles React in production mode and optimizes the build for the best performance.
75+
**src/reduxes/**
2676

27-
The build is minified and the filenames include the hashes.\
28-
Your app is ready to be deployed!
77+
Contains redux's reducer of each app feature. Folder name base on feature's name.
2978

30-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
79+
**src/routes/**
3180

32-
### `yarn eject`
81+
Contains pages of the app. Filename base on page's name.
3382

34-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
83+
**src/sagas/**
3584

36-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
85+
Contains saga files of corresponding redux reducer.
3786

38-
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
87+
**src/services/**
3988

40-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
89+
Contains API endpoints.
90+
91+
**src/styles/**
92+
93+
Contains custom styles for general sections.
94+
95+
**src/utils/**
96+
97+
Contains functions shared between the app.
98+
99+
## Installation
100+
101+
It is recommended to install [Yarn](https://classic.yarnpkg.com) through the `npm` package manager, which comes bundled with [Node.js](https://nodejs.org) when you install it on your system. It is recommended to use a Node.js version `>= 16.0.0`.
102+
103+
Once you have `npm` installed, you can run the following both to install and upgrade Yarn:
104+
105+
```bash
106+
npm install --global yarn
107+
```
108+
109+
After having installed Yarn, simply run:
110+
111+
```bash
112+
yarn install
113+
```
114+
115+
## Serving the Application
116+
117+
> You need an `.env` file for successful running. Contact the administrator for more information.
118+
119+
In the project directory, you can run:
120+
121+
```bash
122+
yarn start
123+
```
124+
125+
Runs the app in the development mode. Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
126+
127+
The page will reload if you make edits. You will also see any lint errors in the console.
128+
129+
## Building the Application
130+
131+
In the project directory, you can run:
132+
133+
```bash
134+
yarn build
135+
```
41136

42-
## Learn More
137+
Builds the app for production to the `build` folder. It correctly bundles React in production mode and optimises the build for the best performance.
43138

44-
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
139+
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
45140

46-
To learn React, check out the [React documentation](https://reactjs.org/).
141+
---
47142

48143
## A Note on Releases
49144

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"@mui/material": "^5.0.3",
4141
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
4242
"@mui/styled-engine-sc": "^5.0.3",
43+
"@mui/utils": "^5.6.1",
4344
"@types/crypto-js": "^4.0.2",
4445
"@types/file-saver": "^2.0.4",
4546
"@types/lodash": "^4.14.177",
@@ -52,19 +53,25 @@
5253
"@types/react-virtualized": "^9.21.15",
5354
"axios": "^0.21.1",
5455
"axios-middleware": "^0.3.1",
56+
"chart.js": "^3.7.1",
57+
"chartjs-plugin-datalabels": "^2.0.0",
58+
"chartjs-plugin-zoom": "^1.2.1",
5559
"crypto-js": "^4.1.1",
5660
"file-saver": "^2.0.5",
5761
"history": "^4.10.1",
58-
"jszip": "^3.7.1",
62+
"js-base64": "^3.7.2",
63+
"jszip": "^3.9.1",
5964
"lodash": "^4.17.21",
60-
"moment": "^2.29.1",
65+
"moment": "^2.29.2",
6166
"react": "^17.0.2",
67+
"react-chartjs-2": "^4.1.0",
6268
"react-dom": "^17.0.2",
6369
"react-dropzone": "^11.4.2",
6470
"react-google-recaptcha": "^2.1.0",
6571
"react-helmet": "^6.1.0",
6672
"react-hook-form": "^7.9.0",
6773
"react-infinite-scroll-component": "^6.1.0",
74+
"react-markdown": "^8.0.3",
6875
"react-redux": "^7.2.4",
6976
"react-router-dom": "^5.2.0",
7077
"react-scripts": "4.0.3",
@@ -89,7 +96,8 @@
8996
"prettier": "^2.4.1"
9097
},
9198
"resolutions": {
92-
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
99+
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
100+
"react-error-overlay": "6.0.9"
93101
},
94102
"eslintConfig": {
95103
"extends": [

0 commit comments

Comments
 (0)