Skip to content

Commit

Permalink
create lib/auth/init for #174
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Jan 23, 2022
1 parent 6466f8b commit 70ccc1a
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
39 changes: 39 additions & 0 deletions lib/auth/init/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div align="center">

# Welcome! 👋

![why](https://user-images.githubusercontent.com/194400/150698837-4eab1188-0aae-4dfd-b9c1-56ce0d311d20.png)

</div>

The purpose of the **`Auth` Application**
is to have a complete separation of concerns between
our
[**App**](https://github.com/dwyl/app)
and any Authentication/Authorization code
in order to: <br />

**a)** ***Simplify*** the **code** in the _main_
[**App**](https://github.com/dwyl/app)
because there is no "User Management"
to think about.

**b)** ***Maximize privacy/security*** of any/all **personal data**
that people using our App entrust in us
by storing it in a totally separate
fully encrypted database.

**c)** Minimize the number of environment variables
in the main App so that _anyone_ can run it
from scratch in less than 2 minutes.


For better or worse,
minimizing the number of environment variables
in the _main_
[**App**](https://github.com/dwyl/app)
means they have to go _somewhere_ ...
that somewhere is right _here_!



21 changes: 21 additions & 0 deletions lib/auth/init/init.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
defmodule Auth.Init do
@moduledoc """
Init as it's name suggests initializes the Auth Application
by creating the necessary records in the various tables.
This is the sequence of steps that are followed to init the App:
1. Create the "Super Admin" person who owns the Auth App
based on the `ADMIN_EMAIL` environment/config variable.
> The person.id for the Super Admin will own the remaining records
so it needs to be created first.
2.
"""

def hello do
IO.inspect("hello init")
end
end

0 comments on commit 70ccc1a

Please sign in to comment.