Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dependencies and Make Generic for Any City #183

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

samc1213
Copy link

@samc1213 samc1213 commented Sep 27, 2023

This PR updates to the latest versions of dependencies, and makes this project usable for cities besides Chicago

  • Upgrade to node version 18.17.1
  • Remove dependencies on Mapbox and Google Maps. Use OpenStreetMap APIs
  • Remove email signup and ward functionality
    • Email signup depended on mailchimp
    • Ward functionality is Chicago-specific
  • Add Docker image, docker compose for "production", and docker compose for development
  • Move all city-specific language to the config folder
  • Update README to explain how to update for a new city, and how to use the docker compose files for deployment/development

See #182

* Remove all migrations
 - Migrations were using grunt-mongo-migrations package,
   which depends on the now-deprecated fibers package.
   Migrations were specific to Chicago anyway
* Upgrade all packages using npm-check-updates
* Remove requests package
 - Deprecated. Just using node's http library
   now
* Handle changes in mongoose package (use promises instead
  of callbacks)
* Mapbox API key seems stale. Hoping to migrate
  to all open mapping data to remove need for
  API keys
* Nominatim is free and uses OpenStreetMap data. Their
  use policy says as long as you have < 1 req/s you
  can use their public API. If usage were high it can
  be self-hosted. This gets rid of dependency
  on Google geocode API
* Commit 6ff1def attempted to upgrade the node
  and mongoose version, but left some issues behind
* Mongoose library now uses promises, not callbacks. You
  must call .then() for actions like .save() to actually
  do anything
* Dependency on mailchimp not desired here. Other
  forks could add an email list if they want
* Begin to make the Chicago portions of the project
  generic, to allow custom messages and configuration
* In an effort to make this generic for any city,
  move all references to 'chicago' to configurations,
  and move all static information to config folder
* TODO: Decide how to handle wards - consider reworking
  with a more generic name, such as "district"? Need to
  remove Chicago references from wards page
* Wards are a nice feature for Chicago, but Chicago
  has uniquely powerful aldermen. Also, the scripting
  required to maintain the ward functionality is a bit
  tedious
* `npm test` does hang now, but at least the tests
  pass
* Now the map will load in the right spot depending
  on config
* If multiple address matches were found, the wrong property
  names were being used for lat/lon and full address name
* I was filtering out things marked as 'place' on OpenStreetMap,
  which apparently includes some apartment buildings. For now,
  use 'place' and 'building'
- Node doesn't have a DockerHub image for
  darwin, so just don't build for it for now
Update to new url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant