Skip to content

mpcahn/Circular

 
 

Repository files navigation

Circular Stories in Ready

Circular provides a platform for tenants of multi-family buildings within the City of Denver to transparently and collectively petition their landlord to add recycling and compost collection services through an automated and highly efficient process.

Getting Started

Prerequisites & Installation

In order to get the project up and running on your local machine, you will first need to install a few software tools and copy the project source code on to your local machine.

1. Install Ruby

Follow the instructions in the link install Ruby: Quick Guide for Installing Ruby

(Don't hesitate to ask for help if needed!)

2. Install Rails

Follow the instructions in the link to install Rails: Quick Guide for Installing Rails

3. Install PostgreSQL

If you have Homebrew, use the following command to install PostgreSQL.

$ brew install postgres
$ pg_ctl -D <var folder> start

Otherwise, you can download the software here.

4. Clone Project Source Code from GitHub

The GitHub repository for this project is located at https://github.com/codefordenver/Circular. Run the command below to clone the source code on to your local machine.

$ git clone https://github.com/codefordenver/Circular.git

5. Install Rails App and Dependencies

Use the command below to make sure all dependencies in your Gemfile are available to the application.

$ bundle install

6. Create and Initialize the Database

$ rails db:create
$ rails db:migrate

7. Install node

This includes a download of npm's command line tools, which we'll use for managing frontend javascript modules. This only needs to be done once.

$ brew install node

8. Navitage into the React app

From the root of the repository:

cd client

9. Install the project's node modules

This only needs to be done the first time you run the app, or if you pull down the app and someone else has added modules since your last pull. From inside the client directory:

npm install

10. Run the App

Finally, navigate back to the root with cd .. and then run the rake start command. This alias will start 2 servers: React's Node server on port 3000, and Rails' Puma server on port 3001. (The Node server is then proxied to port 3001 to avoid CORS issues). The app will open in a new window/tab automagically! However, if you need to access the app in a different browser window/tab, simply point the browser to http://localhost:3000/.

cd ..
$ rake start

Optional: Run the App Console

rails c is short for rails console and allows you to interact with the application straight from the command line. This is helpful for checking what data is in the database, among other things.

$ rails c

Running the Test Suite

This project employs RSpec (specifically, the rspec-rails library) to test the code. You can learn more about RSpec here.

In order to run the test suite, use the commands below. rails db:test:prepare will ensure that both your test database is up-to-date with development. rspec will run the test suite.

$ rails db:test:prepare
$ rspec

About

New Code for Denver Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 65.3%
  • HTML 19.5%
  • JavaScript 10.7%
  • CSS 4.2%
  • CoffeeScript 0.3%