Git Product home page Git Product logo

tilex's Introduction

Tilex - Today I Learned in Elixir

CircleCI Coverage Status

Today I Learned is an open-source project by the team at Hashrocket that catalogues the sharing & accumulation of knowledge as it happens day-to-day. Posts have a 200-word limit, and posting is open to any Rocketeer as well as select friends of the team. We hope you enjoy learning along with us.

This site was open-sourced as a window into our development process, as well as to allow people to experiment with the site on their own and contribute to the project.

We originally implemented Tilex as hr-til, a Ruby on Rails app.

Installation

If you are creating your own version of the site, fork the repository.

Then, install Erlang, Elixir, Phoenix, and PostgreSQL.

Next, follow these setup steps:

$ git clone https://github.com/hashrocket/tilex
$ cd tilex

At this point you can use make for development commands. To access make help just type: make or make help. Then you can run make with target(s) such as: make setup server and so on. Environment variables will automatically loaded from .env file in case you need to change it.

$ make
$ make setup server

Or run commands manually. To set environmental variables, copy the example file:

$ cp .env{.example,}

For setting up the project and start the server manually run:

$ source .env
$ mix deps.get
$ mix ecto.setup
$ npm install --prefix assets
$ mix phx.server

If you'd like to skip the database seeds, run mix ecto.create && mix ecto.migrate in place of mix ecto.setup.

Now you can visit localhost:4000 from your browser.

To serve the app at a different port, include the PORT environment variable when starting the server:

$ PORT=4444 mix phx.server

Authentication

Authentication is managed by Ueberauth and Google. See the ueberauth_google README and Google Oauth 2 docs for setup instructions. To allow users from a domain and/or comma separated whitelist, set those configurations in your environment:

# .env

export GOOGLE_CLIENT_ID="your-key.apps.googleusercontent.com"
export GOOGLE_CLIENT_SECRET="yoursecret"
export HOSTED_DOMAIN="your-domain.com"
export GUEST_AUTHOR_WHITELIST="[email protected], [email protected]"

Once set, visit localhost:4000/admin and log in with an email address from your permitted domain.

Tilex creates a new user on the first authentication, and then finds that same user on subsequent authentications.

Testing

Wallaby relies on ChromeDriver; install it via your method of choice.

Run the tests with:

$ make test

or:

$ mix test

Deployment

Hashrocket's Tilex is deployed to Heroku. These are Hashrocket's deployed instances:

This project contains Mix tasks to deploy our instances; use as follows:

$ mix deploy <environment>

Contributing

Please see CONTRIBUTING for more information.

Code of Conduct

This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct. Please see CODE OF CONDUCT for more information.

Usage

We love seeing forks of Today I Learned in production! Please consult USAGE for guidelines on appropriate styling and attribution.

License

Tilex is released under the MIT License. Please see LICENSE for more information.


About

Hashrocket logo

Tilex is supported by the team at Hashrocket, a multidisciplinary design and development consultancy. If you'd like to work with us or join our team, don't hesitate to get in touch.

tilex's People

Contributors

jwworth avatar tmock12 avatar dependabot-preview[bot] avatar chriserin avatar hashrocketeer avatar dependabot-support avatar vnegrisolo avatar dkarter avatar jbranchaud avatar bobek avatar hashchriserin avatar romul avatar codyjroberts avatar suzanne606 avatar jc00ke avatar josevalim avatar gonglexin avatar sngeth avatar dependabot[bot] avatar

Watchers

James Cloos 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.