Code Monkey home page Code Monkey logo

nackademinuppgift07's Introduction

Uppgift 7 - Programmering med C# ASP.NET 1, Nackademin

Assignment

"Build a pizza ordering website using ASP.NET Core, Entity Framework, and Identity. As a user you shall be able to log in and order dishes and gain points for discounts, as well as see previous orders (and their delivery status). As a premium user you shall receive additional discounts. As an admin you shall be able to add new dishes (composed from a list of ingredients), as well as administrate users and orders from all users."


TOMASOS !! ๐Ÿ•

Home page

Home page, shows all blog posts

Website is styled via a heavy combination between Bootstrap 3 and custom CSS. On the home page you can see all available dishes, or choose a category such as Pasta to filter out the rest.

Register user

Register view, create new user

Users are free to register, and will be automatically referred to as "Regular User". An admin must manually promote a user to Premium user (which can be done via the Admin dashboard for Admin users) for the discounts as mentioned in the assignment. The role of admin user is however only gained through manual SQL queries.

The register form contains client-side validation.

Add to card

Home page, add dish to cart

Adding to cart uses AJAX together with a popover to add without reloading the page. The cart is saved in session data (server-side) and will therefore not remain in a new web session.

Order cart

Cart view, order cart

Having items in your cart, you can then order them. As this is a school assignment, this is only fictional. The order is only saved in the database. No payment is done.

You can add dishes to your cart anonymously, but you must have a registered account to be able to order your cart.

Order receipt

Receipt view

After an order you are presented with the receipt. All your receipts can be accessed via a tab in your profile.

All orders has the state of being delivered or not. An order can be marked as "delivered" only by an admin user (via their dashboard). This is to simulate an automatic delivery system which is not in place in this solution.

Discounts

Receipt view from premium user

When ordering you gain points. 1 dish gives 10 points. Upon receiving 100 points you get one dish for free (cheapest dish in your cart).

As a premium user you are granted a discount of 20% when ordering 3 or more dishes at the same time.

Administrate ingredients

List of ingredients, add or remove

As part of the admin dashboard you can add and remove ingredients. You cannot, however, remove ingredients that are used in existing dishes. The ingredients list is used when adding a new dish.

Create/alter dish

Edit dish page

New dishes can be added from the admin dashboard. A dish object contains name, category, description, price, and items from the ingredients.

Database diagram

Database diagram from sqldbm.com

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.