Giter Club home page Giter Club logo

dahlia-listings's Introduction

Housing Portal

Code Climate

Cross-browser testing done with

Purpose

Affordable housing portal for the Bay Area. This application streamlines the process of searching and applying for affordable housing, making it easier to rent and stay in our region.

Technical Architecture

This repository contains the source code for sites such as smc.housingbayarea.org, which is the user-facing web application of the platform. It is a Ruby on Rails application that serves up a single page AngularJS app. The web application connects to a PostgreSQL backend controlled by the admin app (see repo here), which is where the listings are created and administered. Both apps use a common set of data models via a Ruby gem (see repo here).

Dependencies

Before you install, your system should have the following:

  • Ruby 2.5.3 (Use RVM or rbenv)
  • Bundler gem install bundler
  • PostgreSQL
  • Use Node v12.x (npm v6.9.x) — If you need to manage multiple Node versions on your dev machine, install NVM and run nvm use

Getting started

  1. Make sure your PostgreSQL server is running (e.g. using Postgres.app listed above)
  2. Open a terminal window
  3. git clone https://github.com/Exygy/dahlia-listings.git to create the project directory
  4. cd dahlia-listings to open the directory
  5. bundle install to download all necessary gems
    • see here if you have issues installing pg gem with Postgres.app, you may need to use: `gem install pg -v 1.1.4 -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
  6. yarn install to install Angular and other JS dependancies.
  7. overcommit --install to install git hooks into the repo
  8. rails s to start the server, which will now be running at http://localhost:3000 by default

For a fresh installation only (no existing DB)

  1. rails db:create && rails db:migrate to create the dev and test databases and run migrations
  2. rails db:seed to load the seed data into the new databases

Running Tests

To run Ruby tests:

  • rails spec

To run Javascript unit tests:

To run E2E tests:

  • Installation (needs to be run once): ./node_modules/protractor/bin/webdriver-manager update to get the selenium webdriver installed
  • On one tab have your Rails test server running: yarn rails-setup-test
  • On another tab, run yarn protractor to run the selenium webdriver and protractor tests. A Chrome browser will pop up and you will see it step through each of the tests.
  • After you are done with your testing, run the teardown command to stop the test server and remove test DB files: yarn rails-teardown-test

Note: These tests will run on Semaphore (our CI) as well for every review app and QA deploy.

Importing pattern library styles

We currently manually transfer the application's CSS from our pattern library using Grunt.

To update this app with the latest PL styles:

  1. Clone the PL repository in the same parent directory as this one.
  2. Optional: switch to the PL branch you want to import styles from.
  3. cd to your dahlia-listings folder
  4. Run grunt

We use grunt-clean and grunt-copy to transfer the CSS, and grunt-replace to replace relative background image paths with Rails asset URLs.

Acceptance/Feature Apps

Temporary "acceptance" apps are created upon opening a pull request for a feature branch. After the pull request is closed, the acceptance app is automatically spun down. See this Heroku article for details.

Code style and quality

Javascript

Javascript code quality is ensured by two npm packages: JsHint and JSCS. They will run automatically as a pre-commit hooks. Follow the Airbnb JavaScript Style guide.

Ruby

Rubocop is configured in .rubocop.yml to enforce code quality and style standards based on the Ruby Style Guide and runs every time you commit using a pre-commit hook. Refer to the Ruby Style Guide for all Ruby style questions. To identify and have Rubocop automatically correct violations when possible, run:

  • rubocop -a [path_to_file] for individual files
  • rubocop -a for all Ruby files

Changing the Style Guide settings

Any changes to Rubocop, JSCS, etc. affect the entire team, so it should be a group decision before commiting any changes. Please don't commit changes without discussing with the team first.

License

This housing portal is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this housing portal. If not, see http://choosealicense.com/licenses/gpl-3.0/

dahlia-listings's People

Contributors

akegan avatar ashleymmeyers avatar barrysr1 avatar bk3c avatar callaghanc avatar chrisdolendo avatar cindyconway avatar creativecoder avatar dependabot[bot] avatar dstavis avatar emilyshore avatar exygy-dev avatar jacchau avatar jaredcwhite avatar jrubenoff avatar kaptron avatar menslow avatar mluedke2 avatar slowbot avatar software-project avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dahlia-listings's Issues

Pensione listing change requests

Pensione listing change requests for the following. Please see notes here for further explanation and future issue for Bloom 1.0 to make the copy editable and dynamic for SRO listings and listings with no deadline.

Mock listing: https://staging.sj.housingbayarea.org/listings/9

  1. Under What to Expect: Please remove the wording “Your application will be removed from the waitlist if you have made any fraudulent statements, or if any household member appears on more than one application for this listing. If we cannot verify a housing preference that you have claimed, you will not receive the preference but will not be penalized.” to "Your application will be disqualified if you make any fraudulent statement."

  2. Under What to Expect: Please replace the wording “Should your application be chosen from the waitlist” and replace with “At the time of your interview, please…..”

  3. Under Additional Fees: Please remove the wording “or one month’s rent” under Deposit

  4. Under Additional Fees: Please remove the wording “per applicant age 18 and over” (under the application fee)

  5. Under Single Room Occupancy: Please remove the wording “Tenants may share bathrooms, and sometimes kitchen facilities.” And replace with: “Tenants may share the community room kitchen.”

  6. Under Office Hours: Please remove the wording “Applications must be received by the deadline and postmarks will not be considered

  7. Under #1 Household Maximum Income: Please remove “For income calculations, household size includes everyone (all ages) living in the unit” and replace with "For income calculations, household size is limited to one person." This property is single resident occupancy, so this statement is not needed.

Add Open Graph Tags Preview Image, Title, and Description for shared links

Add Preview Image, Title, and Description for shared links on social (i.e. Facebook, Twitter, Linkedin, iMessage) for SMC and SJ

AC:
The homepage, listings page, and individual listings have the following previews:

Homepage and Listings Page
Image: Hero Image
Title: [City/ County] Affordable Housing Portal
Description: Search and apply for affordable housing on the [City/ County]'s Housing Portal

Individual Listing
Image: Listing Image
Title: [Building Name]
Description: Apply for affordable housing at [Building Name] on the [City/County]'s Housing Portal

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.