Day 01 - Organizations [Phoenix/Elixir]
- Application: Complete and tested with four endpoints
- CI: Complete
- Dev: In-progress
- Production: In-Progress
Our first application's topic was for lawyer organizations, which we decided to build using Phoenix, Ecto and Elixir.
Our first hurdle was understanding the new Phoenix v1-3-0-rc-n file structure changes along with a move away from Models in MVC.
TL:DR - Move
/web into the
lib/ directory of the app and now the generators build a module for fetching
records from the database
Donald Plummer and Matt Purdy were amazing enough to build a phoenix template generator into our avvo-cli library. Though this was helpful we decided an umbrella app was not necessary for such small apps.
Learnings of the day : Add different templates for elixir apps to our cli
Onto the next change: the mix tasks have switched from
mix phoenix.new to the new
mix phx.new that handle
the new directory structure
To use that we had to install the new tasks:
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
jsonapi.org set out a guideline for the 1.0 specifciations which greatly differ from our current schema.
jsonapi.org sample json
"title": "JSON API paints my bikeshed!",
"body": "The shortest article. Ever.",
avvo sample json
There was some debate that we should stay the course with our old schemas, but after looking at the conventions in the Rails and Phoenix communities, we decided to move into the new jsonapi 1.0 specifications.
As expected we ran into issues deploying our application to rancher. I'll be working with our infrastructure team and their new configuration tool they have built to allow self-serve deployments.
Stay tuned for deployment updates.