Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Simplify MVP + Update to Phoenix 1.6 #89 #90

Merged
merged 127 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
594e017
nuke previous version of project #89 https://youtu.be/dfbAAiL5ec8?t=63
nelsonic Jun 24, 2022
f22a56c
create .github for CI + Dependabot #89
nelsonic Jun 24, 2022
33efe49
Clarify MVP goal in README.md #89
nelsonic Jun 24, 2022
27001d4
mix phx.new app #89 https://youtu.be/hTGJfRPLe08?t=132
nelsonic Jun 24, 2022
d6ab5ef
restore required deps and aliases https://github.com/dwyl/app-mvp-pho…
nelsonic Jun 24, 2022
cd6b4b1
exclude phoenix files from test coverage #89
nelsonic Jun 24, 2022
e8a6d06
add tailwind to project #89 see: https://github.com/dwyl/learn-tailwi…
nelsonic Jun 25, 2022
3d4712f
Step 2: Add Tailwind CSS #89 as per https://github.com/dwyl/learn-tai…
nelsonic Jun 25, 2022
33e8374
add table of contents #89
nelsonic Jun 25, 2022
c649808
re-create (simplified) schemas #89
nelsonic Jun 25, 2022
bb5d430
changed my mind on using mix phx.gen.html ... very noisy! #89
nelsonic Jun 27, 2022
380acc7
revert mix phx.gen.html as *way* too much unused boilerplate! #89
nelsonic Jun 27, 2022
2025abc
fix merge conflicts #89
nelsonic Jun 27, 2022
ed3ea48
remove package.json, package-lock.json and webpack.config.js 👋 #89
nelsonic Jun 27, 2022
6d24085
re-create schemas for basic MVP #89
nelsonic Jun 27, 2022
5360edd
setup LiveView + update test #89
nelsonic Jun 28, 2022
d913364
Step 1.7: delete page-related files #89
nelsonic Jun 28, 2022
cfb56fa
[WiP] trying to re-org/order the steps #89
nelsonic Jun 29, 2022
9a6925a
list the 3 apps we are combining into one in the MVP #89
nelsonic Jun 30, 2022
f24400a
temporarily remove lists as not yet used! #89
nelsonic Jul 2, 2022
1109962
temporarily remove tags https://github.com/dwyl/app-mvp-phoenix/issue…
nelsonic Jul 2, 2022
65cd445
remove tags from people migration + schema #89
nelsonic Jul 2, 2022
7da2aed
update erd to simplified version https://github.com/dwyl/app-mvp-phoe…
nelsonic Jul 2, 2022
ff3a3cd
remove schema migrations from ERD #89
nelsonic Jul 2, 2022
11472c4
add proposed MVP UX to What? section #89
nelsonic Jul 3, 2022
c74c3fc
fix indent #89
nelsonic Jul 3, 2022
0a772fd
add statuses see: https://github.com/dwyl/statuses/issues/1 #89
nelsonic Jul 4, 2022
fe7d4ca
insert statuses and test person for testing #89
nelsonic Jul 4, 2022
df59990
add tests for item with seed data #89
nelsonic Jul 4, 2022
0e48804
creating items works in the UI but Tailwind not cooperating ... #89
nelsonic Jul 6, 2022
5f3e07e
create Dockerfile for fly.io deploy #89
nelsonic Jul 6, 2022
52f5515
create Dockerfile for fly.io deploy #89
nelsonic Jul 6, 2022
954acd7
fix grammar in README.md
nelsonic Jul 6, 2022
e52e2fb
Merge branch 'phoenix-1.6-2022-refresh-issue-#89' of github.com:dwyl/…
nelsonic Jul 6, 2022
6abfc82
downgrade to previous version of Tailwind ... still not working! #89
nelsonic Jul 6, 2022
4a9cff8
[WiP] trying to get tailwind todo list UI working ... #89
nelsonic Jul 7, 2022
923148c
Making progress on the UI thanks to @RobStallion who has Flex skills!…
nelsonic Jul 8, 2022
850b9fa
getting there with Flexbox ... #89
nelsonic Jul 9, 2022
fe18087
use latest version of statuses https://github.com/dwyl/statuses/issues/4
nelsonic Jul 9, 2022
53a85f1
use latest version of statuses (status.text :atom) https://github.com…
nelsonic Jul 9, 2022
0fd80f1
migrate from status id to status_code ref: https://github.com/dwyl/st…
nelsonic Jul 11, 2022
60aeb1a
bump Elixir version to 1.13.4 (latest) #89
nelsonic Jul 11, 2022
32bce85
bump Erlang/OTP version to 25 see: https://github.com/erlef/setup-bea…
nelsonic Jul 11, 2022
c47f811
add test and code to stop a timer https://github.com/dwyl/app/issues/…
nelsonic Jul 11, 2022
01c191e
Drop database before setup
SimonLab Jul 11, 2022
f39a1b7
Add documentation for running setup
SimonLab Jul 11, 2022
80d4294
create handle_info/2 to handle start|stop event #89
nelsonic Jul 11, 2022
2091967
Merge pull request #96 from dwyl/mix-setup-status-code
nelsonic Jul 11, 2022
017119d
Create ecto custom type for atom
SimonLab Jul 11, 2022
a4dc98e
"fake" timer working #89
nelsonic Jul 11, 2022
2a33aa7
Merge branch 'phoenix-1.6-2022-refresh-issue-#89' of github.com:dwyl/…
nelsonic Jul 11, 2022
422a854
Run seeds with new associations
SimonLab Jul 11, 2022
2538591
Update item status
SimonLab Jul 11, 2022
35898f1
List non deleted item
SimonLab Jul 11, 2022
b057a9c
Update tests linked to status associations
SimonLab Jul 11, 2022
7a28417
Merge branch 'phoenix-1.6-2022-refresh-issue-#89' into ecto-changeset…
SimonLab Jul 11, 2022
e70f48d
Merge pull request #97 from dwyl/custom-atom-ecto-type-#93
nelsonic Jul 13, 2022
dac046d
Merge branch 'phoenix-1.6-2022-refresh-issue-#89' into ecto-changeset…
nelsonic Jul 13, 2022
91bded8
Merge pull request #98 from dwyl/ecto-changeset-associations-#94
nelsonic Jul 13, 2022
b563e64
dont do this https://youtu.be/p8QWtNqQYlE
nelsonic Jul 14, 2022
b35ca04
Merge branch 'phoenix-1.6-2022-refresh-issue-#89' of github.com:dwyl/…
nelsonic Jul 14, 2022
d5ca2ec
remove status schema from project completely #89 https://github.com/d…
nelsonic Jul 14, 2022
4779eb4
Test Item.items_with_timers/1 #89
nelsonic Jul 15, 2022
a2ef2b8
Test Item.items_with_timers/1 #89 passing!
nelsonic Jul 15, 2022
5acc708
fix failing tests due to using SQL query https://github.com/dwyl/app-…
nelsonic Jul 16, 2022
6df3245
add icons to buttons #101 for #89
nelsonic Jul 16, 2022
b821309
minor README.md update #89
nelsonic Jul 16, 2022
1304fdb
implement edit item.text functionality closes #102
nelsonic Jul 16, 2022
2a3521e
create accumulate_item_timers/1 function for #103 + #89
nelsonic Jul 18, 2022
b916b81
Display stopped timers #106 for #89
nelsonic Jul 18, 2022
66105cc
create test for Elixir timer_text(start, stop) #106 / #89
nelsonic Jul 18, 2022
a73d277
use Kernel.trunc/1 instead of round/1 for Math.round in timer_text/2 …
nelsonic Jul 18, 2022
37abb7e
tidy code ahead of Auth #104
nelsonic Jul 19, 2022
594a68c
add contextual comments for #104 / #89 ahead of working on #107 ...
nelsonic Jul 19, 2022
2d60d04
happy path working #107
nelsonic Jul 19, 2022
4078a33
add static Top Nav #108 ahead of auth #104 for #89
nelsonic Jul 19, 2022
2d3af12
add auth_plug #104 for #89 🚀
nelsonic Jul 19, 2022
137525f
update Dockerfile + create fly.toml for Fly.io deploy #109 / #89
nelsonic Jul 20, 2022
01cb648
mix phx.gen.release #109 | #89
nelsonic Jul 20, 2022
7024333
downgrade Elixir version in mix.exs to v1.12.3 for #109 | #89
nelsonic Jul 20, 2022
429acc8
delete elixir_buildpack.config #109
nelsonic Jul 20, 2022
4fe896c
change elixir: "~> 1.12.3", to elixir: "~> 1.12", in mix.exs #109 | #89
nelsonic Jul 20, 2022
7b72277
downgrade TOP version from 25 to 24.1.5 in ci.yml for #109 | #89
nelsonic Jul 20, 2022
9b93fec
add lib/app/release.ex to coveralls.json as not testable! #109 | #89
nelsonic Jul 20, 2022
3b1117a
add [deploy] and [env] to fly.toml (copied from: https://github.com/d…
nelsonic Jul 20, 2022
fdbc400
recreate fly.toml and Dockerfile using fly launch command #109 #89
nelsonic Jul 20, 2022
6c4f183
remove "rounded" from header/nav #108 #89
nelsonic Jul 20, 2022
adb8267
config :logger, level: :debug in prod.exs #109 #89
nelsonic Jul 20, 2022
b62dc0e
create /init endpoint to help debug Fly.io deployment #110 | #109 | #89
nelsonic Jul 20, 2022
437e965
update to latest auth_plug https://github.com/dwyl/app-mvp-phoenix/is…
nelsonic Jul 20, 2022
d8067b2
upgrade fields 2.9.0 => 2.9.1 #109 #89
nelsonic Jul 20, 2022
30d441b
add Apple/Android shortcut icons fixes #111
nelsonic Jul 20, 2022
50dcdd4
simplify nav #108 #89
nelsonic Jul 20, 2022
affdac8
delete Procfile and app.json as no longer using Heroku for the MVP #109
nelsonic Jul 20, 2022
b59dab3
add Fly.io MVP link to README.md https://mvp.fly.dev #109 #89
nelsonic Jul 20, 2022
e1970dc
always retrieve list of items_with_timers based on socket (attempt to…
nelsonic Jul 20, 2022
0d914f5
add GIF of MVP deployed to Fly.io #113 #109 #89
nelsonic Jul 20, 2022
ca10f5d
add valid AUTH_API_KEY to .env_sample using dwylauth.herokuapp.com to…
nelsonic Jul 21, 2022
42a2e7a
simplify How? section removing the need to create your own AUTH_API_K…
nelsonic Jul 21, 2022
bf65127
rip off the baindaid and remove most of the old README.md! https://yo…
nelsonic Jul 21, 2022
67d62bb
Chore: Rename `timer.end` to `timer.stop` fixes #114
nelsonic Jul 22, 2022
c77d43a
implement Person.upsert/1 function for #115
nelsonic Aug 1, 2022
21ac9a8
Use Alpine.js and Tailwind for Textarea size
SimonLab Aug 3, 2022
37c5fb6
Merge pull request #117 from dwyl/auto-resize-textarea
nelsonic Aug 3, 2022
817979f
Merge branch 'phoenix-1.6-2022-refresh-issue-#89' of github.com:dwyl/…
nelsonic Aug 1, 2022
71ca461
replace status_code with status (the original) to match the JWT #89
nelsonic Aug 4, 2022
434246e
udpate erd #89
nelsonic Aug 5, 2022
bb6767d
Merge branch 'phoenix-1.6-2022-refresh-issue-#89' of github.com:dwyl/…
nelsonic Aug 5, 2022
72b1e07
add section on Startup Ideas to README.md #89
nelsonic Aug 5, 2022
42f82ba
replace app-mvp-phoenix with app-mvp for simplicity #89
nelsonic Aug 5, 2022
c231b71
create HOWTO.md for #89
nelsonic Aug 5, 2022
316929c
remove people schema/table from project! #118
nelsonic Aug 5, 2022
1327ed8
update ERD without people https://github.com/dwyl/app-mvp/issues/89#i…
nelsonic Aug 5, 2022
27fb4e1
re-org README sections #89
nelsonic Aug 5, 2022
48325dc
really need someone else to edit this down ... 🙄 #89
nelsonic Aug 5, 2022
8ed2a1f
comment out superfluous sections #89
nelsonic Aug 6, 2022
c5b3af6
rename to BUILDIT.md
nelsonic Aug 6, 2022
93a11b5
final README.md re-org 🤞 #89
nelsonic Aug 7, 2022
ab22844
add initial tests & code to BUILDIT.md for #89
nelsonic Aug 7, 2022
3d7ad64
for some reason coverage has dropped on item.ex and timer.ex ... 🙄 #8…
nelsonic Aug 7, 2022
ed9f208
add TOC to BUILDIT.md #89
nelsonic Aug 7, 2022
5c6eb3c
add remaining code/sections to BUILDIT.md #89
nelsonic Aug 7, 2022
86ae4c0
update TOC #89
nelsonic Aug 7, 2022
6e8694f
fill-in gaps in auth section of build log #89
nelsonic Aug 8, 2022
e6c7ecf
add final GIF to build log https://github.com/dwyl/app-mvp/issues/89#…
nelsonic Aug 8, 2022
c049e3a
Apply suggestions from code review [typo fixes ... thanks @SimonLabon…
nelsonic Aug 8, 2022
8c0545f
add links to Michael Seibel talks on MVP closes #91
nelsonic Aug 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This file excludes paths from the Docker build context.
#
# By default, Docker's build context includes all files (and folders) in the
# current directory. Even if a file isn't copied into the container it is still sent to
# the Docker daemon.
#
# There are multiple reasons to exclude files from the build context:
#
# 1. Prevent nested folders from being copied into the container (ex: exclude
# /assets/node_modules when copying /assets)
# 2. Reduce the size of the build context and improve build time (ex. /build, /deps, /doc)
# 3. Avoid sending files containing sensitive information
#
# More information on using .dockerignore is available here:
# https://docs.docker.com/engine/reference/builder/#dockerignore-file

.dockerignore

# Ignore git, but keep git HEAD and refs to access current commit hash if needed:
#
# $ cat .git/HEAD | awk '{print ".git/"$2}' | xargs cat
# d0b8727759e1e0e7aa3d41707d12376e373d5ecc
.git
!.git/HEAD
!.git/refs

# Common development/test artifacts
/cover/
/doc/
/test/
/tmp/
.elixir_ls

# Mix artifacts
/_build/
/deps/
*.ez

# Generated on crash by the VM
erl_crash.dump

# Static artifacts - These should be fetched and built inside the Docker image
/assets/node_modules/
/priv/static/assets/
/priv/static/cache_manifest.json
3 changes: 1 addition & 2 deletions .env_sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export ALLOW_API_ORIGINS=*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we use this env?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope it's a remnant from the previous version where we had an API and a Frontend UI. 👍
Feel free to remove when you are doing your work. #119

export ENCRYPTION_KEYS='nMdayQpR0aoasLaq1g94FLba+A+wB44JLko47sVQXMg=,L+ZVX8iheoqgqb22mUpATmMDsvVGtafoAeb0KN5uWf0='
export GOOGLE_CLIENT_ID=YourAppsClientId.apps.googleusercontent.com
export GOOGLE_CLIENT_SECRET=SuperSecret
export SECRET_KEY_BASE=2PzB7PPnpuLsbWmWtXpGyI+kfSQSQ1zUW2Atz/+8PdZuSEJzHgzGnJWV35nTKRwx
export AUTH_API_KEY=88SwQGzxQEvo6S9Pu7FZGp9btNo52rVkwtrhyub9i6K6UxVqho9A/88SwQGswuPR1uYWEjFm8tBeHjXQ7LMnc5p6deCs3H2Fb8vbUWf8t/dwylauth.herokuapp.com
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: mix
directory: "/"
schedule:
interval: daily
time: "07:00"
timezone: Europe/London
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Elixir CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
name: Build and test
environment: dwylauth
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
ports: ['5432:5432']
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@885971a72ed1f9240973bd92ab57af8c1aa68f24
with:
elixir-version: '1.12.3' # Define the elixir version [required]
otp-version: '24.1.5' # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: ${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Run Tests
run: mix coveralls.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MIX_ENV: test
AUTH_API_KEY: ${{ secrets.AUTH_API_KEY }}
AUTH_URL: auth.dwyl.com
ADMIN_EMAIL: admin@dwylauth.com
EMAIL_APP_URL: ${{ secrets.EMAIL_APP_URL }}
ENCRYPTION_KEYS: ${{ secrets.ENCRYPTION_KEYS }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
SECRET_KEY_BASE: ${{ secrets.SECRET_KEY_BASE }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

# Continuous Deployment to Fly.io
# https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/
deploy:
name: Deploy app
runs-on: ubuntu-latest
needs: build
# https://stackoverflow.com/questions/58139406/only-run-job-on-specific-branch-with-github-actions
if: github.ref == 'refs/heads/main'
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions@1.1
with:
args: "deploy"
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

Loading