Code Monkey home page Code Monkey logo

voxe-web's Introduction

<img src=“https://travis-ci.org/voxe/voxe-web.png” alt=“Build Status” />

Getting started

Clone the git repository

git clone git@github.com:voxe/voxe-web.git

Ensure you have ImageMagick installed on your system. If not, check out chapter “Dependencies” below.

At the prompt command, install gems:

bundle install

At the prompt command, start your server:

rails server

If you need some data, check out chapter “Import Data” below.

Environment

  • Ruby 1.9.3

  • mongoDB 2.2.X

  • imagemagick

  • heroku

Dependencies

We doing some image processing with ImageMagick (www.imagemagick.org).

For MacOS X users, you can install Homebrew (mxcl.github.com/homebrew) a packet manager and then install ImageMagick.

At the command prompt:

brew install imagemagick

If you want to launch acceptance tests, you should install the qt development libraries.

MacOS X with homebrew:

brew install qt

An installation guide for qt libs is available here : github.com/thoughtbot/capybara-webkit/wiki/Installing-QT

Then:

bundle install

Import Data

To get some data from 2007 French Presidential Election, at the command prompt type:

rake migrate:france2007

If you have access to your staging server, you can also use the voxe custom “heroku-mongo-sync” plugin to get the database we use on this server:

heroku plugins:install http://github.com/voxe/voxe-heroku-mongo-sync.git
heroku mongo:pull --app voxe

Then, to update the staging server with the production data

heroku mongo:push --app voxe-staging

Testing

At the command prompt, launch tests:

rake test

There are also acceptance tests which can be run with this command:

rake cucumber

Deployment

Deploying in staging mode:

rake deploy:staging

Or in production mode:

rake deploy:production

voxe-web's People

Contributors

pierrevalade avatar nebj avatar barodeur avatar soulou avatar dwarffrench avatar ekkans avatar julienguizot avatar edschlum avatar bnetter avatar jrybak avatar

Stargazers

Michael Faille avatar Gotame avatar Jake Bowers avatar José Wenceslao Castillo avatar igor avatar Joseph Finlayson avatar  avatar  avatar Romain Lalanne avatar Florent Gosselin avatar antoinelyset avatar Nicolas Charlery avatar Antoine Goutenoir avatar py - Pierre Yves Ricau avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar James Cloos avatar Romain Lalanne avatar  avatar

voxe-web's Issues

Internationalisation of the static pages

Currently the static pages are rendered in tumblr, and are all in french. Voxe could be understood by a much larger range of individuals if these were translated into english.

  • I am a native speaker so I can help.

Acceptance tests

Je pense qu'on en a besoin principalement pour vérifier que le les applications backbone sont conformes avec l'API.

Better README documentation

the README has a bunch of rake/heroku commands but I can't find a way to get an test web site up and running. It would be nice if the README included instructions for people not used to heroku & rake...

For most commands I get ::

no such file to load -- bundler/setup

Backoffice landing page

As of right now, the candidacy's backoffice landing page is completely empty.

With @jrybak, we were thinking of putting there a simple tutorial explaining simply how to do the different possible actions in the backoffice.

We believe this would make the backoffice easy to pick up for anyone.

Linked to #72

Deprecation Warning with DeviseController

DEPRECATION WARNING: Layout found at "devise" for DeviseController but parent controller set layout to :layout_by_resource. Please explicitly set your layout to "devise" or set it to nil to force a dynamic lookup. (called from realtime at /home/leo/.rbenv/versions/2.0.0-p0/lib/ruby/2.0.0/benchmark.rb:296)

app/controllers/application_controller.rb

  layout :layout_by_resource

  protected

  def layout_by_resource
    if devise_controller?
      "devise"
    else
      "application"
    end
  end

We may have to find a better way to do that.

Show contributors

Contributors button

Contributor list :
contibutors list

As you can see on the wireframe, the action scope design is not defined.

