-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
outline mvp/lists.md for dwyl/app#271
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Lists | ||
|
||
Our **MVP `App`** already has | ||
much of the basic functionality we need/want | ||
but it's lacking a way to organize | ||
`items` into distinct projects/areas. | ||
Let's fix that by introducing `lists`! | ||
|
||
## Quick Recap | ||
|
||
Until this point we've _deliberately_ kept the `MVP` | ||
as lean as possible to avoid complexity. | ||
The ERD is currently just: | ||
|
||
![erd-before-lists](https://user-images.githubusercontent.com/194400/231414683-6fce1fd8-aead-471d-8789-a4a0111f7ce8.png) | ||
|
||
Just the handful of tables | ||
you've already seen in the previous sections. | ||
|
||
Our reasons for adding `lists` now are: | ||
**a)** Separate `lists` for different areas of life/work is on our | ||
[product roadmap](https://github.com/dwyl/product-roadmap). <br /> | ||
**b)** We want to use `lists` as the basis for organising and | ||
[re-ordering `items`](https://github.com/dwyl/mvp/issues/145). <br /> | ||
**c)** `lists` will unlock other functionalty we have planned | ||
that will make the `App` more _useful_. | ||
|
||
|
||
## Create `Lists` Schema | ||
|
||
Create the `lists` and `list_items` database schemas | ||
with the following | ||
[**`mix phx.gen.schema`**](https://hexdocs.pm/phoenix/Mix.Tasks.Phx.Gen.Schema.html) | ||
commands: | ||
|
||
```sh | ||
mix phx.gen.schema List lists person_id:integer status:integer text:string person_id:integer | ||
mix phx.gen.schema ListItems list_items item_id:references:items list_id:references:lists position:integer person_id:integer | ||
``` | ||
|
||
|
||
At the end of this step, | ||
we have the following database | ||
[Entity Relationship Diagram](https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model) | ||
(ERD): | ||
|
||
![mvp-erd-list_items](here) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Minimum Viable Product (MVP) | ||
|
||
_All_ Apps start with an MVP. | ||
In our case we created a _separate_ repository: | ||
[github.com/dwyl/**mvp**](https://github.com/dwyl/mvp) | ||
so that the most _basic_ version of our `App` | ||
could be used as a reference by other people building MVPs. | ||
|
||
# TODO: | ||
|
||
Lift the contents of | ||
[github.com/dwyl/mvp/BUILDIT.md](https://github.com/dwyl/mvp/blob/7c0a29cfe71582a9aada531af339afdd2734b809/BUILDIT.md?plain=1) | ||
and split it into separate files here in `book`. | ||
See: | ||
[dwyl/mvp/**issues/350**](https://github.com/dwyl/mvp/issues/350) |