Coder Social home page Coder Social logo

andyjliang / disclosure-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from caciviclab/disclosure-frontend

0.0 2.0 0.0 2.08 MB

open disclosure frontend app

Home Page: http://disclosure.caciviclab.org/

License: MIT License

JavaScript 77.19% CSS 10.46% HTML 11.77% Shell 0.58%

disclosure-frontend's Introduction

Build Status

Open Disclosure California

This is the front-end AngularJS application for viewing ballot measure funding data. This front-end application works from an API defined by the back-end Django application

Contributing

Tests

Don't forget to run the tests.

$ npm test

Where does the data come from?

The data comes from the disclosure API. The API is incomplete, but the repo has useful information about what the models are shaping up like, even for incomplete APIs. Ballot models are separate from finance data, since that's how the data is ingested, but eventually should be combined for the frontend views.

Links

Url Description
disclosure-backend Disclosure API repo.
Disclosure API Documentation for the disclosure API.
Disclosure Admin Admin interface for entering ballot data.

Testing against a development backend

If you want to test against a development backend, you can set an environment variable

$ DISCLOSURE_SWAGGER_SPEC='http://localhost:8000/docs/api-docs/' gulp build

And the tests

$ DISCLOSURE_SWAGGER_SPEC='http://localhost:8000/docs/api-docs/' gulp test

Setup Instructions

  1. Install the LTS version of node.js
  2. Install gulp.js (npm install -g gulp)
  3. Clone the repository.
  4. Run: npm install from inside the repository directory, to install all project dependencies.
  5. Run gulp build (in most cases, gulp alone will be enough; gulp build rebuilds static files).
  6. Open http://localhost:5000 in your browser

To tweak the install,

  • Edit gulpfile.js to change the port.

To point this front-end to another (e.g. local test) back-end:

  • Run python manage.py runserver from your back-end repo; this should start your back-end server on port 8000.
  • Edit app/app-init.js, set $rootScope.swaggerSpec = 'http://127.0.0.1:8000/docs/api-docs/';.

Contributing

This project is open source so collaboration is welcome.

A brief guide:

  • If you see a way to improve something in this project, please feel free to open a Pull Request to the develop branch so we can discuss your code.
  • Review our docs for contributing to learn more about the application structure, coding style, etc.
  • Run npm test before submitting a pull request.

Learning Resouces

Deployment

Travis will deploy the master branch to Github Pages. You shouldn't need to manually deploy but, here are the instructions.

To deploy, just set a personal access token via GITHUB_TOKEN in your environment and run the deploy script. The script will build your working directory as is, and push it to Github pages.

$ GITHUB_TOKEN=<your personal token> ./deploy.sh

disclosure-frontend's People

Contributors

adborden avatar jnmarcus avatar bcipolli avatar tdooner avatar ajmobidesign avatar evanwolf avatar

Watchers

James Cloos avatar Andy Liang avatar

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.