A visitor should see elections scoped on his country

We should use the gem Geocoder, more exactly this feature :

In Any Rack-Based Framework

Detect Location of HTTP Request

Get current user's city and country (using IP address). A location method is added to the standard Rack::Request which returns a Geocoder::Result object:

# Rails controller or Sinatra app
city = request.location.city
country = request.location.country_code

Then when arriving on the homepage, we should directly scope elections of the country, so we have to call for example "/country-france" base on the field country_name of geocoder.

Add or delete ambassadors

It's currently impossible to delete an ambassador from an election. The Voxe Admin should be able to do this.

Visitors should be able to visit candidacy's profile page in order to view informations

We should create a new web controller (simple rails view) on this route: /election/{election-namespace}/candidacy/{candidacy-namespace} (route are submitted to changes in the future for SEO purposes)

Here we should create a minimal template to show the name of the organization and the name of the candidate.

We will fill additional information later.

Create new candidacies

Here is how the UX could works :

Click on the + button under candidacies:
add candidacy button

Then a modal window should be opened to add candidates :
add candidates to a candidacy

An autocompletion input should be used to select candidacies in order to avoid candidate duplications.

API endpoint: admin should be able to grant user access to a candidacy

The endpoint PUT /candidacies/{id} should be updated in order to access an user_id. This user_id, will be the owner of this candidacy and will be able to add/remove propositions and add more informations about the candidacy itself.

NB: These "more informations" does not exists yet. We will add them later.

Add image to main themes

It should be possible to add Voxe's image for main themes from the BO, without having to use s3.

Mobile webview : issue on scrolling

We the large number of election, the scrolling on the mobile view is not working any more, when you connect to voxe.org from you iphone for example.

Administrator : Redesign of the backoffice

With the candidate backoffice, we have to rethink the admin backoffice, a lot of functionnalities will became useless as admins will be able to access each candidate backoffice.

I'd like to gather everything that must be contained by the admin backoffice :

  • Associate candidate with elections
  • Create new elections
  • Manage tags/sub-tags
  • ...

Solving "Increase in server errors" Google Webmaster Tools mails

http://voxe.org/: Increase in server errors

Google detected a significant increase in the number of URLs we could not access. It is likely that your server had an internal error or was busy when attempting to process these requests.

Recommended action
Check the Crawl Errors page in Webmaster Tools.
Check your scripts and script permissions.
Examine the log files on the server for your site for scripts or pages that might be crashing.
Consider addressing the load on your server.
Learn more in our Help Center.

Add or delete contributors

It's currently to delete a contributor from an election. The ambassador's election and Voxe Admin should be able to do this.

No link on the menu anymore

In the front, the left-side menu can't be used to swith from a theme to an other, or from an election to an other election, which was the case before.

Can it be fixed ?

/propositions/search lang parameter

Add a lang parameter to /propositions/search endpoint.

Example :

GET http://voxe.org/api/v1/propositions/search?candidacyIds=4ef479fdbc60fb0004000263&lang=en

Should we consider to read the lang request header or set a default lang (french in v1) ?

[API] /v1/elections/:id/removetag

Return 200 and an empty body, which leads to the error callback with Jquery :

error: (response, status, body) =>
status
"parsererror"
> body
SyntaxError {}
> response.status
200
> response.statusText
"OK"

Edit a country in the BO

It's impossible to :

  • edit a country : change the name, add a picture of it from the BO
  • delete a country.

Voxe Admin should be able to do this.

Changing password is not working

You can't get your password back from /admin/ (the link in the e-mail doesn't work), and there's no link to get your password from the front office (For example in the "Connexion" pop-up).

Handling errors

To open the BO to non-voxe team members, it should give the best UX possible. Then, Backbone should alert when there's a bug or something forbidden for the users.

Currently, the user doesn't know what happens. It just doesn't work. That's it, and it is very frustrating !

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.