-
Make sure your NodeJS and npm versions are up-to-date for
React 16.8.6
-
Install ESLint globally on your machine:
npm install --g eslint
-
Install dependencies:
npm install
- Start the mock backend:
npm run apiMock
-
Start the server:
npm run start
-
Views are on
localhost:3000
- Run tests (jest) with the following command:
npm test
The Chargetrip API is based on a GraphQL structure. GraphQL is a query language for your API and a server-side runtime for executing queries by using a type system you define for your data. We use this API to get the information about the electric cars a user can choose in the profile page.
More information about the API
The API is reached under the following web address: https://api.chargetrip.io/graphql
Authorisation is done by setting an x-client-id as a HTTP header. Once you have an x-client-id from your account manager, you can start using the full API. For our case we used the following test
key: "x-client-id": "5e8c22366f9c5f23ab0eff39"
A Google material design framework. Rules and guidelines to design user-friendly, mature and mobile-first apps. We strongly recommend reading and understanding these design guidelines before designing the user interface.
You should learn the tools used in this project to understand how things work.
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
- https://www.samanthaming.com/tidbits/35-es6-way-to-clone-an-array
Material UI is an implementation of Material Design for React. It has layout components and UI widgets.
You can run the json-server by calling npm run apiMock
. The data is in ../data folder
src/pages
: each page is a main navigation areasrc/components
: general, reusable componentssrc/routes.js
: states the URL routes within the applicationsrc/layouts/mainLayout/navBar/index.js
: states the navigation "burger menu" items
react-seed-project
├── .eslintrc
├── .gitignore
├── .prettierrc
├── jsconfig.json
├── package.json
├── README.md
├── public
└── src
├── apiClient
├── components
├── layouts
├── login
├── mixins
├── mocks
├── pages
│ ├── dashboard
│ ├── errors
│ │ └── notFoundPage.js
├── theme
├── utils
├── webSocket
├── app.js
├── index.js
└── routes.js