# Carbon

User library for phoenix and elixir.


## Installation

Carbon is [available in Hex](, and can be installed as:

  1. Add `carbon` to your list of dependencies in `mix.exs`:

        def deps do
          [{:carbon, "~> 0.1.3"}]

  2. Ensure `carbon` is started before your application:

        def application do
          [applications: [:carbon]]

## Usage

To install carbon in your application 

      mix carbon.install

  Above command generates a migration, that is all you need to install
  Carbon, you can modify the migration to add your custom fields, 
  Carbon only requires following fields

      * email
      * password_hash

  To install and migrate database use --migrate switch

      mix carbon.install --migrate

  configure Carbon

      config :carbon, 
        repo: MyApp.Repo

  Setup a mailer to send out emails, Carbon uses swoosh email library to send out 
  emails, please visit (Swoosh)[] for more details
      config :carbon, Carbon.Mailer,
        adapter: Swoosh.Adapters.Logger,
        level: :debug

  Register Carbon routes in your web/router.ex

      use Carbon.Routes

  Carbon registers few routes, and can be overridden


## Roadmap

We are using carbon in production already, we have plans for 
Carbon some of the stuff in pipeline:

    * generators for migration, controllers, views, models, mailers
    * mailers for welcome,signup,reset emails
    * oauth integration
    * multiple adapter support session,jwt and more
    * and perhaps memberships out of the box

## Contributing

Contributions are welcome! We love you if you send a PR with some tests.

## License

Copyright (c) 2016, al-razi.

Apache 2 License.