This is the UI for Kodo Kojo project
kodokojo-ui
is a licensed under GNU General Public License v3.
You want to contribute? You are very welcome!
Chat with us on Gitter.
Please read following commit message policy and contributing policy.
- NodeJS (see package.json file for version).
- Consider using nvm to switch node version in development easily.
- Docker 1.8 or newer.
- A working build of kodokojo project.
The UI is tested on Firefox and Chrome
Firefox |
Chrome |
---|---|
last version | last version |
thanks to @godban for the badge generator |
You have to set some environment variables.
For Mac users with Docker Toolbox, setup DOCKER_HOST environment variable:
$ eval $(docker-machine env default) // mount docker env variables
For Windows users, you may do something like (not sure of the command, please PR if it is not correct):
> docker-machine env
First install npm packages, build development files into static/, start webpack dev server on localhost:3000.
$ NODE_ENV=development npm install
$ npm run start:dev
Then open ui project in browser.
$ open http://localhost:3000
If you want to test production build
$ npm run start:prod
Then open ui project in browser.
$ open http://localhost:3000
You can use API_PROTOCOL_ENV
and API_HOST_ENV
to use an external Kodo Kojo backend api dns.
$ export API_PROTOCOL_ENV=https://
$ export API_HOST_ENV=kodokojo.mydomaine.com
$ npm run start:custom
Then open ui project in browser.
$ open http://localhost:3000
Like custom environment (see above) but with production build:
$ npm run start:local
Then open ui project in browser.
$ open http://localhost:3000
To connect the frontend to mocked backend (just HTTP, not websocket for now). We use kodokojo-mocks for this. Configurations are in mocks/
folder.
First start mock server in a terminal:
$ npm run start:server:mock
Then start kodokojo-uiin an other terminal:
$ npm run start:mock
Finally, open ui project in browser.
$ open http://localhost:3000
Except with custom and mock configurations, you will need to run Kodo Kojo backend to be able to test and develop locally.
To start the cluster locally, you have to go to kodokojo/kodokojo folder and start docker-compose:
$ docker-compose -f src/test/resources/docker/full/docker-compose.yml up -d
Then to start cluster located to an AWS, you have to go to kodokojo/kodokojo folder and start docker-compose (please be sure your docker-compose file is properly configured):
$ docker-compose -f src/test/resources/docker/aws/docker-compose.yml up -d
Please refers to proper documentation for explanation details.
Build production docker image of the front release.
Note: works on OSX and Linux. For Windows users you have to run the build.sh script manually.
$ npm run build:docker
It build the project, then put static/ content into /delivery/target/kodokojo-ui-<version>.tar.gz and finally build the docker image with Nginx server (kodokojo/kodokojo-ui).
Build and run styleguide.
$ npm run styleguide
Then open your browser.
$ open http://localhost:9001
$ npm run license
Run tests.
$ npm test
Run tests in watch mode.
$ npm run test:watch
Run coverage.
$ npm run coverage
$ open ./coverage/lcov-report/index.html
❤️ Thanks to all Open source projects which made such project possible!