meirim

Meirim is an open-source smart city application that facilitates transparency in urban planning.

https://github.com/meirim-org/meirim

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary

Keywords

citizen-participation democracy smart-cities urban-planning

Keywords from Contributors

transformers annotation distribution embedded charts mesh interactive ode diffusers powersystem
Last synced: 9 months ago · JSON representation

Repository

Meirim is an open-source smart city application that facilitates transparency in urban planning.

Basic Info
  • Host: GitHub
  • Owner: meirim-org
  • License: mit
  • Language: JavaScript
  • Default Branch: master
  • Homepage:
  • Size: 105 MB
Statistics
  • Stars: 60
  • Watchers: 20
  • Forks: 26
  • Open Issues: 164
  • Releases: 0
Topics
citizen-participation democracy smart-cities urban-planning
Created about 9 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Meirim.org

The goal of this project is to empower citizens to effectively organize for their quality of life in their cities and to ensure information about protests is accessible.

Getting Started

This project is under development and has three main parts - backend, frontend and crawler. Currently two separate packages live in this repository - server (which includes the crawler code) and client.

Setup instructions for development

Prerequisites

Things you need to install:

  • Git
  • Node.js (we support and run on version 14.x)
  • MySQL (required only for the backend & crawler) Version 5.7

Installing meirim's CLI tool

Run the following command to install the meirim command-line application:

bash $ sudo ./cli/install_dev_env.sh

Installing client and server

Once you have these you can clone the code:

bash $ git clone git@github.com:meirim-org/meirim.git $ cd meirim

Instructions for backend

Cd into the package directory and install dependencies:

bash $ cd server $ npm install

Connect to your MySQL instance:

bash $ mysql -u root -p

Create and setup a database for the project:

sql CREATE DATABASE meirim character set UTF8 collate utf8_bin; SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY,','')); exit;

Edit your local configuration file and set your database connection details and email smtp settings (if needed). The default configuration files resides at server/config/default.json. To override configuration values without accidentally committing them make a copy of the file at server/config/local.json, delete whichever values you don't wish to override and leave the ones you do and change their values.

Run all database migrations:

bash $ $(npm bin)/knex migrate:latest

Finally, run the service:

bash $ npm start

The service will then be available on port 3001.

Instructions for frontend

Cd into the package directory and install dependencies:

bash $ cd client $ npm install

Nothing needs to be set up specifically for the frontend (however a working backend service would make it a bit more useful). It can be started using:

bash $ npm start

And will then be available at http://localhost:3000

Running both backend and frontend

Both the backend and the frontend should be run separately when developing for the auto-reload capabilities of webpack-dev-server. The backend will run on port 3001 by default, and the frontend will run on port 3000 and proxy requests destined to the backend from any path beginning with "/api" to the service at port 3001 (proxy settings live in client/src/setupProxy.js).

Instructions for crawler

To run the crawler (for testing or seeding the database with plan data) you must first install all dependencies required by Chromium (which is used by puppeteer) which vary from system to system.

If puppeteer is not working properly, check the project's troubleshooting information.

To run the crawler after installing server dependencies and setting up a database (can be killed at any time using Ctrl+C):

bash $ cd server $ npm run crawl

Testing

Tests require all prerequisites to be fulfilled and a database instance to be available at port 33060 on localhost. The odd port is for preventing people from running the tests on development databases accidentally (and can be changed by overriding the test section at server/config/default.json).

If you use docker to run the MYSQL, you may use this command to lift a docker for testing

bash docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -d mysql:5.7

Backend tests

bash $ cd server $ npm run test

End-to-end tests

Cypress is used for e2e tests and is meant to test the frontend and backend as served using the serve script.

First build the frontend and run the serve script:

bash $ cd client $ npm run build $ cd ../server $ npm run serve

Then the tests can be run (use a browser of your choice out of your installed browsers. To see which browsers cypress recognizes use $(npm bin)/cypress info):

bash $ cd ../client $ $(npm bin)/cypress run --browser chromium

Running in production

