Backend Architecture

This page will explain how the backend code functions to create the functionality of highest level on down.

Highest Level

Cocktail Search (catalogue page) works in this process:

General load

  1. Python queries SQLite for full list of drinks / base liquors
  2. SQLite returns the lists to Python, which are saved into a variable
  3. Python serves the information onto HTML using Flask
  4. Jinja populates the page with drink/base information upon render

User Queries

  1. User enters query into search bar and submits information
  2. HTML sends Python the information using GET and POST
  3. Python captures the query and saves it in a variable
  4. Python queries SQLite for similar drink names as query
  5. SQLite returns the lists to Python, which are saved into a variable
  6. Python serves the information onto HTML using Flask
  7. Jinja populates the page with drink/base information upon render