Skip to content

BLUEPRINTS #1

@jaythomas

Description

@jaythomas

General goals

  • Ability to add recipes from the website
  • Page edits are stored on the filesystem. No database.
  • Minimal amount of crates
  • Little-to-no javascript. Vanilla JS where necessary 😉

Features

General site

  • HTTP server - HTTP-only, HTTPS is delegated to your reverse proxy (https://nginx.org/en/)
    • Multi-threaded. Scale to the number of available cores. Option to pass a thread count: --threads / -t (--threads command line argument #3)
    • Option to pass a --port / -p and --host / -h, default to localhost:4000
    • Help option --help
  • Home Page - Design a default home page template that is generated the first time the site is ran
    • If the home page isn't found in the specified directory, prompt the user with a message like "index.xxx (the home page) was not found in directory . Auto-generate one? [y/n]"
    • Have a command like argument -y / --yes to auto-generate without prompt (--yes command line argument #4)
  • Recipe Page - Design a default recipe page template that is generated the first time the site is ran
    • Similar to the home page, prompt the user with a message if there is no recipe template found: "recipe.xxx (recipe page layout) was not found in directory . Auto generate one? [y/n]"

CMS

  • Authentication
  • Index of recipes, pulling markdown files from user-defined folder
  • New Recipe Form - for creating a new recipe page using markdown syntax and saving input to file
    • Should have a text input for the page title.
    • Should have an array of text inputs for the ingredients with a separate field for the amount.
    • Amount should be a selectable unit: "quantity", "cups", "oz", "grams. The reason we record the amount and unit separately is because we can then dynamically convert from one unit to another, or double the recipe size with a simple click of the button when viewing the recipe from the public site.
    • Should have a text input for the page body. Should be plaintext with markdown syntax highlighting.
    • Tags
      • Array of text inputs. User can add or remove tags. Tags are auto-sorted alphabetically.
      • Stretch goal: auto-completion for existing tags
      • Stretch goal: tags can be dragged into a custom sort order. Have button to sort alphabetically
  • Edit Home Page Layout - form for editing the exist home page using a rust templating language
    • Form will have a single plaintext "template" input for writing your own home page.
    • The following variables will be available on the home page initially: recipes (array of recipe objects, each containing recipe.title, recipe.description, recipe.body and recipe.tags which is an array of string tags), tags (dictionary object, each key is a tag and value an array of recipe objects)
    • What templating language to use? slim?
    • Input form should be plaintext. Syntax highlighting would be nice.
    • Stretch goal - preview frame

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions