Skip to content

MrSampy/Shop-Of-Things

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

252 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shop-Of-Things

Concept Idea

Website that offers affordable products and enables users to create recipes instantly. This project aims to address the need for a platform where people can find cheaper products and easily generate recipes.

Description of features

  • The programm was made with an onion architecture.
  • The program was made taking into account all the SOLID principles.
  • The program was made using different patterns.
  • Special features:
    • JWT authentication and authorization.
    • Hashed password with salt.
    • Product recommendation based on the ones you bought.
    • Recipe recommendations based on the foods you have.
    • Using of GUID instead of int one.
    • Get full income of bought and not bought products by category.
    • Get income of products in category in period.
    • Get users with the largest number of uploaded receipts, products and orders.
    • Get the most popular products(products, that users buy more other ones).
    • Get number of products in every category.
    • Get number of users of every age category.

Architecture

Image1

Image2

How to test

File with instructions.

CI/CD

.NET
Short instruction for docker:

  • docker build -t 'image-name' . --no-cache
  • docker run -p 5000:80 -t 'image-name'
  • Link http://localhost:5000/swagger you will have an ability to test api

Requirements

  • NET 6.0 SDK
  • ASP.NET 6
  • IDE for C#(.NET). Rider(preferred) or Visual Studio 2019+

Design Document

See design document.

Authors

Kolosov Serhii — @MrSampy

Contributing

If you have any ideas for improving the program, feel free to add new Issues on the Issues page.

License

Note: This program is distributed under an MIT License.

Difficulties, I have faced

  • I couldn't add authorization and authentication for a long time because all the manuals I read didn't mention the code, which was an important part of my system.
    Startup.cs
 services.AddAuthorization(options =>
            {
                var defaultAuthorizationPolicyBuilder = new AuthorizationPolicyBuilder(
                    JwtBearerDefaults.AuthenticationScheme);

                defaultAuthorizationPolicyBuilder =
                    defaultAuthorizationPolicyBuilder.RequireAuthenticatedUser();

                options.DefaultPolicy = defaultAuthorizationPolicyBuilder.Build();
            });
  • I had some bugs with mapping entities. It was due to function .ReverseMap(). Now I understand, that it will be better to write ways of mapping for every case separately.
  • During testing of Data layer, I face with the problem of tracking of entities. So, the problem was solved by rewriting Update methods.

Future

  1. Add FrontEnd part.
  2. Add more unique features.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors