This repository contains the code for an Ecommerce Webstore with a frontend built using React, TypeScript, Material-UI, Styled-Components, and Redux Toolkit, and a backend powered by .NET Core and PostgreSQL.
- TypeScript
- React
- Redux Toolkit
- MaterialUI
- Styled-Components
- display products by category
- sort products from lowest price to highest price (lowest price - highest price , highest price - lowest price)
- sort products alphabetically (A-Z , Z-A)
- display single product details
- CART: add to cart
- update products's quantity in cart
- calculates total price of products in the cart
- remove products from the cart
- clear all products in the cart
- register and login as a user
- responsive to different screen size
- pagination- calculates the products length for all items and for each category
- register feature
- login feature
- add products to favorites
- .NET
- Entity Framework 7
- PostgreSQL
- Swagger UI
- AutoMapper version 12.0.1
- AutoMapper.Extensions.Microsoft.DependencyInjection version 12.0.1
- BCrypt.Net-Next version 4.0.3
- Microsoft.AspNetCore.Authentication.JwtBearer version 7.0.8
- Microsoft.AspNetCore.Cors version 2.2.0
- Microsoft.AspNetCore.OpenApi version 7.0.8
- Microsoft.EntityFrameworkCore version 7.0.8
- Microsoft.EntityFrameworkCore.Design version 7.0.8
- Microsoft.IdentityModel.Tokens version 6.31.0
- Npgsql.EntityFrameworkCore.PostgreSQL version 7.0.4
- Swashbuckle.AspNetCore version 6.5.0
- Swashbuckle.AspNetCore.Filters version 7.0.6
- System.IdentityModel.Tokens.Jwt version 6.31.0
To run the Ecommerce Webstore on your local machine, follow these steps:
- Clone the repository: git clone https://github.com/your-username/ecommerce-webstore.git
- Navigate to the frontend directory: cd ecommerce-webstore/frontend
- Install frontend dependencies: npm install
- Start the frontend development server: npm start
- Open another terminal and navigate to the backend directory: cd ../backend
- Install backend dependencies: dotnet restore
- Start the backend server: dotnet run
Method | Endpoint | Description | Authorization |
---|---|---|---|
Post | api/v1/Auths | Login and obtain JWT token | Not required |
Get | api/v1/Products | Get a list of all products | Not required |
Get | api/v1/Products/{id} | Get a single product by ID | Not required |
Post | api/v1/Products | Create a new product | Bearer Token |
Put | api/v1/Products/{id} | Update an existing product by ID | Bearer Token |
Delete | api/v1/Products/{id} | Delete an employee by ID | Bearer Token |
Get | api/v1/Categories | Get a list of all categories | Not required |
Get | api/v1/Categories/{id} | Get a single category by ID | Not required |
Post | api/v1/Categories | Create a new category | Bearer Token |
Put | api/v1/Categories/{id} | Update an existing category by ID | Bearer Token |
Delete | api/v1/Categories/{id} | Delete an category by ID | Bearer Token |
Get | api/v1/Carts | Get a list of all carts | Not required |
Get | api/v1/Carts/{id} | Get a single cart by ID | Not required |
Post | api/v1/Carts | Create a new cart | Bearer Token |
Put | api/v1/Carts/{id} | Update an existing cart by ID | Bearer Token |
Delete | api/v1/Carts/{id} | Delete an cart by ID | Bearer Token |
Get | api/v1/CartItems | Get a list of all cart items | Not required |
Get | api/v1/CartItems/{id} | Get a single cart item by ID | Not required |
Post | api/v1/CartItems | Create a new cart item | Bearer Token |
Put | api/v1/CartItems/{id} | Update an existing cart item by ID | Bearer Token |
Delete | api/v1/CartItems/{id} | Delete an cart item by ID | Bearer Token |
Get | api/v1/Users | Get a list of all users | Not required |
Get | api/v1/Users/{id} | Get a single user by ID | Not required |
Post | api/v1/Users | Create a new user | Not required |
Put | api/v1/Users/{id} | Update an existing user by ID | Not required |
Delete | api/v1/Users/{id} | Delete an user by ID | Not required |