Skip to content

Commit

Permalink
add orgs, stars & follows schema links #13
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Jun 8, 2024
1 parent c7e251b commit 3271f9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions BUILDIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,13 +425,16 @@ COV FILE LINES RELEVANT MISSED

# 2. Create Schemas to Store Data

This app stores data in two schemas:
This app stores data in **five** schemas:

1. `users` - https://docs.github.com/en/rest/users/users
2. `repos` - https://docs.github.com/en/rest/repos/repos
1. `users` - https://docs.github.com/en/rest/users/users - the GitHub [**`users`**](https://dwyl.github.io/book/auth/07-notes-on-naming.html).
2. `orgs` - https://docs.github.com/en/rest/orgs/orgs - organizations which can have `users` as members and `repositories`.
3. `repositories` - https://docs.github.com/en/rest/repos/repos - the repositories of code on GitHub.
4. `stars` - [https://docs.github.com/en/rest/activity/starring](https://docs.github.com/en/rest/activity/starring?apiVersion=2022-11-28#list-stargazers) - the `stars` (on `repositories`) associated with each `user`.
5. `follows` - https://docs.github.com/en/rest/users/followers - List the `people` a `user` follows

For each of these schemas we are storing
a subset of the data; only what we need right now.
a _subset_ of the data; only what we need right now.
We can always add more later as needed.


Expand All @@ -443,7 +446,9 @@ commands:

```sh
mix phx.gen.schema User users login:string avatar_url:string name:string company:string bio:string blog:string location:string email:string created_at:string two_factor_authentication:boolean followers:integer following:integer

mix phx.gen.schema Repository repositories name:string full_name:string owner_id:integer description:string fork:boolean forks_count:integer watchers_count:integer stargazers_count:integer topics:string open_issues_count:integer created_at:string pushed_at:string

```

At the end of this step,
Expand Down
4 changes: 2 additions & 2 deletions lib/app_web/templates/layout/root.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="csrf-token" content={csrf_token_value()}>
<.live_title suffix="- MyApp">
<%= assigns[:page_title] || "Welcome" %>
<.live_title suffix="- Who?">
<%= assigns[:page_title] || "Welcome!" %>
</.live_title>
<%= render("icons.html") %>
<link phx-track-static rel="stylesheet" href={Routes.static_path(@conn, "/assets/app.css")}/>
Expand Down

0 comments on commit 3271f9c

Please sign in to comment.