Giter Club home page Giter Club logo

blazorrestaurant's Introduction

Hello!

Welcome to my GitHub

GitHub followers Twitter Follow YouTube Channel Views YouTube Channel Subscribers

About My GitHub

Here you will find many repositories and samples about some of the best technologies there are: Microsoft .NET, Azure & Unity 3D. I'm Senior Software Engineer with more than 15 years of experience.

You will be able to find my centralized collection of links in here: https://www.allmylinks.com/efonsecabcr

⭐️⭐️⭐️⭐️⭐️

Creator of FairPlayCombined

⭐️⭐️⭐️⭐️⭐️

You can help keep projects free by sponsoring and buying my products

Currently working on

My creations

How to reach me?

Something about me?

  • One of my many dreams is to have my company generating enough revenue to be able to donate generous amounts of money to people in need.

My Stats

Efonsecab's GitHub stats

Top Langs

Stats Powered by https://github.com/anuraghazra/github-readme-stats

blazorrestaurant's People

Contributors

efonsecab avatar luisiitodev avatar pticostarica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

blazorrestaurant's Issues

Create the "Profile" table

Add a new table to the database project. Table name must be "Profile"
Table must have the following columns

  • ProfileId
  • LocationId
  • IOriginatorInfo interface columns

Add List Orders to Admin section

Administrators must be able to see a list of the Orders which have been created in the system

  • Create a OrderController
  • Create a ListOrders endpoint
    • Sort by RowCreationDateTime desc
  • Create the page "/Admin/Orders/List"

Create the "AddLocation" endpint

  • Create a LocationConroller
  • Add a new endpoint named "AddLocation"

The endpoint must receive a LocationModel.
The endpoint must not allow to have more than one Location with IsDefault=true

Add the "List Products" page

Add a new page using the following folder structure "/Admin/Products/List"
Page must be accessible only to users with the "Admin" role.
Page must display products in a two column cards grid, similar to the List of Promos.
Cards must allow show the icons for edit and delete.
Edit will make use navigating to the "Edit Product" page
Delete will show a confirmation window with two buttons 1 for Cancel and one for Delete

Move Add Order to Users section

Currently the Add Order functionality is under the Admin users section.

  • Move the Add Oder to the Users section, keep a similar folder and namespace structure
  • Change the Add Order page authorization to allow only non-admin users to access it.

Add List Orders to Users Section

Non-admin users must be able to List the orders they have created themselves.

  • Create the page "User/Orders/List"
  • Create a ListOwnedOrders endpoint in the OrderController
    • Receives the user's azureObjectId
    • Filters the orders created by the specified user

Add the Delete Product functionality

When in the "List Products" page, admin users must be able to delete a product.
A "Delete" icon must be displayed next to each product.
When hitting the icon, users must be shown a confirmation window with "Cancel" and "Delete" buttons.
Cancel will just close the window a related variables.
Delete will delete the product, clean the variables and reload the data.

Create the "OrderDetail" table

Add a new table to the database project.
Table name must be "OrderDetail"
Table must include the following columns

  • OrderDetailId
  • OrderId
  • ProductId
  • ProductQty
  • LineNumber
  • LineTotal
  • IOriginatorInfo interfaces columns

Add point system for users

Allow for a points-based system.
The points will be exchangeable for discounts in orders.
Use a x10 rate for exchanging points.
The points must expire every 6 months, static datetime. June 1, every year. December 1st every year.

Client Side Error Logging

The must must log all of the errors that occur in the client-side.
The log must have the following information:

  • ExceptionMessage
  • StackTrace
  • PageUrl
  • ApplicationUserId
  • DateTimeOffset (UTC)
  • IOriginatorInfo interface columns

Add the "AddProduct" endpoint

Create a new controller named "ProductController"

Add the "AddProduct" endpoint to the controller.
Endpoint must receive a "ProductModel"

Implement Visitors Tracking

The system must log all of the visits to pages.
The system must log the following information:

  • PageUrl
  • ApplicationUserId
  • IpAddress
  • DatetimeOffset (UTC)
  • IOriginatorInfo interface columns

Enable Azure AD B2C Authorization for Swagger UI

Currently, the app does not have authorization enabled for Swagger UI,
this means only endpoints with AllowAnonymous would work.
We need to enable Authorization from Swagger UI, in order to retrieve the Bearer Token required by tthe API.
Ideal solution:
After clicking the Authorize button in Swagger UI, the window will use an implicit flow and only require you to input
the Username and Password.

