Skip to content

milyo001/Footwear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Footwear - Brief Information

πŸ‘ž An open source e-commerce web application build with Angular 11 and ASP .NET Core (using .NET 5) RESTful Web API. The applicaiton is build with desktop first aproach, but it's fully responsive (with the help of bootstrap 4 grid system, Angular Material UI and CSS Flexbox and Grid).

πŸ“‚ The architecture is a simple "all-in-one" monolith application (entire application is deployed as a single unit). That means as the project's size and complexity grows, the number of files and folders will continue to grow as well. The "all-in-one" pattern is used just because I am developing the project to practice my skills and for fun.

πŸ“ The application contains few products manually seeded in the database(I will build admin panel soon), which users can select, pick a size and add to a cart. Then the user can review the products in the cart and increase/decrease product quiantity or delete the product from cart. Then next step is to select delivery address(or import the data from your account's address) and choose payment. The Payment type is cash on delivery or with a credit/debit card (using the Stripe API). After order is made, the user can see all(current/past or delivered) orders, send an sample invoice email and view order details.

🎁 The application is made mostly for fun and it's usage is not commercial, feel free to copy, download or clone the repo or get some sample code.

Guide / How to run locally on your machine

  1. Download/Clone the repository
  2. Open the API folder and create appsettings.development.json and appsettings.production.json(optional) (present in .gitignore file so you have to create them manually) Example below (replace <<>> with your value):
{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "ConnectionStrings": {
    "DefaultConnection": "<<DATABASE CONNECTION STRING>>"
  },
  "AllowedHosts": "*",
  "AllowedOrigins": {
    "StripeUrl": "https://checkout.stripe.com/",
    "ServerUrl": "https://localhost:44365",
    "ClientUrl": "http://localhost:4200"
  },
  "ApplicationSettings": {
    "ApiUrl": "https://api.testfootwearapp3.azurewebsites.net",
    "ClientUrl": "https://testfootwearapp3.azurewebsites.net",
    /* Change the api and client url to localhost:<<your port>> */
    "EncryptionKey": "MbQeShVmYq3t6w9z$C&F)J@NcRfUjWnZ,
    /* Or generate one here(select 256-bit key): https://www.allkeysgenerator.com/Random/Security-Encryption-Key-Generator.aspx */
    "JWT_Secret": "<<YOUR JWT SECRET KEY HERE>>",
    /* You can get your unique key here: https://jwt.io/introduction */
    "Stripe_Secret": "<<YOUR STRIPE SECRET KEY HERE>>"
    /* You can get your unique key here: https://stripe.com/docs/keys */
  },
  "MailSettings": {
     /* I am using ethereal fake SMTP, you can generate your own fake account here: https://ethereal.email/create */
    "Mail": "assunta.kohler67@ethereal.email",
    "DisplayName": "Assunta Kohler",
    "Password": "TuYAVeQbKGZmqEbsMM",
    "Host": "smtp.ethereal.email",
    "Port": 587
  }
}

  1. Type command 'dotnet restore' to install all missing packages or do it manually

  2. For demo payments use this demo card info provided from Stripe API:
    Email: Any*
    Card Number: 4242 4242 4242 4242
    Expiration: Any* / Any*
    CVV: Any*
    Name: Any*


*You can put random information but the card number should be the one from above

  1. Run with IIS Express or host the application

Dependencies

  • AutoMapper 8.1.1
  • JwtBearer 5.0.13
  • EntityFrameworkCore 5.0.0
  • Stripe.net 39.77.0
  • NETCore.MailKit 2.0.3
  • Moq 4.16.1
  • XUnit 2.4.3
  • Bootstrap 4.5.3
  • Ngx-toastr 11.3.3
  • Rxjs 6.6.0
  • Fontawesome Icons 5.15
  • Angular Animations 11.0.1
  • Ngx Pagination 5.0.0
  • Angular Material 11.0.1
  • Karma 5.1.1
  • Jasmine 3.6.0

Functionality

User Features

Feature Coded? Description
Register a new user βœ” Register a new user using JWT Authorization token functionality
Log in βœ” Log in functionality
Change password βœ” Change password functionality
Change email/username βœ” Change email/username functionality
Add User Information βœ” Add default user billing information
Import User Information βœ” Import user information functionality when finalizing order
Check/Modify User Information βœ” Check or modify user information, invoice address, first, last name etc.
Remember me option βœ” Remember user details
Facebook/Google login ❌ Log in with social network API
Add user token id interceptor βœ” Validate if user token data is valid
Implement lazy loading βœ” Lazy-load the user module

Product Features

Feature Coded? Description
View Products βœ” View all products functionality
Sort Products βœ” Sort all products by ascending, descending etc. functionality
Filter Products βœ” Filter all products by gender (man, woman, kids) functionality
Change Pages βœ” Pagination functionality
View Product βœ” View a single product functionality
Select Product Size βœ” Select product size functionality
Add Product To Cart βœ” Add the selected product to cart stored in the database
Search For Product by Name ❌ Search for specific product
Check Available Products ❌ Check if product size is available in the database
Implement lazy loading βœ” Lazy-load the product module

Cart Features

Feature Coded? Description
View All Cart Products βœ” View all cart products for the user
Increment Cart Product βœ” Increment Cart Product
Decrement Cart Product Quantity βœ” Decrement cart product quantity
Add New Cart Product When Size Is Diffrent βœ” Create new instance of cart product, only when the size is diffrent, otherwise increase quantity
Remove Cart Product βœ” Remove cart product
View Cart Product βœ” View Cart Product directly from the cart page
Checkout βœ” Checkout functionality
Implement lazy loading βœ” Lazy-load the cart module

Order Features

Feature Coded? Description
Create cash order βœ” Create pay on delivery order
Create paid order βœ” Pay for order with a credit card
View Orders βœ” View all orders
Send email for order βœ” Functionality to send email for order details, currently using fake SMTP
Orders pagination condition βœ” Shows pagination only when orders are more than a specific number (currently 10 per page)
Reconfirm order βœ” Reconfirm orders before ordering with a stepper
View current and delivered orders βœ” View current and delivered orders by changing sections Current/Past Orders
View selected order component details βœ” View the selected order full details and implement close details toggler button
View ordered products for order βœ” View selected order ordered list of products with accordion functionality
Implement Lazy loading βœ” Lazy-load the orders module

Tests

Feature Coded? Description
Test ASP .NET Controller logic βœ” Test the api controllers logic
Test ASP .NET Models ❌ Test the validation in models
Test ASP .NET Services ❌ Test the methods in the services
Test ASP .NET StartUp class ❌ Test the application composition root
Test Angular components ❌ Test all components logic
Test Angular services βœ” Test all http and application services
Test Angular pipes βœ” Test all Angular pipes