We use pm2 to run the service in production.

First you must build the frontend react site, then the service (serving both the backend and frontend) can be started:

bash $ cd client $ npm run build $ cd .. $ pm2 start ecosystem.config.js --env production

Set up cron to schedule three jobs - crawling for new data, emailing alerts to users and aggregating impressions:

bash $ crontab -e */40 * * * * cd /path_to_code/meirim/server && NODE_ENV='production' /usr/bin/node /path_to_code/meirim/bin/iplan >> /path_to_code/meirim/server/logs/combined.log */20 * * * * cd /path_to_code/meirim/server && NODE_ENV='production' /usr/bin/node /path_to_code/meirim/bin/plan_status_change >> /path_to_code/meirim/server/logs/combined.log 2>&1 0 10,21 * * SUN-THU cd /path_to_code/meirim/server && NODE_ENV='production' /usr/bin/node /path_to_code/meirim/bin/fetch_tree_permit >> /path_to_code/meirim/server/logs/combined.log 2>&1 */50 * * * * cd /path_to_code/meirim/server && NODE_ENV='production' /usr/bin/node /path_to_code/meirim/bin/send_emails_trees >> /path_to_code/meirim/logs/combined.log 2>&1 */50 * * * * cd /path_to_code/meirim/server && NODE_ENV='production' /usr/bin/node /path_to_code/meirim/bin/send_emails >> /path_to_code/meirim/logs/combined.log 2>&1 30 * * * * cd /path_to_code/meirim/ && NODE_ENV='production' /usr/bin/node /path_to_code/meirim/bin/aggregate_views >> /path_to_code/meirim/logs/combined.log 2>&1

Further info

You can find more technical info about the project under the docs folder.

Contributing

We are thankful for any comments, suggestions, issue reports and pull requests anyone might wish to help with. We will do our best to acknowledge, review and reply to these contributions to the best of our abilities (we are all volunteers).

For methods of communicating with us, please see our website.

Issues are assigned a label 'Welcome' are suitable for first time contribution to meirim. You can see the full list here: https://github.com/meirim-org/meirim/labels/%F0%9F%99%8B%E2%80%8D%E2%99%80%EF%B8%8F%20Welcome

Authors

See the list of contributors who participated in this project <3.

License

This project is licensed under the MIT License - see the LICENSE.md file for details. The rest is licensed under a Creative Commons Attribution 4.0 International License.

Owner

  • Name: Meirim
  • Login: meirim-org
  • Kind: organization
  • Email: info@meirim.org

GitHub Events

Total
  • Watch event: 4
  • Push event: 1
  • Fork event: 1
Last Year
  • Watch event: 4
  • Push event: 1
  • Fork event: 1

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 3,585
  • Total Committers: 37
  • Avg Commits per committer: 96.892
  • Development Distribution Score (DDS): 0.766
Past Year
  • Commits: 97
  • Committers: 2
  • Avg Commits per committer: 48.5
  • Development Distribution Score (DDS): 0.052
Top Committers
Name Email Commits
Esraa Jbara j****a@g****m 840
Gal Gendler g****r@g****m 634
florpor f****s@g****m 574
Jonathan Dortheimer j****n@d****m 308
Nadav Moreno n****v@s****m 210
TomerMe2 t****1@g****m 210
Yossi Eynav y****v@g****m 119
gruppin g****n@g****m 114
Michal Mart m****t@g****m 104
nadavmoreno מ****ם 76
nadavmoreno n****o@g****m 56
yael alfasi y****l@g****m 45
dependabot[bot] 4****] 38
Jonathan Dortheimer j****r@s****m 32
winteromi w****i@g****m 31
Roman Malyshev m****1@g****m 31
ofirkg t****2@g****m 30
naortor n****r@g****m 24
ofir.katz o****z@p****m 24
Macpire r****d@m****m 16
BlueHotDog B****g 12
Adam Fineberg a****g@g****m 8
boris pl p****p@g****m 8
udim12 e****l@g****m 8
JediYozh k****0@g****m 6
Udi Oron u****n@g****m 4
Eyal Migdalovich e****g@g****m 4
Itamar Jobani i****j@g****m 4
Dan Fishgold d****d@g****m 3
The Codacy Badger b****r@c****m 2
and 7 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 60
  • Total pull requests: 55
  • Average time to close issues: 2 months
  • Average time to close pull requests: 17 days
  • Total issue authors: 5
  • Total pull request authors: 14
  • Average comments per issue: 0.88
  • Average comments per pull request: 0.55
  • Merged pull requests: 37
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • GalGend (31)
  • gruppin (13)
  • tomers (7)
  • yaelal (4)
  • drorgivton (2)
