Git Product home page Git Product logo

Code Climate Test Coverage Build Status Dependency Status Stories in Ready Slack Status

Backend to the Code for San Jose Website

The front end, written in AngularJS, can be found on GitHub under the Code for San Jose Frontend repository

About

The codeforsanjose web application is a prototype framework for Code for America brigades to use to manage their brigades. It's currently in alpha stage. See the wiki for more information on its design, configuration, and usage.

Demo

Here is the demo site

Demo notes: It may be a bit sluggish due to running off of a free Heroku dyno.

Local Development

Supported development platforms:

  • Mac OS X
  • Linux

Dependencies:

  • Install PostgreSQL

You can either follow their directions on their website here or you can use Homebrew (brew install postgres). I highly recommend using Homebrew as an OS X package manager. If you choose to go the Homebrew route, the output for the brew install command should include plist lines for starting postgres every time your Mac starts and for starting the database up initially. If you do not go with Homebrew, then you'll need to Google around for the right default path that postgres installs to and use that for the right plist invocation.

Copy config/database.example.yml to config/database.yml and add a user and password if desired (typically unnecessary for development/test).

Ruby and Rails:

  • Install Ruby 2.2.4 using either rbenv or rvm.
  • Install with gem install bundler
  • Execute bundle install
  • Execute bundle exec rake db:migrate
  • Execute bundle exec rails s
  • Access the front page at 127.0.0.1:3000
  • Access the admin page at 127.0.0.1:3000/admin

Bonus round:

  • Run tests via rake test
  • Generate code coverage report with rake rubocop

See the contribution guide in the wiki for how to contribute to the repository.

Meetup Integration

A background job runs every hour that collects upcoming Meetup events for a Meetup group specified by its Meetup URL name in config/settings.yml.

Those events are stored in postgres and are accessed from the welcome_controller and then rendered in the app/views/shared/meetup_events partial.

The Meetup API key is configured via an environment variable. You can set this in a POSIX compliant shell by running export MEETUP_API_KEY=<your_key_here> for local development or rake figaro heroku:set -e production if you're deploying to Heroku.

If you would like to pull down the latest set of events for an initial seeding of the database then there is a rake task to accomplish just that: rake meetup_poll_job:perform_now. However, because of uniqueness validation it'll only be useful for that initial seeding.

The polling job will run ever sixy minutes. The job schedule timing is configured in the config/schedule.rb file. However, the whenever gem requires writing to the systems crontab in order for the schedule to take effect. Setting your crontab for local development is not needed but this needs to be done if the application is deployed.

Open Source San José's Projects

Open Source San José doesn’t have any public repositories yet.

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.