A Chicago street sweeping alert system and searchable calendar.
If this is your first time running the application, you'll need to make sure you have Docker installed. Assuming you do, issue these commands from the terminal:
# Make a copy of the environment variables file
# NOTE: You'll need a Google API key for maps/address autocomplete,
# and a Mailgun API key for sending transactional emails
cp .env.example .env
# Build the Docker image
docker compose build --no-cache
# Run the setup script
docker compose run app bin/setup
# After the setup is completed, run the app
docker compose upFrom a terminal session:
# Update to make sure your database and dependencies are in sync
docker compose run app bin/update
# Launch the stack
docker compose upOnce the stack is running, visit: http://localhost:3000
Note: you may be required to migrate the database, but you should be able to do this from the website prompt.
From time to time, you'll need to install new gems and access the console. In order to do so,
please use the docker compose run app command. For example:
# Installing gems
docker compose run app bundle add foo
# Accessing the console
docker compose run app bin/rails console
# Start a bash shell
docker compose run app /bin/bash
# Run rspec tests
docker compose run app rake spec
OR
docker compose run app bundle exec rake specIn development, emails are captured and stored in /tmp/letter_opener.
- In late March, export the following files from the Chicago Data Portal:
- "Street Sweeping Zones - 202X" =>
Street Sweeping Zones - 202X.geojson - "Street Sweeping Schedule - 202X" =>
Street_Sweeping_Schedule_-_202X.csv
- "Street Sweeping Zones - 202X" =>
- Add files to the
db/datadirectory. - Run rspec test suite.
- Merge into main and deploy.
- Temporarily enable 'Maintenance Mode' on Heroku prior to running non-TEST
SeedYearlyDataservice. - Seed db with new zone and schedule data (note that this will nullify
area_idin existing alerts):- TEST:
SeedYearlyData.new(write: false, year: Time.current.year.to_s).call SeedYearlyData.new(write: true, year: Time.current.year.to_s).call
- TEST:
- Disable 'Maintenance Mode' on Heroku prior to running non-TEST
SeedYearlyDataservice. - Flip
NEW_SCHEDULES_LIVEboolean value. - Destroy alerts that are unconfirmed or don't have an associated street address:
- TEST:
DestroyIneligibleAlerts.new(write: false).call DestroyIneligibleAlerts.new(write: true).call
- TEST:
- Carry over existing alerts:
- TEST:
CarryOverExistingAlerts.new(write: false).call CarryOverExistingAlerts.new(write: true).call
- TEST: