No coding this episode.
Instead we go through planning our schemas and contexts for a new
Phoenix 1.3 site. As fun as it was making a minimal clone of the Phoenix Framework starting from a Cowboy Server, we need to move faster. Alchemist camp will be adding , and how to divide those schemas into Phoenix 1.3 contexts.
- auth (later moved into a
subscription_plan (obsoleted by Stripe Billing)
- plan_id (generated by Stripe): string
- amount: integer (in cents)
- interval (day|week|month|year)
- rank: int
- id: string
- fullName: string
- winner: bool
- referralCount: int
- campaign: growsurf_campaign
- contact: growsurf_contact (just created one)
- contacts: [growsurf_contact] (all)
entity_plan (plans that grant access to entity)
- pages (mostly default)
As of the time of this writing, most of the above is implemented, except for various events, which are recorded only via logging and sending data to Keen. The main thing that was confusing for people, including myself, moving to Phoenix 1.3, was how to break apps up into contexts. That's really the focus of this episode. In the end, I went with this separation:
Hopefully this episode is useful! If you're looking for text-based resources, I suggest Shankar Devy's mini-book, Blueprint for Phoenix Context. I've since reached out to him and made an affiliate arrangement with him so if you use this link, you'll get the same price, and help support Alchemist Camp in the process.