Code Monkey home page Code Monkey logo

kodokojo-ui's Introduction

Kodo Kojo UI

This is the UI for Kodo Kojo project

Join the chat at https://gitter.im/kodokojo/kodokojo

Open Source Love

node npm

Dependency Status

License

kodokojo-ui is a licensed under GNU General Public License v3.

Contribute

You want to contribute? You are very welcome!
Chat with us on Gitter.
Please read following commit message policy and contributing policy.

Prerequisite

  • 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.

Browser support

The UI is tested on Firefox and Chrome

Firefox
Firefox
Chrome
Chrome
last version last version
thanks to @godban for the badge generator

Configuration

Development

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

Installation

First install npm packages, build development files into static/, start webpack dev server on localhost:3000.

$ NODE_ENV=development npm install

Start Frontend

Development

$ npm run start:dev

Then open ui project in browser.

$ open http://localhost:3000

Local "production"

If you want to test production build

$ npm run start:prod

Then open ui project in browser.

$ open http://localhost:3000

Custom remote API configuration

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

Custom production

Like custom environment (see above) but with production build:

$ npm run start:local

Then open ui project in browser.

$ open http://localhost:3000

Mocked API

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

Start Backend

Except with custom and mock configurations, you will need to run Kodo Kojo backend to be able to test and develop locally.

Local cluster mode

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
AWS cluster mode

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 release

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).

Run styleguide

Build and run styleguide.

$ npm run styleguide

Then open your browser.

$ open http://localhost:9001

Add license in source files headers

$ npm run license

Tests

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!

kodokojo-ui's People

Contributors

huljo avatar jpthiery avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.