Day 4

(Mostly) In-Order Task Log from Today:

  • Installed Docusaurus, SwiftDocs, and Jazzy
  • Docusaurus works and is showing blogposts on website
  • Added Jazzy to Docusaurus
  • Added ref.stockmanager.tech to point to stockmanagerref.onrender.com
  • Added docs.stockmanager.tech to point to stockmanagerdocs.onrender.com
  • I learned how to write in markdown for the first time, and then retroactively wrote the day 3 post
  • More research into CI/CD, Circle CI seems like the product that will most align with our goals, but it is $30 a month. It will require more research before trying as they don't have a free trial, nor does their free plan allow macOS.
  • Jenkins may also work, but it requires local download and is not easy to integrate Deployment. Travis CI requires payment for allow private Github repos and if we are paying, Circle CI looks more effective for half the price.

Major Takeaways:

Continuous Integration and Deployment are tough to understand thoroughly, and all examples/documentation online show one basic example

Day 3

(Mostly) In-Order Task Log from Today:

  • Upgraded from Vapor 3 to Vapor 4
  • Added two Github repos multiple times trying to inject swift dependencies using private repos.
  • Developed multiple models in Fluent which is an ORM framework to convert models to JSON objects
  • Attempted to send models to API, but API did not recognize the models
  • Installed Postman for purposes of testing API calls
  • Tested two API calls (getItems and postItems). We were able to connect to the API and get responses including this:
{
"reason": "Unsupported Media Type",
"error": true
}
  • Started researching continuous integration and understanding what it is/how it works. Searched for different products and are considering Travis CI and Jenkins
  • Researched deploying through CI products in order to keep everything under "one roof"

Major Takeaways:

Continuous Integration is messy and will take much trial and error to successfully manage our workflow

Day 2

(Mostly) In-Order Task Log from Today:

  • Got things back up and running with a new project on a new Heroku pipeline. Added yesterday's files and things are working as of now.

  • Sent this document into a separate Github repo to keep app building and documenting separate.

Major Takeaways:

Definitely sticking to Vapor 3 while the Vapor crew figures out some inconsistencies in the Heroku buildpack in v4.

Day 1

(Mostly) In-Order Task Log from Today:

  • Installed Vapor CLI for Vapor Server-side Swift (referring to the Swift language - www.swift.org)

  • Installed Heroku CLI for Web App Deployment Hosting

  • Initiated Heroku Web App (API Template) at a temporary domain

  • Installed Heroku buildpack for Vapor

  • Deployed Vapor Hello World Build to a local git repository, then pushed it to two remotes: Heroku and Github.

  • Modified Vapor build to respond to a custom API call.

  • Added first test cases to the test folder to ensure testing was up and running.

  • Added first dependency outside of Vapor to ensure Heroku would compile (took a few tries). More specifically, the package was SwiftMarkdown, allowing Strings containing markdown syntax to be easily converted to HTML in a one-liner. Not using it yet, but needed something outside of the Vapor realm to test dependencies. Can always remove later.

  • Linked custom domain stockmanager.tech to Heroku by adding the required DNS record to the cPanel of the domain registrar account at .tech domains (type "get.tech" to see their website).

  • Added dependency to Vapor-Leaf to render HTML files at runtime. Handles the HTML boiler-plate for us to keep us focused on the Swift code. Then added the first .leaf file "home.leaf" (this) to temporary place to put the project title and the change log (for now...). Got this passing. saved, and all committed to Github and Heroku.

  • Began a Trello board (task management) to keep track of what needs done around the app.

  • Started composing an email to Dr. Ramirez to update him on us being safe in the midst of the pandemic and that (we hope) we are already off to a good start. ✅

  • Edited this file some more and did the smallest amount of styling so that the page content only spans a max of 400px wide

  • Then I got this lovely error. I messed up by telling Xcode to update swift package dependencies, now "version solving failed". Will have to deploy a new vapor project tomorrow with two new remote repos. Better to make that mistake on Day 1 than Day 20, learned a good lesson.

remote: error: because Core 3.4.0..<3.7.0 depends on swift-nio 1.8.0..<2.0.0 and Core 3.7.0..<3.9.0 depends on swift-nio 1.12.0..<2.0.0, Core 3.4.0..<3.9.0 requires swift-nio 1.8.0..<2.0.0.
remote: And because Core >=3.9.0 depends on swift-nio 1.14.1..<2.0.0 and leaf 3.0.1..<4.0.0-alpha.1 depends on core 3.4.1..<4.0.0, leaf 3.0.1..<4.0.0-alpha.1 requires swift-nio 1.8.0..<2.0.0.
remote: And because no versions of leaf match the requirement 4.0.0-alpha.1..<4.0.0 and Vapor >=4.0.0-beta.3.11 depends on swift-nio 2.13.1..<3.0.0, leaf is incompatible with vapor.
remote: And because root depends on vapor 4.5.1..<5.0.0 and root depends on leaf 3.0.2..<4.0.0, version solving failed.
remote: ! Push rejected, failed to compile Swift app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to infinite-retreat-97537.
remote:
To https://git.heroku.com/infinite-retreat-97537.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/infinite-retreat-97537.git'

Excited to be coding in Swift, not excited about getting Vapor "Services" up and running to call our APIs to make things work. Need to be careful with Swift dependencies, boy are they sensitive with version conflicts when they are really interdependent like those from the Vapor moderators and Vapor Community. Bare with us while we format this log to best suit the needs of the project.