{"id":13513909,"url":"https://github.com/thoughtbot/constable","last_synced_at":"2025-03-31T02:33:05.032Z","repository":{"id":26853332,"uuid":"30313192","full_name":"thoughtbot/constable","owner":"thoughtbot","description":"Better company announcements","archived":true,"fork":false,"pushed_at":"2021-10-08T12:18:33.000Z","size":4553,"stargazers_count":514,"open_issues_count":27,"forks_count":57,"subscribers_count":27,"default_branch":"main","last_synced_at":"2024-11-01T17:37:05.545Z","etag":null,"topics":["communication","elixir","elixir-phoenix","thoughtbot","webapp"],"latest_commit_sha":null,"homepage":"https://constable.io","language":"Elixir","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/thoughtbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-04T18:06:33.000Z","updated_at":"2024-10-28T10:43:15.000Z","dependencies_parsed_at":"2022-07-25T16:48:08.911Z","dependency_job_id":null,"html_url":"https://github.com/thoughtbot/constable","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/thoughtbot%2Fconstable","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fconstable/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fconstable/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbot%2Fconstable/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoughtbot","download_url":"https://codeload.github.com/thoughtbot/constable/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246407399,"owners_count":20772126,"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":["communication","elixir","elixir-phoenix","thoughtbot","webapp"],"created_at":"2024-08-01T05:00:39.885Z","updated_at":"2025-03-31T02:33:02.741Z","avatar_url":"https://github.com/thoughtbot.png","language":"Elixir","funding_links":[],"categories":["Elixir"],"sub_categories":["Phoenix"],"readme":"# Constable\n\n**Constable is part of the [thoughtbot Elixir family][elixir-phoenix] of projects.**\n\nConstable is a Phoenix app for posting announcements and having discussions.\nTo learn more about Phoenix, check out [Programming Phoenix](https://pragprog.com/titles/phoenix14/programming-phoenix-1-4/)\n\n## Starting the Console\n\nUse `bin/console` to start the console. Use `bin/console staging|production` to\nstart the console in staging or production.\n\n## Reactivating Users\n\nUsers are deactivated if they leave thoughtbot. Sometimes someone with the same\nfirst name joins thoughtbot later and inherits the deactivated email so we need\nto reactivate the email. There are two ways to reactivate a user: \n\n1. From the browser: \n  * Visit `/user_activations`\n  * Click on Activate the user\n\n2. From the console:\n  * Run `bin/console production`\n  * Run `Constable.User.reactivate(\"person@thoughtbot.com\")`\n\n## Developing the Application\n\nTo set up your development environment, there are a few steps you'll need to\nfollow.\n\n### Install Required Dependencies\n\nYou need to have Erlang, Elixir, Node and ChromeDriver installed. This section\ndescribes the easiest way to do that.\n\nIf you're on OS X and using Homebrew, run `brew install node` to get nodejs.\n\nOnce node is installed, run `npm -g install chromedriver`.\n\nFinally, install the [asdf] package manager, which will read the\n`.tool-versions` file from the repo to install the correct versions of Erlang\nand Elixir. Downloading and installing Erlang might take a while, so be patient\non first run. You should be able to run `asdf install` from the project directly\nto install the required packages.\n\n[asdf]: https://github.com/asdf-vm/asdf\n\n### Configure Your Local Environment\n\nRun:\n\n  ```sh\n  # Will grab all Elixir and NPM dependencies and then setup the database\n  $ bin/setup\n  ```\n\n### Set up local data and env vars for Google OAuth\n\nYou'll want to have certain environment variables and user data set up so you\ncan log into the app locally with your thoughtbot email.\n\nIn `.env`, there are three values that say \"get-from-staging\" - CLIENT_ID,\nCLIENT_SECRET, and HUB_API_TOKEN. Replace these values with the ones from\nstaging. Find them by running `heroku config -r staging`.\n\nYou'll also want to grab the STAGING_DB_ENV_VAR from staging. Run:\n`heroku pg:pull STAGING_DB_ENV_VAR constable_api_development -r staging`,\nwhere the value of STAGING_DB_ENV_VAR is what you got from the heroku config.\nThis will copy the data over so you have example data to work with, including\nyour already existing user account.\n\n### Starting the Phoenix Server\n\nOnce all the dependencies have been installed, you can start the Phoenix\nserver with:\n\n  ```sh\n  $ mix phx.server\n  ```\n\n## Email Templates\n\nYou can edit the email contents from `web/templates/email`.\n\nYou can preview templates by going to `localhost:4000/emails/#{template_name}`.\nYou can find a list of templates in the `EmailPreviewController`.\n\n## Viewing Sent Emails\n\nYou can view sent emails in development by going to `localhost:4000/sent_emails`\n\n## Testing\n\nRun `mix test`\n\n## Static Analysis\n\nRun `mix dialyzer` to run the analysis. The lookup table will be created by this\nprocess. If your dependencies or your elixir version change, delete\n`.dialyzer.plt` and run `mix dialyzer.plt` to rebuild it.\n\nThere are still a lot of warnings that are not fixable, but occasionally some\nreal errors are found by dialyzer\n\n## Deployment\n\n1. If you have not run `bin/setup` yet, run it to add the correct git remotes.\n2. Run `bin/deploy (staging|production)`\n\n## Review Apps\n\nConstable is setup with support for [Heroku Review Apps].\n\nGoogle enforces a white list of OAuth redirect URLs, so for review apps we\nredirect the OAuth flow through the [Constable oauth redirector] which then\nredirects back to the correct review app. This is configured with the\n`OAUTH_REDIRECT_OVERRIDE` environment variable.\n\n[Heroku Review Apps]: https://devcenter.heroku.com/articles/github-integration-review-apps\n[Constable oauth redirector]: https://github.com/thoughtbot/constable-oauth-redirector\n\n## License\n\nConstable is Copyright (c) 2015-2016 Blake Williams, Paul Smith, and thoughtbot,\ninc. It is free software, and may be redistributed under the AGPL license\ndetailed in the [LICENSE] file.\n\n[LICENSE]: /LICENSE\n\n## About thoughtbot\n\n![thoughtbot](http://presskit.thoughtbot.com/images/thoughtbot-logo-for-readmes.svg)\n\nConstable is maintained and funded by thoughtbot, inc.\nThe names and logos for thoughtbot are trademarks of thoughtbot, inc.\n\nWe love open source software, Elixir, and Phoenix. [Work with thoughtbot's\nElixir development team][elixir-phoenix] to design, develop, and grow your\nproduct.\n\n[elixir-phoenix]: https://thoughtbot.com/services/elixir-phoenix?utm_source=github\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbot%2Fconstable","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtbot%2Fconstable","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbot%2Fconstable/lists"}