kuryaki / product-message

postscript take home test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Postscript

Environment Setup

https://opensource.com/article/19/5/python-3-default-mac

Run

  1. source venv/bin/activate
  2. pip install -r requirements.txt
  3. flask run

Use Cases

Three Column view

Products List | Messages List | Message Content

design

List Products

  • Each Product displays name, price and a Add Message Button and Text Area, is aligned on the left
  • Each Product on click lists the messages associated on the right

Save Messages

  • A new Message is created bound to a product

List Messages

  • Each message displays its name, on click it populates the rightmost view with the content

Send Message

  • Displays the content of the message with the variables populated
  • Validates the phone number
  • Sends to Twilio

Models

[Product] 1 — * [Message]

Product

  • id
  • name
  • price

Message

  • name
  • content
  • productId (ref)
  • id

TODO

  • Setup environment
  • Create mock routes
  • Create migration to create model
  • Add views from server
  • Create simple HTML UI
  • Seed three products
  • Populate server rendered HTML from models
  • Fix home view
  • Add selected product handler and fix view
  • Add Create Message form handler
  • Add selected message handler and fix view
  • Switch message list depending on product
  • Store a message
  • Make routes work
  • Send Message Through Twilio
  • Organize BE code
  • Add React to UI

About

postscript take home test


Languages

Language:JavaScript 94.3%Language:Python 3.7%Language:HTML 1.8%Language:Mako 0.2%