Skip to content

NiccoMlt/protelis-web-frontend

Repository files navigation

Protelis on the Web - React frontend

Build Status Codacy Badge codecov Commitizen friendly

Web frontend for Protelis Web backend, deployed by default at https://protelis-web-frontend.now.sh.

Project details

This is a Typescript project built with Yarn and create-react-app scripts and can be imported as a VS Code or WebStorm project.

Available Scripts

In the project directory, you can run:

yarn start

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.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

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.

Gradle

If you are a die-hard Gradle lover, this project was also wrapped with Gradle. You can run:

  • gradle reactBuild to execute yarn build
  • gradle jest to execute yarn test with CI configuration

Code quality & CI

Type checking Typescript Version

The frontend project is completely developed in TypeScript, so transpiled Javascript code should be statically type-checked on compile-time.

TypeScript was chosen instead of Flow for better third-party support and personal preference.

Code style Code Style

Basic code style configuration (max line length, indent style and size, ...) on frontend project are handled by EditorConfig directly on the editor.

Advanced code style checks are done with ESLint: the tool checks code compliance to an Airbnb React/Javascript code style adaptation for TypeScript.

ESLint was chosen instead of TSLint because of the deprecation announcement for the latter (see issue #4534).

Continuous integration

The project is built and checked by Travis CI with latest LTS NodeJS version on Ubuntu Bionic.

Continuous deployment

The project is deployed on Zeit Now automatically via GitHub Apps hooks. It can be manually deployed with now or now --prod commands.

License and credits License: GPL v3

As stated in LICENSE file, this code is provided under GPLv3 license.

This repository is born after a split of the Protelis-Web monorepo (see issue NiccoMlt/Protelis-Web#10). Git history was kept rebasing the result of a filter-branch on src/main/frontend folder of the develop branch.

The original code was bootstrapped from my personal adaptation of official Single Page Application development with React and Vert.x tutorial, which are both provided under Apache License 2.0.