Useful links:
https://www.taithienbo.com/configure-oauth2-implicit-flow-for-swagger-ui/
https://jpda.dev/using-nswag-and-swagger-ui-with-b2c
https://joonasw.net/view/testing-azure-ad-protected-apis-part-1-swagger-ui
https://skycliffs.com/2017/10/08/swagger-ui-authentication-with-azure-ad-b2c-on-service-fabric-net-core/
https://stackoverflow.com/questions/40179409/test-a-web-api-aspnetcore-with-swagger-ui-and-azure-ad-b2c
https://daniel-krzyczkowski.github.io/Cars-Island-ASP-NET-Core-API-Secured-By-Azure-AD-B2C/

Add the Order Delivery Map

The system must allow users to see a map with the orders delivery route.
The map must show the correct weather icon for each of the points in the route.

Enable Localization for both the Client and Server apps

The system must allow users to select the language in which they want the site to be displayed.

Make sure all of the requests to the server side, have the correct language header, corresponding to the user selected language.
Make sure the server side changes the thread culture to the culture/language selected by the user in the client-side application.
Make sure all of the text data from the server api is returned in the language selected by the user.

Tracking all API Requests

The system must log all of the API Requests.
The Log must include the following information

  • Client IP Address
  • DateTimeOffset (UTC)
  • RequestUrl
  • RequestHeaders
  • RequestBody
  • ApplicationUserId
  • IOriginatorInfo interace columns

Create the "Manage" page for Products

Create the page page to add products.
Page must be created in the following folder "/Admin/Products/Manage"
Page must be accessible using these routes

  • "/Admin/Products/Manage"
  • "/Admin/Products/Manage/{ProductId:long}"

Restrict the page to be accesible only to uses with the "Admin" role.

Create the CountryController class

  • Create a new controller named CountryController
  • Add an endpoint named ListCountries
    • Must received a parameter named searchTerm. The search will be using StartsWith(searchTerm)
    • Must return the data ordered by Name
  • Create the corresponding Test method for the created endpoint

Create the "Location" table

Add a new table to the database project. Table name must be "Location"

Table must include the following columns

  • LocationId
  • Name
  • Description
  • FreeFormAddress
  • Latitude
  • Longitude
  • ImageUrl
  • IsDefault
  • IOriginatorInfo interface columns

Generate the related entities

Enable support for Azure KeyVault

System is currently using secrets.json for development and appsettings.json for release.

  • Make the server app support AzureKeyVault
    • Support both Certification authentication and Secrets-based authentication.
  • Remove the need to use secrets.json and appsettings.json except for the AzureKeyVault required configuration

Create the "Order" table

Orders will be stored in a table named "Order"

  • Add an "Order" table to the database project. Must include the following columns
    • OrderId
    • DestinationFreeFormAddress
    • DestinationLatitude
    • DestinationLongitude
    • IOriginatorInfo interface columns
  • Create the respective partial class in a file named Order.partial.cs, the class must implement IOriginatorInfo

Create the "Product" table

Add the table "Product" to the database project

Table must have the following columns

  • ProductId
  • Name
  • Description
  • ProductTypeId
  • UnitPrice
  • IOriginatorInfo interface columns

RowCreationUser is always set to "Unknown"

The system automatically fills the Autiding columns defined in the IOriginatorInfo interface.

The class "BlazorRestaurantDbContext.partial.cs" has method "ValidateAndSetDefaults" which is in charge of fill the respective data,
the RowCreation user is retrieved from the Thread, however, the CurrenPrincipal is always set to null, even if the user is
Authenticated.

Expected Result:
The Thread.CurrentPrincipal object has the authenticated user information, including the claims.

Remove "CreatedAt" column from ErrorLog table

ErrorLog table now implements IOriginatorInfo, therefore, the CreatedAt is no longer required.

  • Remove the column from the table, and respective entities and models
  • Regenerate the entities.
  • Remove the column from the models

Enabled support for Role Authorization in API Controllers

Currently the server project only make use of [Authorize] without using Roles.
There is currently an issue when using [Authorize(Roles="RoleName")], probably because the Roles Claims are not been filled

Expected Result

  • The ErrorController must be marked with [Authorize(Constants.Roles.Admin)]
  • The endpoints in that controller must be accessible only to admin users

Create the "ProductType" table

Add a "ProductType" table to the database project.

Table must include the following columns

  • ProductTypeId
  • Name
  • Description

Generate the related entities

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.