Pull Request Authors
  • yossi-eynav (25)
  • yaelal (9)
  • GalGend (7)
  • microooji (6)
  • dependabot[bot] (4)
  • gruppin (2)
  • BlueHotDog (1)
  • Macpire (1)
  • dortheimer (1)
  • nullhexcode (1)
  • lilachritter1 (1)
  • tomers (1)
  • Avnerussler (1)
  • naortor (1)
Top Labels
Issue Labels
DevOps (19) Trees🌳 (12) Client 💻 (9) 🙋‍♀️ Welcome (9) Blocked (7) Backend (6) UI (6) WIP (5) Emails📧 (5) Plan Status (4) Plans (4) 🐞Bug (3) Map (3) City page (3) In Review (2) Monitor (2) alerts (1) Integrations (1) Arabic عربيه (1) Content (1) welcome (1)
Pull Request Labels
dependencies (4) Client 💻 (1) UI (1)

Dependencies

.github/workflows/client.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-node v1 composite
  • mysql 5.7 docker
.github/workflows/server.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-node v1 composite
  • mysql 5.7 docker
server/tests/docker-compose.yml docker
  • adminer latest
  • mailhog/mailhog latest
  • mariadb 10.5.8
client/package-lock.json npm
  • 1786 dependencies
client/package.json npm
  • @typescript-eslint/eslint-plugin ^3.9.1 development
  • @typescript-eslint/parser ^3.9.1 development
  • cypress ^5.6.0 development
  • eslint ^6.6.0 development
  • eslint-config-airbnb ^18.2.1 development
  • eslint-config-prettier ^6.15.0 development
  • eslint-config-standard ^14.1.1 development
  • eslint-plugin-cypress ^2.12.1 development
  • eslint-plugin-import ^2.24.2 development
  • eslint-plugin-jsx-a11y ^6.4.1 development
  • eslint-plugin-node ^11.1.0 development
  • eslint-plugin-promise ^4.3.1 development
  • eslint-plugin-react ^7.26.1 development
  • eslint-plugin-react-hooks ^4.2.0 development
  • eslint-plugin-standard ^4.1.0 development
  • prettier ^2.4.1 development
  • @fortawesome/fontawesome-svg-core ^1.2.36
  • @fortawesome/free-brands-svg-icons ^5.15.4
  • @fortawesome/free-solid-svg-icons ^5.15.4
  • @fortawesome/react-fontawesome ^0.1.15
  • @mapbox/geojson-area ^0.2.2
  • @material-ui/core ^4.12.3
  • @material-ui/icons ^4.11.2
  • @material-ui/lab ^4.0.0-alpha.60
  • @material-ui/styles ^4.11.4
  • @n8tb1t/use-scroll-position ^2.0.3
  • @reduxjs/toolkit ^1.6.1
  • @tanstack/react-table ^8.7.0
  • axios ^0.21.4
  • classnames ^2.3.1
  • config ^3.3.6
  • customize-cra ^1.0.0
  • downshift ^6.1.7
  • handlebars ^4.7.7
  • handlebars-loader ^1.7.1
  • http-proxy-middleware ^1.3.1
  • leaflet ^1.6.0
  • lodash ^4.17.21
  • moment ^2.27.0
  • prop-types ^15.7.2
  • query-string ^6.14.1
  • rc-slider ^9.7.2
  • react ^17.0.2
  • react-app-rewire-styled-components ^3.0.2
  • react-app-rewired ^2.1.8
  • react-bootstrap ^1.6.4
  • react-charts ^2.0.0-beta.7
  • react-copy-to-clipboard ^5.0.4
  • react-device-detect ^1.17.0
  • react-dom ^17.0.2
  • react-ga ^3.3.0
  • react-getscreen ^1.1.3
  • react-hookstore ^1.5.1
  • react-hotjar ^2.2.1
  • react-iframe ^1.8.0
  • react-infinite-scroll-component ^5.0.5
  • react-leaflet ^2.7.0
  • react-moment ^0.9.7
  • react-number-format ^4.7.3
  • react-rating ^2.0.5
  • react-redux ^7.2.5
  • react-router-dom ^5.3.0
  • react-scripts ^3.4.4
  • react-toastify ^6.2.0
  • react-youtube ^7.13.1
  • string-similarity ^4.0.4
  • styled-components ^5.3.1
  • use-places-autocomplete ^1.9.4
server/package-lock.json npm
  • 1076 dependencies
server/package.json npm
  • @typescript-eslint/eslint-plugin ^3.9.1 development
  • @typescript-eslint/parser ^3.9.1 development
  • chai ^4.2.0 development
  • chai-as-promised ^7.1.1 development
  • eslint ^6.8.0 development
  • eslint-config-standard ^14.1.1 development
  • eslint-plugin-import ^2.22.0 development
  • eslint-plugin-node ^11.1.0 development
  • eslint-plugin-promise ^4.2.1 development
  • eslint-plugin-react ^7.20.6 development
  • eslint-plugin-standard ^4.0.1 development
  • import-fresh ^3.2.1 development
  • mocha ^8.1.1 development
  • mock-require ^3.0.3 development
  • nock ^13.0.4 development
  • prettier 2.1.2 development
  • sinon ^9.0.3 development
  • yargs ^16.2.0 development
  • @florpor/pdf-table-extractor ^1.0.6
  • @mapbox/geojson-area ^0.2.2
  • @sendgrid/mail ^7.6.0
  • abort-controller ^3.0.0
  • aws-sdk ^2.806.0
  • axios ^0.21.1
  • bcrypt ^5.0.0
  • bluebird ^3.7.2
  • body-parser ^1.19.0
  • bookshelf ^1.2.0
  • checkit ^0.7.0
  • cheerio ^1.0.0-rc.3
  • compression ^1.7.4
  • config ^3.3.1
  • connect-session-knex ^1.7.3
  • cors ^2.8.5
  • customize-cra ^1.0.0
  • email-verify ^0.2.1
  • esri-to-geojson ^1.0.4
  • express ^4.17.1
  • express-handlebars ^5.1.0
  • express-session ^1.17.1
  • follow-redirects ^1.13.0
  • geojson-validation ^1.0.2
  • handlebars ^4.7.7
  • handlebars-loader ^1.7.1
  • html-table-to-json ^1.0.0
  • http-proxy-middleware ^1.0.5
  • juice ^7.0.0
  • knex ^0.21.12
  • leaflet ^1.6.0
  • lodash ^4.17.21
  • moment ^2.29.1
  • multer ^1.4.2
  • mustache ^4.0.1
  • mysql ^2.18.1
  • node-dir ^0.1.17
  • node-exceptions ^4.0.1
  • node-geocoder ^3.27.0
  • nodemailer ^6.4.16
  • proj4 ^2.6.2
  • puppeteer ^5.4.1
  • query-string ^6.13.1
  • reproject ^1.2.6
  • request-promise ^4.2.6
  • scrapingbee ^1.6.1
  • simplify-geojson ^1.0.5
  • staticmaps ^1.4.1
  • terraformer-wkt-parser ^1.2.1
  • turf ^3.0.14
  • winston ^3.3.3
  • xlsx ^0.16.9
package-lock.json npm
cli/pyproject.toml pypi
  • boto3 *
  • click *
  • pandas *
  • paramiko *
  • requests *
  • rich *
  • sqlalchemy *