This repository handles the frontend of the web platform Manguru (Github).
It provides a user interface with ReactJS and Redux.
To build and run this app locally, you will to install Node.js
/!\ Important /!\ - Be sure to read the Development rules part before doing any update on the project resources!
Note - To run the tests, please refer to the associated part.
Please ensure that Docker is running on your computer before doing anything.
- Clone the repository
git clone --depth=1 https://github.com/lheydel/manguru-front.git manguru-front
- Install dependencies
cd manguru-front
npm install
- Build and run the project
npm start
When the app is running, you can access it at http://localhost:3000.
Note - In dev mode, the app is refreshing itself each time a typescript source file is updated, so you don't need to restart it over and over.
This part is mainly informative and quickly describes the main tools and technologies used in this project.
As the goal of manguru-front is to provide a smooth web user interface, it uses ReactJS for its high efficiency and adaptability, coupled with Redux to easily manage the global state of the app.
Also, for a better code structure and development efficiency, Typescript is installed and configured for all the parts of the project.
The test runner used in this project is called Jest. It manages unit, integration and end-to-end tests and works well with asynchroneous operations.
The React components are testing via Enzyme wich provides utility functions to render them in a test environment.
To run the tests, use the command line npm test
. It will run jest in watch mode and generate the test coverage stats.
To improve and maintain the global quality of the source code, this project uses a static code analysis tool named Sonarqube, which scan the project and detect code smells and security issues. It also get the test coverage stats from Jest.
This project is configured to trigger a build on Travis CI each time a push is done on this Github repository.
Each Travis build runs the test suite with Jest and scan the project with Sonarqube.
Also, for some branches, it builds a Docker image and push it on a private Docker repository. This image will then be used as part of the deployment of the entire platform.
Here are the rules you must follow if you want to make any code change on this project. Any modification that does not respect those rules will be rejected.
In order to maintain a good overall quality, every update must be supported by relevant tests and have a good evaluation on Sonarqube.
Also, please respect the general structure of the project to avoid any confusion. You can read this to have a better understanding of the React components structure.