{"id":29560907,"url":"https://github.com/decred/politeiagui","last_synced_at":"2025-09-07T11:46:04.875Z","repository":{"id":38051132,"uuid":"103684518","full_name":"decred/politeiagui","owner":"decred","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-02T15:08:03.000Z","size":17794,"stargazers_count":62,"open_issues_count":61,"forks_count":56,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-09-02T17:17:15.307Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/decred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-15T17:37:44.000Z","updated_at":"2025-09-02T15:08:08.000Z","dependencies_parsed_at":"2025-07-18T15:56:06.746Z","dependency_job_id":null,"html_url":"https://github.com/decred/politeiagui","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/decred/politeiagui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decred%2Fpoliteiagui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decred%2Fpoliteiagui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decred%2Fpoliteiagui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decred%2Fpoliteiagui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/decred","download_url":"https://codeload.github.com/decred/politeiagui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/decred%2Fpoliteiagui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274032184,"owners_count":25210784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-18T15:39:19.728Z","updated_at":"2025-09-07T11:46:04.846Z","avatar_url":"https://github.com/decred.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Politeia GUI\n\n[![Build Status](https://github.com/decred/politeiagui/workflows/Build%20and%20Test/badge.svg)](https://github.com/decred/politeiagui/actions)\n\nPoliteiagui is the web frontend used for [Politeia](https://github.com/decred/politeia). Currently,\nthere are two different systems built on top of Politeia and both uses Politeiagui as the web client. They are:\n\n- Decred's [proposal system](https://proposals.decred.org/).\n- Decred's [contractor management system](https://cms.decred.org/) (\"CMS\").\n\n## Requirements\n\nPoliteiagui uses node.js and the yarn package manager.\n\n- [node](https://nodejs.org/en/download/)\n- [yarn](https://yarnpkg.com/en/)\n- [politeiawww](https://github.com/decred/politeia)\n\n  **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.\n\n## Development\n\n1. Clone this repository\n\n   `https://github.com/decred/politeiagui.git`\n\n2. Build and run locally.\n\n   **Against politeiawww**\n\n   To run politeiagui against `politeiawww`, make sure `politeiawww` is running and use the following command:\n\n   - Run the Proposal app: `yarn \u0026\u0026 yarn start`\n   - Run the CMS app: `yarn \u0026\u0026 yarn start:cms`\n\n   **Switching between Proposals and CMS**\n\n   You can have two separate data directories for Proposals and CMS. Use the `--datadir=` flag when starting politeiad and pass a different directory for each app. For example:\n\n   `politeiad --buildcache --datadir=\"~/Library/Application\\ Support/Cms\"`\n\n   Doing this, you don't have to erase and populate your DB again when switching from one app to another.\n\n   **Mock APIs (WARNING: may be out of date)**\n\n   To run politeiagui using mock APIs that do not communicate with `politeiawww` (useful for working on UI changes only), run the following command:\n\n   `yarn \u0026\u0026 yarn uidev`\n\n## Production\n\nTo build politeiagui for production deployment, use the following commands:\n\n- Build the Proposal app: `yarn \u0026\u0026 yarn build`\n- Build the CMS app: `yarn \u0026\u0026 yarn build:cms`\n\nThese commands use [create-react-app](https://create-react-app.dev/) to create\nproduction builds of politeiagui.  See the deployment\n[documentation](https://create-react-app.dev/docs/deployment/) for instructions\non deploying the builds.\n\n## Configuration\n\nPoliteiagui allow customization of settings and features toggling by providing a set of configuration options. The configuration is loaded based on the \"preset name\" which must be\nprovided through an enviroment variable called \"REACT_APP_PRESET\".\n\nThe configs can be found inside `src/apps/\u003cpreset_name\u003e`.\n\nCurrently, two presets are supported, they are:\n\n- politeia: the set of configurations for the Proposals website.\n- cms: the set of configurations for the Contractor Managament System.\n\nThe full table of configuration options is presented below:\n\n| Option               | POLITEIA (default)                | CMS                          | Description                                                                                                      |\n| -------------------- | --------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------- |\n| title                | \"Politeia\"                        | \"Contractor Management\"      | The title to be used for the website                                                                             |\n| logoLight            | \"pi-logo-light.svg\"               | \"cms-logo-light.svg\"         | Indicates what is the name of the light logo file under `src/assets/images`                                      |\n| logoDark             | \"pi-logo-dark.svg\"                | \"cms-logo-dark.svg\"          | Indicates what is the name of the dark logo file under `src/assets/images`                                       |\n| recordType           | \"proposal\"                        | \"invoice\"                    | The main record type name                                                                                        |\n| enableAdminInvite    | false                             | true                         | To enable or not the UI elements required for admin invite                                                       |\n| enableCommentVote    | true                              | false                        | To enable or not the vote on comments                                                                            |\n| paywallContent       | \"paywall-politeia\"                | \"\"                           | Indicates what is the name of the markdown file under `src/assets/copies` to be used for the paywall copy        |\n| privacyPolicyContent | \"privacy-policy\"                  | \"privacy-policy-cms\"         | Indicates what is the name of the markdown file under `src/assets/copies` to be used for the privacy policy copy |\n| navMenuPaths         | see src/apps/politeia/config.json | see src/apps/cms/config.json | Custom menu paths to be shown in the navigation menu dropdown                                                    |\n\n**Important:** Currently it's only possible to use the CMS or the POLITEIA presets fully. If you want to create your own app config, you'll need to modify the code and the API accordingly.\n\n## Testing\n\nPoliteiagui has unit tests for its core logic. To run all unit tests run the command:\n\n    yarn test\n\nTest coverage is currently provided for (`actions/*`), (`lib/*, reducers/*`) and (`selectors/*`).\n\nRelevant libraries/modules used for testing are:\n\n- [Jest](https://facebook.github.io/jest/docs/en/getting-started.html) - Javascript testing\n- [fetch-mock](https://www.wheresrhys.co.uk/fetch-mock/) - Mock http requests\n- [redux-mock-store](https://github.com/dmitry-zaets/redux-mock-store) and [redux-actions-assertions](https://github.com/redux-things/redux-actions-assertions) for testing redux actions.\n\n## E2E tests\n\nPoliteiagui has e2e tests using `cypress` and `react-testing-library/cypress`. Backend should be running when running e2e tests.\n\nBefore running the e2e tests make sure to:\n\n 1. Run `/teste2e/setup-test-users.sh` script to setup the users needed for the tests.\n 2. Enable paywall on backend side.\n\nThere are two ways two run the e2e tests, either in terminal or in browser:\n\n1. To run e2e tests in terminal use: `test:e2e:run`.\n2. To run e2e tests in browser use: `test:e2e:browser`. \n\n## Contributing\n\nWe encourage you to contribute to Politeiagui. Please check [How to contribute to Politeiagui](../master/CONTRIBUTING.md) for guidelines about how to proceed.\n\n## Docker\n\nPoliteiagui can also be hosted in a docker container. To build the the docker container, run the following commands:\n\n```bash\n$ ./bin/build.sh\n```\n\nThen run the container with:\n\n```bash\n$ docker run -d --rm -p \u003clocal port\u003e:80 decred/politeiagui:latest\n```\n\n---\n\nThis project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).\nYou can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecred%2Fpoliteiagui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdecred%2Fpoliteiagui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdecred%2Fpoliteiagui/lists"}