GithubHelp home page GithubHelp logo

cute-cat-cafe-website's Introduction

Cute Cat Cafe

Backend

handlers/

Contains modules specific to each entity or entity pair.

  • beverage.js: Select, Insert, Update, and Delete queries for Beverages and BeverageIngredients
  • cat.js: Select, Insert, Update, and Delete queries for Cats
  • customer.js: Select, Insert queries for Customers. Contains helper functions for one-way hash on passwords. Select queries for Orders/OrderItems and Reservations for a single customer.
  • order.js: Insert queries for Orders and OrderItems.
  • reservation.js: Select query for available Rooms, Insert query for Reservations.
  • room.js: Select, Insert, Update, and Delete queries for Rooms.

app.js

Main handler for site functionality. Contains all get and post routes.

config.js

Contains connection information to database.

connect.js

Helper function for making a mysql pool connection to a database.

constants.js

Holds the default menu and other variables used across multiple site pages.

util.js

Contains helper functions to be resused by multiple backend functions. Contains the helper for updating the menu for authenticated users.

Frontend

public/

  • css: Custom css and vendor css for imported modules.
  • fonts: Fontawesome for icons used on site
  • images: Images licensed from Shutterstock for the site banner
  • js: Primary handlers for each page on the site
    • main.js: Common functions for all pages such as easing and menu
    • account.js: Get requests or Customer, Reservations, and Orders for a single customer.
    • beverages.js: Get and Post requests for managing Beverages in Admin/Beverages.
    • cats.js: Get and Post requests for managing Cats in Admin/Cats.
    • checkout.js: Grabs session stored cart and makes Post request to populate Orders and OrderItems.
    • ingredients.js: Get and Post requests for managing Ingredients in Admin/Ingredients.
    • menu.js: Get request for populating a menu and session storage for adding items to a cart.
    • reservation.js: Get request for available rooms and then Post to add a Reservation to the database. Support for deleting a Reservation for a Customer.
    • rooms.js: Get and Post requests for managing Rooms in Admin/Rooms.
    • util.js: Helper functions for populating tables and clearing parts of the page used by all pages.

views/

  • layouts/: main.handlebars - Site styling around
  • partials/: footer.handlebars, nav.handlebars - Styling for header and footer for each page.
  • 404.handlebars
  • account.handlebars - Select customer, Select Orders/OrderItems, Select Reservations, Delete Reservations.
  • admin.handlebars - Sub navigation to the four admin pages. Requires authenticated user with isAdmin.
  • beverages.handlebars - Select Beverages, Select Ingredients, Insert Beverages/BeverageIngredients, Update Beverages/Beverage Ingredients. Requires authenticated user with isAdmin.
  • cats.handlebars - Select available Rooms, Select Cats, Insert Cats/Update Rooms, Delete Cats. Requires authenticated user with isAdmin.
  • checkout.handlebars - Insert Orders/OrderItems. Requires authenticated user.
  • index.handlebars - Site index with links to each page.
  • ingredients.handlebars - Select Ingredients, Update Ingredients, Delete Ingredients. Requires authenticated user with isAdmin.
  • login.handlebars - Select existing Customer.
  • menu.handlebars - Select Beverages.
  • register.handlebars - Insert Customer.
  • reservations.handlebars - Select available Rooms in time period, Insert Reservation. Requires authenticated user.
  • rooms.handlebars - Select available Cats, Select Rooms, Insert Rooms/Update Cats, Delete Rooms. Requires authenticated user with isAdmin.

Database

Holds copies of sql files for all of the queries used by the database. Not imported by the backend.

cute-cat-cafe-website's People

Contributors

nanaynaomi avatar sharpstef avatar

Watchers

 avatar

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.