{"id":19124074,"url":"https://github.com/efforg/action-center-platform","last_synced_at":"2025-05-15T15:08:15.727Z","repository":{"id":32938340,"uuid":"36534353","full_name":"EFForg/action-center-platform","owner":"EFForg","description":"The EFF Action Center Platform","archived":false,"fork":false,"pushed_at":"2025-04-23T00:16:33.000Z","size":5908,"stargazers_count":477,"open_issues_count":106,"forks_count":63,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-04-23T01:19:42.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EFForg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-05-29T23:27:28.000Z","updated_at":"2025-04-22T07:20:43.000Z","dependencies_parsed_at":"2024-01-18T04:55:21.164Z","dependency_job_id":"f349817a-ceb7-451b-b998-e7c8ece36d5c","html_url":"https://github.com/EFForg/action-center-platform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFForg%2Faction-center-platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFForg%2Faction-center-platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFForg%2Faction-center-platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFForg%2Faction-center-platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EFForg","download_url":"https://codeload.github.com/EFForg/action-center-platform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254364270,"owners_count":22058878,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T05:28:04.172Z","updated_at":"2025-05-15T15:08:10.719Z","avatar_url":"https://github.com/EFForg.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/EFForg/action-center-platform.svg?branch=master)](https://travis-ci.org/EFForg/action-center-platform)\n\n\nAction Center Platform\n======================\n\nThe Action Center Platform is an online organizing tool maintained by [EFF](https://www.eff.org/). Administrators can create targeted campaigns where users sign petitions, contact legislators, and engage on social media.\n\n\n## Setup\n\nFollow these instructions to run the Action Center using Docker (recommended). To run the Action Center without Docker, see [setup without Docker](https://github.com/EFForg/action-center-platform/wiki/Setup-without-Docker).\n\n1. Install Docker ([instructions](https://docs.docker.com/engine/installation/)) and Docker Compose ([instructions](https://docs.docker.com/compose/install/)).\n2. `git clone https://github.com/EFForg/action-center-platform.git`\n3. Copy `docker-compose.yml.example` to `docker-compose.yml`, and `.env.example` to `.env`. Fill in the variables in `.env` according to the instructions in that file. See [notable dependencies](#notable-dependencies) for hints.\n4. Build the docker image: `sudo docker-compose build`\n5. Run the application: `sudo docker-compose up`\n6. In a new tab, get a bash shell with access to your app: `sudo docker-compose exec app bash`.\n    1. If you aren't running migrations automatically, run `rake db:migrate` to migrate the database.\n    2. Run `rake congress:update` to populate CongressMember table.\n\n\n### Notable Dependencies\n\n* Amazon S3 secret key and key id\n  * Allows admins to upload images for the ActionPages\n* [SmartyStreets API](https://smartystreets.com/account/create) key and id\n  * Allows Congress members to be looked up for users\n* [Phantom of the Capitol](https://github.com/efforg/phantom-of-the-capitol) whitelisting on server side?\n  * Allows users to submit e-messages to congress\n* [Call Congress](https://github.com/EFForg/call-congress) url and API key\n  * Connects calls between citizens and their congress person using the Twilio API\n\n\n## Using the Action Center\n\nAction Center administrators can create four types of actions:\n* **Call Action**\n  * A user is connected to a political leader by phone, leaving a message or sometimes speaking to an aid.\n  * The user is shown a script to read and enters their phone number and email\n  * When they submit their info, they are called and the process begins.\n* **Congress Action**\n  * A user stepped through a four-part form to submit their comments to their congress person.\n  * Page 1 asks for the user's street address and zip code.\n  * Based on this information, page 2 displays the user's representatives. User can select which representatives they wish to contact. Then they choose what to fill in for whatever required fields for each representative selected.\n  * Page 3 asks the user to customize the message to be delivered.\n  * Page 4 is the Thank You page with share links for social media.\n  * When creating the action, admin can choose House, Senate, Both or specific legislators\n* **Petition Action**\n  * A user signs a petition, leaving an email address and sometimes location data.\n  * Optionally, users can petition local institutions (like universities) and see signatures by institution.\n* **Tweet Action**\n  * A user is invited to join a tweet action using their twitter account.\n* **Email Action**\n  * A user e-mails a target *or*\n  * A user submits comments to a congressperson via [Phantom of the Capitol](https://github.com/efforg/phantom-of-the-capitol).\n\n### Shared Elements of All Actions\n\n* User is presented with a Thank You page at the end where they are invited to share the action via social media.\n* When creating an action, admin can add partner organizations.\n* Admin can also customize share messages and thank you email.\n* Admin chooses a banner image form the library\n* The title for the action form is always \"Take Action\".\n\n### Administering Users\n\nTo get started using the Action Center, create a user and grant them admin privileges. Administrators can create, track, and manage campaigns.\n\n**To create an admin user**:\n\n1. If the user doesn't exist yet, create them through the web interface by following the `register` link in the top nav.\n2. Run the rake task to grant them admin access (including square brackets):\n```\nrake users:add_admin[youremail@example.org]\n```\nNew users will need to complete an e-mail confirmation in order to log in. Administrators can access admin features by clicking `admin` in the nav.\n\n**To remove an admin user**:\n```\nrake users:remove_admin[youremail@example.org]\n```\n\n**To list all admin users**:\n```\nrake users:list_admins\n```\n\n### Delayed Jobs and Cron\n\nAction Center uses [DelayedJob](https://github.com/collectiveidea/delayed_job) to perform certain tasks outside of a web request context. See that repository for information regarding how to run a delayed job worker. If you are deploying with Docker, our [docker-compose.yml.example](https://github.com/EFForg/action-center-platform/blob/master/docker-compose.yml.example) shows how to create a service which processes the job queue indefinitely.\n\nYou may also want to automate certain other tasks (such as `rake signatures:deduplicate` and `rake congress:update`) to run occasionally. For those deploying with Docker, docker-compose.yml.example illustrates how to create a service which runs these commands periodically using cron.\n\n### Embedding Actions\n\nEmbedding actions is simple. Just include the following HTML on the page you want the action to be embedded:\n\n    \u003cscript type=\"text/javascript\" src=\"https://act.eff.org/action/embed\"\u003e\u003c/script\u003e\n    \u003ca class=\"action-center-widget\" href=\"https://act.eff.org/action/shut-the-nsa-s-backdoor-to-the-internet\"\u003eTake part in the action!\u003c/a\u003e\n\nThe link href should point to the action page you wish to embed. You may add `?nosignup=1` to the URL to get newsletter signup fields omitted from the action.\n\nIf you want to get fancy, you can modify the embed code to include some of the following parameters, all of which are optional:\n\n    \u003cscript type=\"text/javascript\"\u003e\n        var ac_embed = {};\n        ac_embed.css = \"https://example.com/hello.css\"; // specify a css file url. File must be globally available (i.e. on the Internet, not local or staging).\n        ac_embed.width = 500; // specify a width manually\n        ac_embed.no_css = true; // remove all default styles\n        ac_embed.css_content = \"#some_elem\"; // specify an element which itself contains some styles\n        ac_embed.bioguide_ids = [\"ID1\", \"ID2\"...] // bioguide IDs of congress members to target\n    \u003c/script\u003e\n    \u003cscript id=\"some_div\" type=\"text/x-css-content\"\u003e\n        body{\n            background-color: blue;\n        }\n    \u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"https://act.eff.org/action/embed\"\u003e\u003c/script\u003e\n    \u003ca id=\"action-center-widget\" href=\"https://act.eff.org/action/shut-the-nsa-s-backdoor-to-the-internet\"\u003eTake part in the action!\u003c/a\u003e\n\n\n## Testing\n\nTo run the full test suite, simply run `rake` with no arguments.\n\nRspec tests are used for unit testing the app, and some integration testing. Cucumber tests are used for testing API keys, javascript tests, and feature tests.\n\nWe use [WebMock](https://github.com/bblimke/webmock) to stub backend requests to third party services and [Puffing Billy](https://github.com/oesmith/puffing-billy) to stub frontend (Ajax) requests. Puffing Billy will [cache](https://github.com/oesmith/puffing-billy#caching) unrecognized requests and play them back during future test runs. To prevent Puffing Billy from making any new requests, set `DISABLE_PUFFING_BILLY_REQUESTS=true`.\n\n## Linting\n\n`rake` will also run our linting:\n\n### [Rubocop](https://github.com/bbatsov/rubocop)\nRubocop checks for consistent style across the Ruby areas of the codebase.  We use a modified version of [Rubocop-Github](https://github.com/github/rubocop-github) to stay consistent with [SEC](https://github.com/EFForg/sec).\n\n### [Sass Lint] (https://github.com/sasstools/sass-lint)\nSass-lint checks for consistent style across the stylesheets. Our\n.sass-lint file is derived from [SEC](https://github.com/EFForg/sec).\n\n## Deployment\n\nFor notes related to deploying Action Center in production, see [the project wiki](https://github.com/EFForg/action-center-platform/wiki/Deployment-Notes).\n\n## Acknowledgements\n\nThis project was created by Lilia Kai, Thomas Davis, and Sina Khanifar. Large portions of the codebase are directly attributable to them, while under the employ or contractorship of the Electronic Frontier Foundation in 2014. Thank you Lilia, Thomas, and Sina! The Action Center is currently maintained by the EFF Engineering and Design team.\n\n\n## Styling\n\nThe styling is done with SCSS. The partials files are in the stylesheets directory. Admin files are in their own subdirectory.\n\nBootstrap is also used for much of the styling. Please see the stylesheets/application/bootstrap-custom.scss for what styles may be used.\n\nBootstrap is used only for styling, not for javascript.\n\n## File Structure\n\n* The home page layout is in views/welcome/index.html.erb.\n* The main internal layout is in views/layouts/application.html.erb.\n* Individiual action views are in views/tools/.\n* User pages are in views/devise.\n* All admin layouts are in views/admin.\n\n\n## Licensing\n\nSee the `LICENSE` file for licensing information. This is applicable to the entire project, sans any 3rd party libraries that may be included.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefforg%2Faction-center-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefforg%2Faction-center-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefforg%2Faction-center-platform/lists"}