Giter Site home page Giter Site logo

politeiagui's Introduction

Politeia GUI

Build Status

Politeiagui is the web frontent for Politiea, Decred's proposal system.

Requirements

Politeiagui uses node.js and the yarn package manager.

  • node

  • yarn

  • politeiawww

    Note: Politeiagui can be run as a standalone application that uses mock APIs to simulate communicaiton with the Politeia backend (useful if you're only doing UI changes). In this case, politeiawww isn't needed. However, be aware that the Mock APIs are not always up-to-date with the latest changes.

Development

  1. Clone this repository

    https://github.com/decred/politeiagui.git

  2. Build and run locally.

    Against politeiawww

    To run politeiagui against politeiawww, make sure politeiawww is running and use the following command:

    yarn && yarn start

    Mock APIs (WARNING: may be out of date)

    To run politeiagui using mock APIs that do not communicate with politeiawww (useful for working on UI changes only), run the following command:

    yarn && yarn uidev

Production

To build politeiagui for production deployment, use the following commands:

yarn && yarn build
ls build

Configuration

Politeiagui allow customization of settings and features toggling from enviroment variables. To make this process easier we use dotenv.

Specify your config options by creating a .env file in the root folder of the project. All variables must be preceded by "REACT_APP" as follow:

/.env:

REACT_APP_TITLE="Politeia"
REACT_APP_STAGING=false

It is also possible to specify a preset to be used:

/.env:

REACT_APP_PRESET="POLITEIA"

If the REACT_APP_PRESET is specified, all other specified options in the env file will be ignored.

Testing

Politeiagui has unit tests for its core logic. To run all unit tests run the command:

yarn test

Test coverage is currently provided for (actions/*), (lib/*, reducers/*) and (selectors/*).

Relevant libraries/modules used for testing are:

Contributing

We encourage you to contribute to Politeiagui. Please check How to contribute to Politeiagui for guidelines about how to proceed.

Docker

Politeiagui can also be hosted in a docker container. To build the the docker container, run the following commands:

$ ./bin/build.sh

Then run the container with:

$ docker run -d --rm -p <local port>:80 decred/politeiagui:latest

This project was bootstrapped with Create React App. You can find the most recent version of this guide here.

politeiagui's People

Contributors

fernandoabolafio avatar tiagoalvesdulce avatar crypto-rizzo avatar sndurkin avatar thi4go avatar go1dfish avatar dajohi avatar victorgcramos avatar oktapodia avatar alexlyp avatar vctt94 avatar rrecuero avatar jholdstock avatar degeri avatar richardred0x avatar marcopeereboom avatar alanl1 avatar igniteeng000 avatar brunobraga95 avatar derekdkim avatar dornelasnelson avatar rgeraldes avatar gozart1 avatar hypernoob avatar lukebp avatar orthomind avatar tnguyen303 avatar

Watchers

James Cloos 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.