Lambda Labs 8: Week 2 Recap
Week 2: Working on Finishing Auth0 and Connecting the PDF API
Part 1 - Individual Accomplishments this Week
Paste a link to your whiteboard interview. You may keep this set to private and add your PM, but you are encouraged to set it to unlisted. (Weeks 2-4)
https://www.youtube.com/watch?v=1z78ihvU2_4&feature=youtu.be
Paste your team’s github contribution graph here and indicate your Github Handle (m4rkh0ng) :

Provide a paragraph (5-8 sentences) summarizing the work you did this week, the challenges you faced, the tools you used, and your accomplishments
Over the course of this week, I had worked taking our user's information from the database to the client. In order to accomplish this, we are having Auth0 as a step to ensure that the user information is only being supplied when logged in. Otherwise, the rest of the functionality of the page will remain outside of the user's ability to interact with until they are logged in. Going from the client to Auth0 to the backend to checking that we're logged in to supplying that information back to the client was a tough task, but it was also really rewarding to be able to accomplish.
Alongside thoroughly working on this area of our code, I had also had the opportunity to work on our strategy for working with our PDF API and also re-writing those endpoints to not conflict with the root like they had, previously (something that we learned from last week helped carry over into this week, which was great to be able to confidently point out and change).
Tasks Pulled
List the tasks you pulled this week, and provide a link to the successfully merged PR completing that task and the trello card for that task. You must have at least one front end and one back end. The expected total is 6 with a minimum of 4.
Front End
Ticket 1: Create PrintPdf component to download invoice to PDF file
Github: https://github.com/Lambda-School-Labs/Labs8-AutoInvoicer/pull/39
Trello: https://trello.com/c/AReSwblo/66-create-printpdf-component-to-download-invoice-to-pdf-file
Ticket 2: Connecting Backend, Auth0, and Client
Github: https://github.com/Lambda-School-Labs/Labs8-AutoInvoicer/pull/26
Trello: https://trello.com/c/igderBU3/53-connect-auth0-to-frontend
Ticket 3: Persist user information for Logged-In User
Github: https://github.com/Lambda-School-Labs/Labs8-AutoInvoicer/pull/32
Trello: https://trello.com/c/M6yWBt8H/55-persist-user-information-for-logged-in-user
Back End
Ticket 1: Persist user information for Logged-In User
Github: https://github.com/Lambda-School-Labs/Labs8-AutoInvoicer/pull/32
Trello: https://trello.com/c/M6yWBt8H/55-persist-user-information-for-logged-in-user
Ticket 2: Integrate Database with Auth0 for User Model
Github: https://github.com/Lambda-School-Labs/Labs8-AutoInvoicer/pull/24
Trello: https://trello.com/c/4jTosXc7/37-integrate-database-with-auth0-for-user-model
Ticket 3: Corrected inserting user into mongoDB
Github: https://github.com/Lambda-School-Labs/Labs8-AutoInvoicer/pull/28
Trello: https://trello.com/c/0t5yzYHm/58-make-sure-auth0-is-registering-users-to-mongodb
Detailed Analysis
Pick one of your tickets and provide a detailed analysis of the work you did. This should be approximately ¼ page of text, and at least three screenshots.
https://github.com/Lambda-School-Labs/Labs8-AutoInvoicer/pull/24 https://github.com/Lambda-School-Labs/Labs8-AutoInvoicer/pull/26
While working on connecting the backend, Auth0, and the client, it became apparent to me how a seemingly simple to understand concept of connecting each of these would take an intricate knowledge of each of the moving parts.

This is where we started. Setting the server to save our user to the database, retrieving that user upon sign-in, and getting that information to exist on our client's state was what I had worked on this week. In order to accomplish this, I had replicated what another of our test functions was accomplishing by sending the user information back as a JSON object to our /user endpoint. We created a new endpoint called /reactuserinfo to modify what was happening with the secured() middleware. The redirect was causing errors to be thrown when we were not logged in, as it had been sending a redirect request to the login page through axios when attempting to fulfill the duties of the middleware (to check that the user is logged in, and if not, then redirecting to the login page).

By removing that, instead the check for the user happens and sends back an error property that we then put onto our application state if the user's not logged in. Otherwise, we put the user's properties onto our state for us to use.

It was a lot to work through, and we still have yet to attach the user information that's being brought in to anything that uses it, other than checking that we're logged in and displaying our routes effectively, but it's a big step towards putting the invoices from each particular user in the right space.
Part 2 - Milestone Reflections
Put your response to the weekly question and a link to your team journal assignment here.
As a part of your journal entry, write ¼ to ½ a page reflecting on your experiences working with a team to integrate several servers, pages, APIs, and services into one project. Describe how your pieces of the project interfaced with and integrated with your teammates.
Integrating our server with our database, deploying that via zeit.co, working on the invoice pages, getting the different APIs up and running, and connecting them all together has been highly challenging and really rewarding. I felt like it was a huge boon to be able to pair program this week, for a lot of our group project does require us to communicate on which parts are being built out during which times and who's touching what at what points. This week I'd worked on communicating with everyone on my team in varying degrees to accomplish the main tasks that I had taken on while simultaneously gearing myself towards helping others with their main goals for the week. This kind of midfielding of helping where help was required while also working on my own tasks was really exciting. I felt that my contributions were impactful and meaningful as we integrated different parts of our application. I think the most concrete examples that I can recall were working with members of my team on (1) the integration of our user information from Auth0 and the back-end onto the front-end for displaying data and (2) helping to begin to create endpoints and test our PDF API being able to generate a PDF file from our form data.
As a group, provide links to evidence that:
• Front and back end servers are connected • Users can create accounts and log in through the front end via OAuth • All APIs and services are connected and can be interacted with through the front end. A test message is acceptable to meet this requirement



