HomeUniteUs icon indicating copy to clipboard operation
HomeUniteUs copied to clipboard

07.03 Milestone Tracker | Enhance codebase readability and documentation

Open lasryariel opened this issue 1 year ago • 4 comments

Overview

In order to better engage dev volunteers, especially more junior volunteers, we need to make our codebase more readable and provide better documentation.

Action Items

  • [x] See if there is Hack for La best practices documentation that can help with this effort - Lola to ask Bonnie
    • Website team has some wiki pages we could mimic
    • Heejung Hong could be a resource. Dev for TDM Calculator is good example of team effectively working with jr developers and quality code
  • [x] Add any additional milestones needed below and validate timeline
  • [ ] Commit a dev to attend weekly devops
  • [x] #785 - Ready to discuss with team, Link to page created in Wiki

Backend

6.0.2.1 FastAPI

  • [x] Research
    • [x] #773 - Assigned to John, Tyler to assist
    • [x] #777 - Assigned to Paul
  • [ ] Implementation
    • [x] Tyler to complete big merge of an existing unrelated PR before branching
    • [ ] #788 assigned to Erik
    • [ ] #789 assigned to Paul, John to assist
    • [ ] Erik to open PR to connect frontend
    • [ ] update all 9 controllers see assignment in this comment
    • [ ] rearrange endpoints/controllers as needed
    • [ ] Confirm dependencies are updated for each controller changed
    • [ ] Marshmellow to Pydantic - need to create schemas
    • [ ] Folder structuring
    • [ ] Update build scripts (test scripts)
    • [ ] Update Docker file configuration
  • [ ] documentation
    • [ ] diagram/descriptions
    • [ ] important to document authentication process
    • [ ] identify other key areas to document

RBAC

  • [ ] #774 - Parent Issue (icebox)
    • [ ] #775 - Assigned to Tyler
    • [ ] #776 - Assigned to Erik

Data Modeling/Object Design/Code Cleanup

  • [ ] Create one very clear API method with best practice. Object Design (figma board link)
  • [ ] Cleanup interface oriented patterns on backend (decouple database code from http code) - when we get to this, identify specific areas of code which need to be looked at and assign it out

Documentation

  • [ ] #778
  • [ ] Identify other key areas to document

Onboard backend Devs

  • [ ] Determine how many we need

Frontend

No system in place for adding components/services. (Not a blocker for onboarding resources)

  • [ ] Write documentation
  • [ ] Refactor (file structure/folders)

Github Wiki

  • #381

Developer Experience

Once the items above are complete, we can work on Developer Experience improvements, and potentially recruit a volunteer as a Developer Experience Expert. This would entail improvement to tooling, integrations, unit tests, storybook, Figma integration. We should prioritize items that improve developer efficiency/junior developer accessibility.

Resources/Instructions

lasryariel avatar Aug 29 '24 04:08 lasryariel

have updates in comments

  • #777
  • #773

lasryariel avatar Sep 04 '24 00:09 lasryariel

Positive research outcomes for FastAPI

  • opinionated, but customizable
  • compatible with Flask but faster

Bulk of follow up lift

  • Data Modeling - capture top level entities and related data through Section 2
    • the goal is to have a great example that new devs could be pointed
  • declarative vs imperative code
  • code can be ported as is, but we could convert to the FastAPI conventions for things like RBAC
    • Our current code is "lower level"
    • conversion would be clearer/easier for new devs
    • typing makes tooling integration better (clearer errors, will stop you from running bad code)

Dependency injection helps with refactoring/modularity

Follow up:

  • Convert this to a decision record

Erik on RBAC - looked over sign up/sign in Tyler

  • Wants to do a big merge first of an existing PR Erik
  • Create "trunk-type" branch to split off ("Main-FastAPI"
  • will be using Python Package Manager - Poetry - Python dependency manager - similar to NPM
  • create folder and scaffold - to be used as a starting point
  • start with sign in sign up
  • plug it in with the client, such that you can start the new api and see what is working
  • confirm we are ready to deprecate flask John and Paul
  • Pydantic/Sql Alchemy and dependency injection
  • Look at existing code to see what needs to be ported over - John available to help.
    • Look at configuration injection
    • Sort through to see which items to convert actually give us benefit vs which port over fine without change
    • focus on what adds clarity to the code

Team can focus on this lift (Paul, Erik, John)

Tyler can focus on incubator migration

lasryariel avatar Sep 06 '24 03:09 lasryariel

Endpoints:

  • [ ] /users/{userId}
  • [ ] /serviceProviders
  • [ ] /serviceProviders/{providerId}
  • [ ] /host
  • [ ] /auth/signup/host
  • [ ] /auth/signup/coordinator
  • [ ] /auth/signin
  • [ ] /auth/resend_confirmation_code
  • [ ] /auth/confirm
  • [ ] /auth/signout
  • [ ] /auth/session
  • [ ] /auth/refresh
  • [ ] /auth/forgot_password
  • [ ] /auth/forgot_password/confirm
  • [ ] /auth/user
  • [ ] /auth/private
  • [ ] /auth/google
  • [ ] /auth/google/sign_up
  • [ ] /auth/google/sign_in
  • [ ] /auth/new_password
  • [ ] /auth/invite
  • [ ] /auth/confirmInvite
  • [ ] /forms
  • [ ] /forms/{form_id}
  • [ ] /responses/{f

lasryariel avatar Sep 13 '24 00:09 lasryariel

  • Erik has auth related PR ready for review

  • John working on invite guest end points

  • Paul working on mock local dev environment

  • Erik to review front end for cleanup (file moves, restructure, orphaned components, fastapi compatibility, documentation/best practices)

    • knowledge transfer before Erik starts job on 30th

lasryariel avatar Sep 20 '24 02:09 lasryariel