Giter VIP home page Giter VIP logo

recipebox's People

Contributors

jaythomas avatar

Stargazers

 avatar

Watchers

 avatar

recipebox's Issues

--yes command line argument

When starting the program for the first time, it will prompt the user to generate several files they don't already have. Life is too short to answer questions sometimes or you just want your server to start from a daemon without the worry of it hanging on prompts. Adding a --yes (-y shorthand) should let you skip all these prompts and automatically generate the necessary templates to run the server.

--threads command line argument

Add a --threads (-t shorthand) command line argument to manually set the number of threads. The default behavior is to not pass a thread count to actix_web, which automatically scales the number of threads to the number of available process cores. This default behavior should be retained.

BLUEPRINTS

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 (#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 (#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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.