Skip to content

Instantly share code, notes, and snippets.

@olitreadwell
Last active September 25, 2023 17:42
Show Gist options
  • Save olitreadwell/76a2861de2adb692407d2de4604a84b9 to your computer and use it in GitHub Desktop.
Save olitreadwell/76a2861de2adb692407d2de4604a84b9 to your computer and use it in GitHub Desktop.
2023-09-25-flatiron-acc-phase-5-checklist

Project Requirements

Template

https://github.com/learn-co-curriculum/python-p4-project-template

Checklist

Requirements

  • Flask/Python API

    • SQLAlchemy

    • Models

      • 4 models

        • ? Roles
          • ? one to many User Roles (a user can have one role, a role type can have many users)
          • ? many to many User Roles (a user can have many roles, a role type can have many users)
        • Product
          • ? Product Metadata (one to one with Product)
        • ? User Products
          • ? Review (rating & review info)
          • ? Purchase (date purchased, price paid)
        • Reviews (many to many between Users & Products)
        • User
          • Validations & Constraints
            • email column
              • NOT NULLABLE
              • UNIQUE
              • REGEX to match email pattern
            • phone number column
              • NOT NULLABLE
              • UNIQUE
              • REGEX to match phone number pattern
      • 1 many to many relationship

      • 1 model has all CRUD actions

        • Follows REST routes
        • CREATE
          • GET /resources/new
          • POST /resources/new
        • READ
          • GET /resources (index or show all)
          • GET /resources/<id / name parameter> (get 1)
          • GET /resources/ (get some)
        • UPDATE
          • PATCH /resources
        • DELETE
          • DELETE /resources
      • User can do at least one or some of all CRUD actions on a resource

    • User Auth

      • Validations & Constraints here
        • email looks email
        • phone number looks like phone number for (fake) multi factor auth
        • strong password
          • 8+ characters
          • includes symbol
          • includes number
          • includes upper case letters
          • includes lower case letters
        • password and password confirmation match
      • bcrypt
      • password hashing
        • don't store plain text passwords!
      • Routes
        • GET & POST /sign-up
          • upon success
            • redirect to /login
              • create cookie with email
            • or /dashboard
              • create session with auth
        • GET & POST /login
          • upon success
            • create session
            • redirect to /dashboard
        • POST (?GET) /logout
          • upon success
            • redirect to home page /
            • delete auth session
  • React Frontend

    • connect client and server with fetch()

    • 3 client-side Routes

      • with React Router
        • /sign-up
          • fetch GET .com/api/v1/sign-up
          • fetch POST .com/api/v1/sign-up
        • /login
          • fetch GET .com/api/v1/login
          • fetch POST .com/api/v1/login
        • /dashboard
          • fetch GET .com/api/v1/dashboard
    • Components

      • Nav Bar

      • User Auth

        • register form

          -   [ ] Use Formik library
          -   [ ] email regex & required
          -   [ ] phone number regex & required
          -   [ ] strong password
          -   [ ] Validations on Forms
              -   [ ] matching password confirmation
                  -   [ ] use the right input type
                  -   [ ] use regex for right data types
                  -   [ ] correctly handle error handling
                      -   [ ] on individual inputs
                      -   [ ] on entire form
          
        • login form

          • email regex & required
          • password matches
          • Validations on Forms
            • Use Formik library
              • use the right input type
              • use regex for right data types
              • correctly handle error handling
                • on individual inputs
                • on entire form
      • logged in views

        • dashboard
    • Validations & Constraints

      • Validations on Forms
        • Use Formik library
          • use the right input type
          • check input is right data type (string/number(int))
          • string/number FORMAT validation
            • maybe use regex or built in matchers
          • correctly handle error handling
            • on individual inputs
            • on entire form

Stretch Goals

  • implement something new
    • ? react bootstrap or MaterialUI component library
  • implement useContext or Redux
  • fully deploy and host your project

User Stories

MVP: As a user, I can:
    Sign up for an account,
    Log in to the site & remain logged in,
    Log out,
    View a list of all available products and their respective reviews,
    Create a review for one specific product,
    Modify or delete a review that I left,
    Create a new product listing.
Stretch: As a user, I can:
    View products
    Search products based on their name/category/price
    Filter products based on their average rating.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment