All Projects → 5calls → 5calls

5calls / 5calls

Licence: mit
Frontend for the 5calls.org site

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to 5calls

Openciviwiki
Building a Better Democracy for the Internet Age
Stars: ✭ 275 (-25.47%)
Mutual labels:  civic-tech, politics
Nosdeputes.fr
Repository of NosDéputés.fr : the french parliamentary monitoring website
Stars: ✭ 69 (-81.3%)
Mutual labels:  civic-tech, politics
Serenata De Amor
🕵 Artificial Intelligence for social control of public administration
Stars: ✭ 4,367 (+1083.47%)
Mutual labels:  civic-tech, politics
Theyworkforyou
Keeping tabs on the UK's parliaments and assemblies
Stars: ✭ 173 (-53.12%)
Mutual labels:  civic-tech, politics
impeachment-timeline
Timeline of events that lead to the impeachment of Donald J. Trump →
Stars: ✭ 14 (-96.21%)
Mutual labels:  politics, civic-tech
cia
Citizen Intelligence Agency, open-source intelligence (OSINT) project
Stars: ✭ 79 (-78.59%)
Mutual labels:  politics, civic-tech
Querido Diario
📰 Brazilian government gazettes, accessible to everyone.
Stars: ✭ 681 (+84.55%)
Mutual labels:  civic-tech, politics
Everypolitician Data
data for national legislatures worldwide
Stars: ✭ 174 (-52.85%)
Mutual labels:  civic-tech, politics
nyt-first-said
Tweets when words are published for the first time in the NYT
Stars: ✭ 222 (-39.84%)
Mutual labels:  politics, civic-tech
yournextrepresentative
A website for crowd-sourcing structured election candidate data
Stars: ✭ 56 (-84.82%)
Mutual labels:  politics, civic-tech
votacidade-app
Calculadora de afinidade para o Vota Cidade 2020
Stars: ✭ 12 (-96.75%)
Mutual labels:  politics, civic-tech
Pytition
Django app for self-hosted privacy-friendly online petitions
Stars: ✭ 85 (-76.96%)
Mutual labels:  politics
politic-bots
Tools and algorithms to analyze Paraguayan Tweets in times of elections
Stars: ✭ 26 (-92.95%)
Mutual labels:  politics
citybook
Create a resource directory from a contact spreadsheet.
Stars: ✭ 21 (-94.31%)
Mutual labels:  civic-tech
local-government-design-systems
A repo of local government design systems & pattern libraries. Specifically for municipal (local) & sub-state governments
Stars: ✭ 24 (-93.5%)
Mutual labels:  civic-tech
a4-product
A modern online participation platform for everyone developed by Liquid Democracy
Stars: ✭ 15 (-95.93%)
Mutual labels:  civic-tech
311
New web portal for BOS:311
Stars: ✭ 15 (-95.93%)
Mutual labels:  civic-tech
eot-nomination-tool
📚 Chrome extension to nominate government data that needs to be preserved
Stars: ✭ 20 (-94.58%)
Mutual labels:  civic-tech
suministrospr
Suministros Puerto Rico - Entérate, Ayuda, Informa
Stars: ✭ 40 (-89.16%)
Mutual labels:  civic-tech
Awesome Engineering Team Management
👔 How to transition from software development to engineering management
Stars: ✭ 319 (-13.55%)
Mutual labels:  politics

5calls

Quicknav

Automated testing

CircleCI

Cross-browser testing

BrowserStack Status

Table of Contents

Development Notes

The frontend is written in React with Redux for state management and Typescript for type safety and documentation. The application server back end -- for data processing -- is written in Go.

To build the application, you need to install Yarn and run the following commands:

# install dependencies and
#   compile .scss files to .css:
yarn

# Run unit tests in watch mode
yarn test

# Run unit tests with a code coverage report
yarn test:coverage

# start the app running in the
#   webpack development server:
yarn start

# start the app running in https mode
#   (needed for browser geolocation):
yarn start:https

# build the app into build folder
#  for server deployment:
yarn build

# any updates to .scss files need
#  to be compiled to css using:
yarn clean-build-css

Using yarn add to add new dependencies will throw an error related to node-sass-chokidar, which can be ignored.

For the best development experience, you should install both the React and Redux Development Tools extensions into your browser. Both browser extensions are available for Chrome and Firefox.

Unit testing

Unit testing in this repository is done using Jest with Enzyme in addition to the redux-mock-store library to support Redux-related tests.

End-to-end Integration Tests

E2E testing for this project is done using TestCafe with testcafe-react-selectors. This provides a web scraping test bed that provides an assertion library to ensure that the expected elements appear on each page under test.

Running the tests

Before running the tests, the development server must be running using the command yarn start Once the test server is running, you may either run all the tests on your local browser using one of the following commands

testcafe <browsername> web-tests/*.ts
yarn web-tests:all

Or if you have access to browserstack, you may run on multiple browsers using the command

yarn web-tests:browserstack

Running on browserstack

To run on browserstack, ensure that you have environment variables set for BROWSERSTACK_ACCESS_KEY and BROWSERSTACK_USERNAME to the values of your browserstack account You may view test results on the dashboard

Debugging and running individual tests

You may run specific tests by running testcafe with the -t or -T option -t -T <partial test name, must meet grep search criteria. Ex. Tests that start with donate may be found with "Donate.*">

Tests may be run in debug mode with the --inspect-brk option.

testcafe --inspect-brk chrome web-tests/test.ts 

Breakpoints may be put in the test with the following syntax

// tslint:disable-next-line:no-debugger
debugger;

Then in chrome, navigate to chrome://inspect On this page, under Remote Target there will be an inspect link, click to start the debugger.

Architecture, Data Flow and Strong Typing

A selection of files in this repository include code comments describing the architecture, data flow and strong typing conventions used in developing the React-Redux-TypeScript version of the 5 Calls application. These include files that illustrate the following (see the individual files for more details):

Use of TypeScript to Strongly Type Request Parameters Passed by React-Router

Also illustrates the use of Redux to loosely couple a component to data passed to its props.
CallPageContainer.tsx
CallPage.tsx

Data Flow through a Component Heirarcy

Also note the TypeScript conventions used in these files.
CallPageContainer.tsx
CallPage.tsx
Why5calls.tsx

Redux Data Flow

See code comments containing the token 'REDUX DATA FLOW'. Also note the use of TypeScript in these files.
CallPageContainer.tsx
redux/callState/action.ts
redux/callState/actionCreator.ts
redux/callState/reducer.ts

Contributor Guidelines

Contributions to this repository are welcome. Please see the Contributing.md file in the 5calls/5calls repository for information on contributing to this repository.

Contributors

Other Client Projects

Create React App Code Generation

This project was created with create-react-app (CRA, react-scripts ver 1.0.0) using react-scripts-ts (ver 2.2.0) to add TypeScript support. In addition, the node-sass-chokidar library was added for preprocessing of SASS (.scss files) to CSS.

Subsequently, the CRA-created configurations were exposed using the eject command (yarn eject). This created the config and scripts folders and added dependencies and other configurations to package.json.

CRA_README.md is the original README.md file created when the create-react-app command was run.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].