This is the front-end of the ALRD research statistics output project. The project was built in React
with UI framework Material-UI
, click on This Link to inspect the official document of Material-UI
Here is the project structure tree:
.
└── src
├── components
│ ├── CollaborationCountry
│ │ ├── CollaborationCountry.tsx
│ │ └── ...
│ ├── Keywords
│ │ └── Keywords.tsx
│ ├── Latest
│ │ ├── LatestPublications.tsx
│ │ └── ...
│ ├── Overview
│ │ ├── Overview.tsx
│ │ └── ...
│ └── Statistics
│ └── Statistics.tsx
├── interfaces
│ └── IData.ts
├── service
│ └── api.js
├── statics
└── App.tsx
Inside each component, the data was retrieved asynchronously from the local hosted REST API service. Check the IData.ts
file to view the data structure.
In this component the program generates a latest publication list which contains 5 latest publications ordered by the publish date. Each list item has the same height. Hover the list item to view the complete title of publications.
LatestPublications
contains a basic card holder and generates LatestListItem
dynamically.
This directory contains 4 different sub-components. Overview
is the card holder, OverviewMeta
is the combination of OverviewTag
and it forms the upper part of the Overview
card. OverviewChart
is the bar graph placed in the lower part of the Overview
card.
This directory contains 2 sub-components. CollaborationCountry
is the card holder and GeographicChart
is the actual graph displayed in this card.
Both graphs are generated by the react-google-charts
which is based on the google chart
. Click Here to view the documentation of this library.
This directory contains a single Keywords
component with the same name as the directory. It uses react-wordcloud
to generate the word cloud and display it on the card. Click Here to view the documentation.
This directory also contains a single same-name component Statistics
which crates a table to display top 10 sources and content type summary.
Once you modified the code, you need to run npm run build
to rebuild the application. Furthermore, as the default build will include the sourcemap (.map
files) which allows anyone to view the source code from the browser devtools. If you wish to hide your source code, run rm build/static/**/*.map
to delete sourcemap files.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
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.
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.
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.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.