Giter VIP home page Giter VIP logo

constable's Introduction

Constable

Constable is part of the thoughtbot Elixir family of projects.

Constable is a Phoenix app for posting announcements and having discussions. To learn more about Phoenix, check out Programming Phoenix

Starting the Console

Use bin/console to start the console. Use bin/console staging|production to start the console in staging or production.

Reactivating Users

Users are deactivated if they leave thoughtbot. Sometimes someone with the same first name joins thoughtbot later and inherits the deactivated email so we need to reactivate the email.

Developing the Application

To set up your development environment, there are a few steps you'll need to follow.

Install Required Dependencies

You need to have Erlang, Elixir, Node and ChromeDriver installed. This section describes the easiest way to do that.

If you're on OS X and using Homebrew, run brew install node to get nodejs.

Once node is installed, run npm -g install chromedriver.

Finally, install the asdf package manager, which will read the .tool-versions file from the repo to install the correct versions of Erlang and Elixir. Downloading and installing Erlang might take a while, so be patient on first run. You should be able to run asdf install from the project directly to install the required packages.

Configure Your Local Environment

Run:

# Will grab all Elixir and NPM dependencies and then setup the database
$ bin/setup

Starting the Phoenix Server

Once all the dependencies have been installed, you can start the Phoenix server with:

$ mix phx.server

Email Templates

You can edit the email contents from web/templates/email.

You can preview templates by going to localhost:4000/emails/#{template_name}. You can find a list of templates in the EmailPreviewController.

Viewing Sent Emails

You can view sent emails in development by going to localhost:4000/sent_emails

Testing

Run mix test

Static Analysis

Run mix dialyzer.plt to build the lookup table for static analysis. Then run mix dialyzer to run analysis. If your dependencies or your elixir version change, delete .dialyzer.plt and run mix dialyzer.plt to rebuild it.

There are still a lot of warnings that are not fixable, but occasionally some real errors are found by dialyzer

Deployment

  1. If you have not run bin/setup yet, run it to add the correct git remotes.
  2. Run bin/deploy (staging|production)

Review Apps

Constable is setup with support for Heroku Review Apps.

Google enforces a white list of OAuth redirect URLs, so for review apps we redirect the OAuth flow through the Constable oauth redirector which then redirects back to the correct review app. This is configured with the OAUTH_REDIRECT_OVERRIDE environment variable.

License

Constable is Copyright (c) 2015-2016 Blake Williams, Paul Smith, and thoughtbot, inc. It is free software, and may be redistributed under the AGPL license detailed in the LICENSE file.

About thoughtbot

thoughtbot

Constable is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software, Elixir, and Phoenix. Work with thoughtbot's Elixir development team to design, develop, and grow your product.

constable's People

Contributors

adrianrogowski avatar bbwharris avatar blakewilliams avatar croaky avatar davidkuhta avatar dependabot-support avatar dependabot[bot] avatar derekprior avatar dnnx avatar drapergeek avatar enatario avatar gabebw avatar germsvel avatar gfontenot avatar iancanderson avatar iwz avatar jakecraige avatar joelq avatar joshuaclayton avatar kenyonj avatar mborsare avatar mjankowski avatar paulcsmith avatar romulomachado avatar ryancoughlin avatar setphen avatar sviccari avatar tjmw avatar tute avatar tysongach 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.