├── .gitattributes ├── README.md ├── backend ├── .vs │ ├── ProjectEvaluation │ │ ├── backend.metadata.v5.2 │ │ └── backend.projects.v5.2 │ ├── VSWorkspaceState.json │ ├── backend │ │ ├── DesignTimeBuild │ │ │ └── .dtbcache.v2 │ │ ├── FileContentIndex │ │ │ ├── 5abb3df0-7788-474f-b8d8-8294849ba414.vsidx │ │ │ ├── 709da6fa-206d-4d71-bc1d-7ee88ee45dcc.vsidx │ │ │ ├── a88236e6-3776-449b-806f-6afe13117d63.vsidx │ │ │ ├── b74b1431-114f-4bb5-97dc-505a4873c342.vsidx │ │ │ └── read.lock │ │ ├── config │ │ │ └── applicationhost.config │ │ └── v17 │ │ │ ├── .futdcache.v2 │ │ │ ├── .suo │ │ │ └── .wsuo │ ├── server │ │ ├── FileContentIndex │ │ │ ├── 352ded9e-6022-48da-8df6-fdea0968bd98.vsidx │ │ │ ├── 715e4efa-1d4a-4cfe-a07e-9c587a42fe43.vsidx │ │ │ ├── 95302e9c-f47a-43be-9670-f389dc036be4.vsidx │ │ │ ├── bd2029c9-8f84-4008-b573-efcc80815d56.vsidx │ │ │ └── read.lock │ │ └── v17 │ │ │ └── .wsuo │ └── slnx.sqlite ├── Controllers │ ├── OrderController.cs │ ├── OrderItemController.cs │ ├── ProductController.cs │ ├── ProductSizeController.cs │ └── UserController.cs ├── JwtService.cs ├── Models │ ├── Order.cs │ ├── OrderItem.cs │ ├── Product.cs │ ├── ProductSize.cs │ ├── User.cs │ └── UserLoginRequest.cs ├── Program.cs ├── Properties │ └── launchSettings.json ├── Repositories │ ├── IListRepository.cs │ ├── IRepository.cs │ ├── OrderItemRepository.cs │ ├── OrderRepository.cs │ ├── ProductRepository.cs │ ├── ProductSizeRepository.cs │ └── UserRepository.cs ├── Startup.cs ├── TypeConverter.cs ├── appsettings.Development.json ├── appsettings.json ├── backend.csproj ├── backend.csproj.user ├── backend.sln ├── bin │ └── Debug │ │ └── net6.0 │ │ ├── Microsoft.AspNetCore.Authentication.JwtBearer.dll │ │ ├── Microsoft.AspNetCore.JsonPatch.dll │ │ ├── Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll │ │ ├── Microsoft.IdentityModel.Abstractions.dll │ │ ├── Microsoft.IdentityModel.JsonWebTokens.dll │ │ ├── Microsoft.IdentityModel.Logging.dll │ │ ├── Microsoft.IdentityModel.Protocols.OpenIdConnect.dll │ │ ├── Microsoft.IdentityModel.Protocols.dll │ │ ├── Microsoft.IdentityModel.Tokens.dll │ │ ├── Microsoft.OpenApi.dll │ │ ├── Newtonsoft.Json.Bson.dll │ │ ├── Newtonsoft.Json.dll │ │ ├── Serilog.dll │ │ ├── Swashbuckle.AspNetCore.Swagger.dll │ │ ├── Swashbuckle.AspNetCore.SwaggerGen.dll │ │ ├── Swashbuckle.AspNetCore.SwaggerUI.dll │ │ ├── System.Data.SqlClient.dll │ │ ├── System.IdentityModel.Tokens.Jwt.dll │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── backend.deps.json │ │ ├── backend.dll │ │ ├── backend.exe │ │ ├── backend.pdb │ │ ├── backend.runtimeconfig.json │ │ └── runtimes │ │ ├── unix │ │ └── lib │ │ │ └── netcoreapp2.1 │ │ │ └── System.Data.SqlClient.dll │ │ ├── win-arm64 │ │ └── native │ │ │ └── sni.dll │ │ ├── win-x64 │ │ └── native │ │ │ └── sni.dll │ │ ├── win-x86 │ │ └── native │ │ │ └── sni.dll │ │ └── win │ │ └── lib │ │ └── netcoreapp2.1 │ │ └── System.Data.SqlClient.dll └── obj │ ├── Debug │ └── net6.0 │ │ ├── .NETCoreApp,Version=v6.0.AssemblyAttributes.cs │ │ ├── apphost.exe │ │ ├── backend.AssemblyInfo.cs │ │ ├── backend.AssemblyInfoInputs.cache │ │ ├── backend.GeneratedMSBuildEditorConfig.editorconfig │ │ ├── backend.GlobalUsings.g.cs │ │ ├── backend.MvcApplicationPartsAssemblyInfo.cache │ │ ├── backend.MvcApplicationPartsAssemblyInfo.cs │ │ ├── backend.assets.cache │ │ ├── backend.csproj.AssemblyReference.cache │ │ ├── backend.csproj.BuildWithSkipAnalyzers │ │ ├── backend.csproj.CopyComplete │ │ ├── backend.csproj.CoreCompileInputs.cache │ │ ├── backend.csproj.FileListAbsolute.txt │ │ ├── backend.dll │ │ ├── backend.genruntimeconfig.cache │ │ ├── backend.pdb │ │ ├── ref │ │ └── backend.dll │ │ ├── refint │ │ └── backend.dll │ │ ├── staticwebassets.build.json │ │ └── staticwebassets │ │ ├── msbuild.build.backend.props │ │ ├── msbuild.buildMultiTargeting.backend.props │ │ └── msbuild.buildTransitive.backend.props │ ├── Release │ └── net6.0 │ │ ├── .NETCoreApp,Version=v6.0.AssemblyAttributes.cs │ │ ├── backend.AssemblyInfo.cs │ │ ├── backend.AssemblyInfoInputs.cache │ │ ├── backend.GeneratedMSBuildEditorConfig.editorconfig │ │ ├── backend.GlobalUsings.g.cs │ │ ├── backend.assets.cache │ │ └── backend.csproj.AssemblyReference.cache │ ├── backend.csproj.nuget.dgspec.json │ ├── backend.csproj.nuget.g.props │ ├── backend.csproj.nuget.g.targets │ ├── project.assets.json │ └── project.nuget.cache └── frontend ├── .gitignore ├── README.md ├── dist ├── bundle.js └── node_modules_web-vitals_dist_web-vitals_js.bundle.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt └── src ├── App.js ├── assets ├── fonts │ ├── Montserrat-Italic-VariableFont_wght.ttf │ └── Montserrat-VariableFont_wght.ttf ├── icons │ ├── facebook.svg │ ├── hero.png │ ├── hero1.png │ ├── hero2.png │ ├── icons.js │ ├── instagram.svg │ └── twitter.svg └── img │ └── completed.jpg ├── components ├── account │ ├── EditProfile.js │ ├── MyOrders.js │ └── _account.scss ├── admin │ ├── OrderItemsTable.js │ ├── OrderTable.js │ ├── OrdersTable.js │ ├── ProductsTable.js │ ├── SizesTable.js │ ├── UsersTable.js │ └── _admin.scss ├── auth │ ├── LoginForm.js │ ├── RegisterForm.js │ └── _auth.scss ├── cart │ ├── CartItem.js │ └── _cart.scss ├── checkout │ ├── Complete.js │ ├── Confirmation.js │ ├── LogIn.js │ ├── OrderSummary.js │ ├── Payment.js │ ├── Shipping.js │ ├── _checkout.scss │ └── _confirm.scss ├── home │ └── _home.scss ├── layout │ ├── Footer.js │ ├── Header.js │ ├── _footer.scss │ └── _header.scss ├── product │ ├── ProductItem.js │ ├── ProductList.js │ ├── _filter.scss │ └── _product.scss └── wishlist │ └── _wishlist.scss ├── index.js ├── pages ├── Account.js ├── AdminPanel.js ├── Authentication.js ├── Cart.js ├── Checkout.js ├── Home.js ├── ProductDetail.js ├── Shop.js └── Wishlist.js ├── reportWebVitals.js ├── store ├── actions │ ├── orderActions.js │ ├── productActions.js │ ├── sizeActions.js │ └── userActions.js ├── reducers │ ├── cartSlice.js │ ├── orderSlice.js │ ├── productSlice.js │ ├── reducers.js │ ├── sizeSlice.js │ ├── userSlice.js │ └── wishlistSlice.js └── store.js ├── styles ├── _global.scss ├── _utilities.scss └── main.scss └── utils ├── api ├── orderApi.js ├── orderItemApi.js ├── productApi.js ├── sizeApi.js ├── userApi.js └── variables.js └── hooks ├── useCart.js ├── useProduct.js ├── useSize.js ├── useUser.js ├── useUtil.js └── useWishlist.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sneaker Ecommerce 2 | 3 | > I've improved and updated the front-end code on the improve/legacy-code branch. If you're having issues starting the project with the backend, use this branch. I'll be improving the backend code and connecting it soon. 4 | > 5 | > See it live here: https://ecommerce-app-ms-sql-net-react.vercel.app/ 6 | 7 | 8 | 9 |
10 | Table of Contents 11 |
    12 |
  1. 13 | About The Project 14 | 17 |
  2. 18 |
  3. 19 | Getting Started 20 | 23 |
  4. 24 |
  5. Previews
  6. 25 |
  7. Roadmap
  8. 26 |
  9. License
  10. 27 |
  11. Contact
  12. 28 |
  13. Acknowledgments
  14. 29 |
30 |
33 | ## About The Project 34 | 35 | This project was an opportunity for me to utilize my self-taught front-end skills and existing back-end knowledge to build an ecommerce platform. However, my skills in both areas were not sufficient, and I lacked full-stack knowledge, including how to establish communication between the front end and back end. Despite these challenges, I took pride in this project because it motivated me to learn and explore various technologies, such as C# Web API, Redux, JWT tokens, and HTTP methods and API development in general. 36 | 37 | ### Built With 38 | 39 | * React.js 40 | * Microsoft SQL Server 41 | * .NET Web API 42 | * Redux 43 | * SCSS 44 | 45 | 46 | ## Getting Started 47 | 48 | To get a local copy up and running, follow these steps. 49 | 50 | ### Installation 51 | 52 | 1. Clone the repo 53 | ```sh 54 | git clone https://github.com/mariangle/ecommerce-app-ms-sql-net-react.git 55 | ``` 56 | 57 | 2. Back end: 58 | * Configure your database connection details in an `app.config` file. 59 | * Build and run the solution file from the "Backend" folder in Visual Studio. 60 | 61 | > Note: This project is dated, and there are many aspects I would approach differently now. I am no longer actively developing it. However, if you intend to clone or fork it: The database was initially set up using SQL statements, which were not saved. Starting the project may be challenging due to this. I recommend using Entity Framework's update-database command to recreate the database schema based on the models. 62 | 63 | 64 | 3. Front end: 65 | * Navigate to the "Frontend" directory 66 | * Install required npm packages 67 | 68 | ```sh 69 | npm install 70 | ``` 71 | 72 | * Start the front end development server 73 | 74 | ```sh 75 | npm start 76 | ``` 77 | 78 | 79 | ## Previews 80 | 81 | **Browsing and Shopping** 82 | 83 | https://user-images.githubusercontent.com/124585244/232165426-5b6ef0fe-9d9c-44b1-a7a6-00236a7ac21e.mp4 84 | 85 | 86 | **Complete Checkout and User Profile** 87 | 88 | https://user-images.githubusercontent.com/124585244/232165800-c91f324c-d68a-4244-be8e-42a71947e062.mp4 89 | 90 | 91 | 92 | **Managing Products** 93 | 94 | https://user-images.githubusercontent.com/124585244/232165214-5f6338a3-c6ee-4018-98c7-ae8ef98efa30.mp4 95 | 96 | 97 | ## Roadmap 98 | - [x] Store cart and wishlist items in local storage 99 | - [x] Filtering and sorting options 100 | - [x] Implement promotional offers and free shipping for orders exceeding a specific amount. 101 | - [x] Integrate PayPal as a payment method 102 | - [ ] Improve the application's responsiveness for smaller screens 103 | - [ ] Implement encryption and decryption for user passwords 104 | - [ ] Hash passwords 105 | - [ ] Add guest checkout functionality 106 | 107 | 108 | ## License 109 | 110 |
111 | MIT License 112 | 113 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 114 | 115 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 116 | 117 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 118 | 119 |
120 | 121 | 122 | ## Contact 123 | 124 | [![Linkedin Badge](https://img.shields.io/badge/-Maria-blue?style=plastic-square&logo=Linkedin&logoColor=white&link=https://www.linkedin.com/in/maria-nguyen-le/)](https://www.linkedin.com/in/maria-nguyen-le/) 125 | 126 |

(back to top)

127 | 128 | --- 129 | -------------------------------------------------------------------------------- /backend/.vs/ProjectEvaluation/backend.metadata.v5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/ProjectEvaluation/backend.metadata.v5.2 -------------------------------------------------------------------------------- /backend/.vs/ProjectEvaluation/backend.projects.v5.2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/ProjectEvaluation/backend.projects.v5.2 -------------------------------------------------------------------------------- /backend/.vs/VSWorkspaceState.json: -------------------------------------------------------------------------------- 1 | { 2 | "ExpandedNodes": [ 3 | "", 4 | "\\Controllers", 5 | "\\Models", 6 | "\\Repositories" 7 | ], 8 | "SelectedNode": "\\JwtService.cs", 9 | "PreviewInSolutionExplorer": false 10 | } -------------------------------------------------------------------------------- /backend/.vs/backend/DesignTimeBuild/.dtbcache.v2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/DesignTimeBuild/.dtbcache.v2 -------------------------------------------------------------------------------- /backend/.vs/backend/FileContentIndex/5abb3df0-7788-474f-b8d8-8294849ba414.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/FileContentIndex/5abb3df0-7788-474f-b8d8-8294849ba414.vsidx -------------------------------------------------------------------------------- /backend/.vs/backend/FileContentIndex/709da6fa-206d-4d71-bc1d-7ee88ee45dcc.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/FileContentIndex/709da6fa-206d-4d71-bc1d-7ee88ee45dcc.vsidx -------------------------------------------------------------------------------- /backend/.vs/backend/FileContentIndex/a88236e6-3776-449b-806f-6afe13117d63.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/FileContentIndex/a88236e6-3776-449b-806f-6afe13117d63.vsidx -------------------------------------------------------------------------------- /backend/.vs/backend/FileContentIndex/b74b1431-114f-4bb5-97dc-505a4873c342.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/FileContentIndex/b74b1431-114f-4bb5-97dc-505a4873c342.vsidx -------------------------------------------------------------------------------- /backend/.vs/backend/FileContentIndex/read.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/FileContentIndex/read.lock -------------------------------------------------------------------------------- /backend/.vs/backend/v17/.futdcache.v2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/v17/.futdcache.v2 -------------------------------------------------------------------------------- /backend/.vs/backend/v17/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/v17/.suo -------------------------------------------------------------------------------- /backend/.vs/backend/v17/.wsuo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/backend/v17/.wsuo -------------------------------------------------------------------------------- /backend/.vs/server/FileContentIndex/352ded9e-6022-48da-8df6-fdea0968bd98.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/server/FileContentIndex/352ded9e-6022-48da-8df6-fdea0968bd98.vsidx -------------------------------------------------------------------------------- /backend/.vs/server/FileContentIndex/715e4efa-1d4a-4cfe-a07e-9c587a42fe43.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/server/FileContentIndex/715e4efa-1d4a-4cfe-a07e-9c587a42fe43.vsidx -------------------------------------------------------------------------------- /backend/.vs/server/FileContentIndex/95302e9c-f47a-43be-9670-f389dc036be4.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/server/FileContentIndex/95302e9c-f47a-43be-9670-f389dc036be4.vsidx -------------------------------------------------------------------------------- /backend/.vs/server/FileContentIndex/bd2029c9-8f84-4008-b573-efcc80815d56.vsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/server/FileContentIndex/bd2029c9-8f84-4008-b573-efcc80815d56.vsidx -------------------------------------------------------------------------------- /backend/.vs/server/FileContentIndex/read.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/server/FileContentIndex/read.lock -------------------------------------------------------------------------------- /backend/.vs/server/v17/.wsuo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/server/v17/.wsuo -------------------------------------------------------------------------------- /backend/.vs/slnx.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/.vs/slnx.sqlite -------------------------------------------------------------------------------- /backend/Controllers/OrderController.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | using backend.Repositories; 3 | using Microsoft.AspNetCore.Cors; 4 | using Microsoft.AspNetCore.Mvc; 5 | 6 | namespace backend.Controllers 7 | { 8 | [Route("api/[controller]")] 9 | [ApiController] 10 | [EnableCors("_myAllowSpecificOrigins")] 11 | public class OrderController : ControllerBase 12 | { 13 | private readonly IListRepository _orderRepository; 14 | 15 | public OrderController(IListRepository orderRepo) 16 | { 17 | _orderRepository = orderRepo; 18 | } 19 | 20 | [HttpGet] 21 | public IActionResult Get() 22 | { 23 | IEnumerable orders = _orderRepository.GetAll(); 24 | return Ok(orders); 25 | } 26 | 27 | [HttpGet("{userId}")] 28 | public IActionResult Get(int userId) 29 | { 30 | var orders = _orderRepository.GetById(userId); 31 | if (orders == null) 32 | { 33 | return NotFound(); 34 | } 35 | return Ok(orders); 36 | } 37 | 38 | [HttpPost] 39 | public IActionResult Post(Order newOrder) 40 | { 41 | bool added = _orderRepository.Add(newOrder); 42 | if (!added) 43 | { 44 | return BadRequest("Failed to create Order"); 45 | } 46 | 47 | return Ok(); 48 | } 49 | 50 | [HttpPut("{orderId}")] 51 | public IActionResult Put(Order updatedOrder) 52 | { 53 | bool updated = _orderRepository.Update(updatedOrder); 54 | if (updated) 55 | { 56 | return Ok(); 57 | } 58 | else 59 | { 60 | return NotFound(); 61 | } 62 | } 63 | 64 | [HttpDelete("{orderId}")] 65 | public IActionResult Delete(int orderId) 66 | { 67 | bool deleted = _orderRepository.Delete(orderId); 68 | if (deleted) 69 | { 70 | return Ok(); 71 | } 72 | else 73 | { 74 | return NotFound(); 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /backend/Controllers/OrderItemController.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | using backend.Repositories; 3 | using Microsoft.AspNetCore.Cors; 4 | using Microsoft.AspNetCore.Mvc; 5 | 6 | namespace backend.Controllers 7 | { 8 | [Route("api/[controller]")] 9 | [ApiController] 10 | [EnableCors("_myAllowSpecificOrigins")] 11 | public class OrderItemController : ControllerBase 12 | { 13 | private readonly IListRepository _orderItemRepo; 14 | 15 | public OrderItemController(IListRepository orderItemRepo) 16 | { 17 | _orderItemRepo = orderItemRepo; 18 | } 19 | 20 | [HttpGet] 21 | public IActionResult Get() 22 | { 23 | IEnumerable orderItems = _orderItemRepo.GetAll(); 24 | return Ok(orderItems); 25 | } 26 | 27 | [HttpGet("{orderId}")] 28 | public IActionResult Get(int orderId) 29 | { 30 | var orderItems = _orderItemRepo.GetById(orderId); 31 | if (orderItems == null) 32 | { 33 | return NotFound(); 34 | } 35 | return Ok(orderItems); 36 | } 37 | 38 | [HttpPost] 39 | public IActionResult Post(OrderItem orderItem) 40 | { 41 | bool added = _orderItemRepo.Add(orderItem); 42 | if (!added) 43 | { 44 | return BadRequest("Failed to add Order Item"); 45 | } 46 | 47 | return Ok(); 48 | } 49 | 50 | [HttpPut("{orderItemId}")] 51 | public IActionResult Put(OrderItem orderItem) 52 | { 53 | bool updated = _orderItemRepo.Update(orderItem); 54 | if (updated) 55 | { 56 | return Ok(); 57 | } 58 | else 59 | { 60 | return NotFound(); 61 | } 62 | } 63 | 64 | [HttpDelete("{orderItemId}")] 65 | public IActionResult Delete(int orderItemId) 66 | { 67 | bool deleted = _orderItemRepo.Delete(orderItemId); 68 | if (deleted) 69 | { 70 | return Ok(); 71 | } 72 | else 73 | { 74 | return NotFound(); 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /backend/Controllers/ProductController.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | using backend.Repositories; 3 | using Microsoft.AspNetCore.Cors; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Configuration; 6 | using Newtonsoft.Json; 7 | using System.Collections.Generic; 8 | using System.Data; 9 | using System.Data.SqlClient; 10 | 11 | 12 | namespace backend.Controllers 13 | { 14 | [Route("api/[controller]")] 15 | [ApiController] 16 | [EnableCors("_myAllowSpecificOrigins")] 17 | 18 | public class ProductController : ControllerBase 19 | { 20 | private readonly IRepository _productRepository; 21 | 22 | public ProductController(IRepository productRepository) 23 | { 24 | _productRepository = productRepository; 25 | } 26 | 27 | [HttpGet] 28 | public IActionResult Get() 29 | { 30 | IEnumerable products = _productRepository.GetAll(); 31 | return Ok(products); 32 | } 33 | 34 | [HttpGet("{productId}")] 35 | public IActionResult Get(int productId) 36 | { 37 | var product = _productRepository.GetById(productId); 38 | if (product == null) 39 | { 40 | return NotFound(); 41 | } 42 | return Ok(product); 43 | } 44 | 45 | [HttpPost] 46 | public IActionResult Post(Product product) 47 | { 48 | _productRepository.Add(product); 49 | return Ok(); 50 | } 51 | 52 | [HttpPut("{productId}")] 53 | public IActionResult Put(Product updatedProduct) 54 | { 55 | bool updated = _productRepository.Update(updatedProduct); 56 | if (updated) 57 | { 58 | return Ok(); 59 | } 60 | else 61 | { 62 | return NotFound(); 63 | } 64 | } 65 | 66 | [HttpDelete("{productId}")] 67 | public IActionResult Delete(int productId) 68 | { 69 | bool deleted = _productRepository.Delete(productId); 70 | if (deleted) 71 | { 72 | return Ok(); 73 | } 74 | else 75 | { 76 | return NotFound(); 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /backend/Controllers/ProductSizeController.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | using backend.Repositories; 3 | using Microsoft.AspNetCore.Cors; 4 | using Microsoft.AspNetCore.Mvc; 5 | 6 | namespace backend.Controllers 7 | { 8 | [Route("api/[controller]")] 9 | [ApiController] 10 | [EnableCors("_myAllowSpecificOrigins")] 11 | public class ProductSizeController : ControllerBase 12 | { 13 | private readonly IListRepository _psRepository; 14 | 15 | public ProductSizeController(IListRepository productSizeRepo) 16 | { 17 | _psRepository = productSizeRepo; 18 | } 19 | 20 | [HttpGet] 21 | public IActionResult Get() 22 | { 23 | IEnumerable productSizes = _psRepository.GetAll(); 24 | return Ok(productSizes); 25 | } 26 | 27 | [HttpGet("{productId}")] 28 | public IActionResult Get(int productId) 29 | { 30 | var productSizes = _psRepository.GetById(productId); 31 | if (productSizes == null) 32 | { 33 | return NotFound(); 34 | } 35 | return Ok(productSizes); 36 | } 37 | 38 | [HttpGet("{id}/size")] 39 | public IActionResult GetProductSizeById(int id) 40 | { 41 | var productSizes = _psRepository.GetObjById(id); 42 | if (productSizes == null) 43 | { 44 | return NotFound(); 45 | } 46 | return Ok(productSizes); 47 | } 48 | 49 | [HttpPost] 50 | public IActionResult Post(ProductSize newProductSize) 51 | { 52 | bool added = _psRepository.Add(newProductSize); 53 | if (!added) 54 | { 55 | return BadRequest("Failed to add Product Size"); 56 | } 57 | 58 | return Ok(); 59 | } 60 | 61 | [HttpPut("{productSizeId}")] 62 | public IActionResult Put(ProductSize updatedProductSize) 63 | { 64 | bool updated = _psRepository.Update(updatedProductSize); 65 | if (updated) 66 | { 67 | return Ok(); 68 | } 69 | else 70 | { 71 | return NotFound(); 72 | } 73 | } 74 | 75 | [HttpDelete("{productSizeId}")] 76 | public IActionResult Delete(int productSizeId) 77 | { 78 | bool deleted = _psRepository.Delete(productSizeId); 79 | if (deleted) 80 | { 81 | return Ok(); 82 | } 83 | else 84 | { 85 | return NotFound(); 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /backend/Controllers/UserController.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | using backend.Repositories; 3 | using Microsoft.AspNetCore.Cors; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Configuration; 6 | using Microsoft.IdentityModel.Tokens; 7 | using System.IdentityModel.Tokens.Jwt; 8 | using System.Security.Claims; 9 | using System.Text; 10 | using backend; 11 | 12 | namespace backend.Controllers 13 | { 14 | [Route("api/[controller]")] 15 | [ApiController] 16 | [EnableCors("_myAllowSpecificOrigins")] 17 | 18 | public class UserController : ControllerBase 19 | { 20 | private readonly IConfiguration _configuration; 21 | private readonly IRepository _userRepository; 22 | 23 | public UserController(IConfiguration configuration, IRepository userRepository) 24 | { 25 | _configuration = configuration; 26 | _userRepository = userRepository; 27 | } 28 | 29 | [HttpGet] 30 | public IActionResult Get() 31 | { 32 | IEnumerable users = _userRepository.GetAll(); 33 | return Ok(users); 34 | } 35 | 36 | [HttpGet("{userId}")] 37 | public IActionResult Get(int userId) 38 | { 39 | var user = _userRepository.GetById(userId); 40 | if (user == null) 41 | { 42 | return NotFound(); 43 | } 44 | return Ok(user); 45 | } 46 | 47 | [HttpPost] 48 | public IActionResult Post(User newUser) 49 | { 50 | bool added = _userRepository.Add(newUser); 51 | if (!added) 52 | { 53 | return BadRequest("Failed to add user"); 54 | } 55 | 56 | return Ok(); 57 | } 58 | 59 | [HttpPut("{userId}")] 60 | public IActionResult Put(User updatedUser) 61 | { 62 | bool updated = _userRepository.Update(updatedUser); 63 | if (updated) 64 | { 65 | return Ok(); 66 | } 67 | else 68 | { 69 | return NotFound(); 70 | } 71 | } 72 | 73 | [HttpDelete("{userId}")] 74 | public IActionResult Delete(int userId) 75 | { 76 | bool deleted = _userRepository.Delete(userId); 77 | if (deleted) 78 | { 79 | return Ok(); 80 | } 81 | else 82 | { 83 | return NotFound(); 84 | } 85 | } 86 | 87 | [HttpPost("login")] 88 | public IActionResult Login(UserLoginRequest loginRequest) 89 | { 90 | var user = _userRepository.GetAll().FirstOrDefault(u => u.Email == loginRequest.Email); 91 | 92 | if (user == null || !user.CheckPassword(loginRequest.Password)) 93 | { 94 | return Unauthorized("Invalid username or password"); 95 | } 96 | 97 | var jwtService = new JwtService(_configuration); 98 | var token = jwtService.GenerateJwtToken(user); 99 | 100 | return Ok(new { Token = token }); 101 | } 102 | 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /backend/JwtService.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | using Microsoft.IdentityModel.Tokens; 3 | using System.IdentityModel.Tokens.Jwt; 4 | using System.Security.Claims; 5 | using System.Text; 6 | 7 | namespace backend 8 | { 9 | public interface IJwtService 10 | { 11 | string GenerateJwtToken(User user); 12 | } 13 | 14 | public class JwtService : IJwtService 15 | { 16 | private readonly IConfiguration _configuration; 17 | 18 | public JwtService(IConfiguration configuration) 19 | { 20 | _configuration = configuration; 21 | } 22 | 23 | public string GenerateJwtToken(User user) 24 | { 25 | var tokenHandler = new JwtSecurityTokenHandler(); 26 | var key = Encoding.ASCII.GetBytes(_configuration["Jwt:Secret"]); 27 | var tokenDescriptor = new SecurityTokenDescriptor 28 | { 29 | Subject = new ClaimsIdentity(new Claim[] 30 | { 31 | new Claim(ClaimTypes.NameIdentifier, user.UserID.ToString()), 32 | new Claim(ClaimTypes.Name, user.FirstName), 33 | new Claim(ClaimTypes.Surname, user.LastName), 34 | new Claim(ClaimTypes.Email, user.Email), 35 | new Claim(ClaimTypes.MobilePhone, user.Phone), 36 | new Claim(ClaimTypes.StreetAddress, user.Address ?? ""), 37 | new Claim(ClaimTypes.Locality, user.City ?? ""), 38 | new Claim(ClaimTypes.PostalCode, user.PostalCode ?? "") 39 | }), 40 | Expires = DateTime.UtcNow.AddHours(1), 41 | NotBefore = DateTime.UtcNow, 42 | SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature) 43 | }; 44 | var token = tokenHandler.CreateToken(tokenDescriptor); 45 | return tokenHandler.WriteToken(token); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /backend/Models/Order.cs: -------------------------------------------------------------------------------- 1 | namespace backend.Models 2 | { 3 | public enum OrderStatus 4 | { 5 | Pending, 6 | Processing, 7 | Shipped, 8 | Delivered, 9 | Cancelled, 10 | } 11 | 12 | public class Order 13 | { 14 | public int OrderID { get; set; } 15 | public DateTime DateTime { get; set; } 16 | public decimal TotalPrice { get; set; } 17 | public OrderStatus Status { get; set; } 18 | public int UserID { get; set; } 19 | 20 | public Order(int orderID, DateTime dateTime, decimal totalPrice, OrderStatus status, int userID) 21 | { 22 | OrderID = orderID; 23 | DateTime = dateTime; 24 | TotalPrice = totalPrice; 25 | Status = status; 26 | UserID = userID; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /backend/Models/OrderItem.cs: -------------------------------------------------------------------------------- 1 | namespace backend.Models 2 | { 3 | public class OrderItem 4 | { 5 | public int OrderItemID { get; set; } 6 | public int Quantity { get; set; } 7 | public int OrderID { get; set; } 8 | public int ProductSizeID { get; set; } 9 | 10 | public OrderItem(int orderItemID, int quantity, int orderID, int productSizeID) 11 | { 12 | OrderItemID = orderItemID; 13 | Quantity = quantity; 14 | OrderID = orderID; 15 | ProductSizeID = productSizeID; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /backend/Models/Product.cs: -------------------------------------------------------------------------------- 1 | namespace backend.Models 2 | { 3 | public class Product 4 | { 5 | public int ProductID { get; set; } 6 | public string Name { get; set; } 7 | public string Brand { get; set; } 8 | public string Description { get; set; } 9 | public string ImageURL { get; set; } 10 | 11 | public Product(int productID, string name, string brand, string description, string imageURL) 12 | { 13 | ProductID = productID; 14 | Name = name; 15 | Brand = brand; 16 | Description = description; 17 | ImageURL = imageURL; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /backend/Models/ProductSize.cs: -------------------------------------------------------------------------------- 1 | namespace backend.Models 2 | { 3 | public class ProductSize 4 | { 5 | public int ProductSizeID { get; set; } 6 | public int Size { get; set; } 7 | public decimal Price { get; set; } 8 | public int Quantity { get; set; } 9 | public int ProductID { get; set; } 10 | 11 | public ProductSize(int productSizeID, int size, decimal price, int quantity, int productID ) 12 | { 13 | ProductSizeID = productSizeID; 14 | Size = size; 15 | Price = price; 16 | Quantity = quantity; 17 | ProductID = productID; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /backend/Models/User.cs: -------------------------------------------------------------------------------- 1 | using System.Net; 2 | 3 | namespace backend.Models 4 | { 5 | public class User 6 | { 7 | public int UserID { get; } 8 | public string FirstName { get; set; } 9 | public string LastName { get; set; } 10 | public string Email { get; set; } 11 | public string Phone { get; set; } 12 | public string Password { get; set; } 13 | 14 | public string Address { get; set; } 15 | public string City { get; set; } 16 | public string PostalCode { get; set; } 17 | 18 | public User(int userId, string firstName, string lastName, string email, string phone, string password, string address = null, string city = null, string postalCode = null) 19 | { 20 | UserID = userId; 21 | FirstName = firstName; 22 | LastName = lastName; 23 | Email = email; 24 | Phone = phone; 25 | Password = password; 26 | Address = address; 27 | City = city; 28 | PostalCode = postalCode; 29 | } 30 | public bool CheckPassword(string password) 31 | { 32 | return Password == password; // temporary 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /backend/Models/UserLoginRequest.cs: -------------------------------------------------------------------------------- 1 | namespace backend.Models 2 | { 3 | public class UserLoginRequest 4 | { 5 | public string Email { get; set; } 6 | public string Password { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /backend/Program.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | using backend.Repositories; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Logging; 5 | using Serilog; 6 | 7 | namespace backend 8 | { 9 | public class Program 10 | { 11 | public static void Main(string[] args) 12 | { 13 | 14 | var builder = WebApplication.CreateBuilder(args); 15 | 16 | var MyAllowSpecificOrigins = "_myAllowSpecificOrigins"; 17 | 18 | 19 | // Add services to the container. 20 | builder.Services.AddCors(options => 21 | { 22 | options.AddPolicy(name: MyAllowSpecificOrigins, 23 | policy => 24 | { 25 | policy.AllowAnyOrigin() 26 | .AllowAnyHeader() 27 | .AllowAnyMethod(); 28 | }); 29 | }); 30 | 31 | builder.Services.AddScoped, UserRepository>(); 32 | builder.Services.AddScoped, ProductRepository>(); 33 | 34 | builder.Services.AddScoped, OrderRepository>(); 35 | builder.Services.AddScoped, ProductSizeRepository>(); 36 | builder.Services.AddScoped, OrderItemRepository>(); 37 | 38 | builder.Services.AddControllers(); 39 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 40 | builder.Services.AddEndpointsApiExplorer(); 41 | builder.Services.AddSwaggerGen(); 42 | 43 | var app = builder.Build(); 44 | 45 | // Configure the HTTP request pipeline. 46 | if (app.Environment.IsDevelopment()) 47 | { 48 | app.UseSwagger(); 49 | app.UseSwaggerUI(); 50 | } 51 | 52 | app.UseCors("_myAllowSpecificOrig ins"); 53 | 54 | app.UseHttpsRedirection(); 55 | 56 | app.UseAuthorization(); 57 | 58 | 59 | app.MapControllers(); 60 | 61 | app.Run(); 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /backend/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:16804", 8 | "sslPort": 44394 9 | } 10 | }, 11 | "profiles": { 12 | "backend": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "https://localhost:7089;http://localhost:5214", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "IIS Express": { 23 | "commandName": "IISExpress", 24 | "launchBrowser": true, 25 | "launchUrl": "swagger", 26 | "environmentVariables": { 27 | "ASPNETCORE_ENVIRONMENT": "Development" 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /backend/Repositories/IListRepository.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | 3 | namespace backend.Repositories 4 | { 5 | public interface IListRepository 6 | { 7 | IEnumerable GetAll(); 8 | public List GetById(int id); 9 | T GetObjById(int id); 10 | bool Add(T item); 11 | bool Update(T item); 12 | bool Delete(int id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /backend/Repositories/IRepository.cs: -------------------------------------------------------------------------------- 1 | using backend.Models; 2 | 3 | namespace backend.Repositories 4 | { 5 | public interface IRepository 6 | { 7 | IEnumerable GetAll(); 8 | T GetById(int id); 9 | bool Add(T item); 10 | bool Update(T item); 11 | bool Delete(int id); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /backend/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using backend; 5 | using Newtonsoft.Json.Serialization; 6 | using System.Text.Json.Serialization; 7 | using Microsoft.Extensions.Configuration; 8 | using Microsoft.Extensions.FileProviders; 9 | using backend.Repositories; 10 | using backend.Controllers; 11 | using Microsoft.AspNetCore.Authentication.JwtBearer; 12 | using Microsoft.IdentityModel.Tokens; 13 | using System.Text; 14 | 15 | public class Startup 16 | { 17 | public Startup(IConfiguration configuration) 18 | { 19 | Configuration = configuration; 20 | } 21 | public IConfiguration Configuration { get; } 22 | 23 | public void ConfigureServices(IServiceCollection services) 24 | { 25 | // Add configuration to access appsettings.json 26 | IConfiguration configuration = new ConfigurationBuilder() 27 | .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) 28 | .Build(); 29 | 30 | // Retrieve the secret key from the configuration 31 | var secretKey = configuration["Jwt:Secret"]; 32 | 33 | // Add authentication services 34 | services.AddAuthentication(options => 35 | { 36 | options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; 37 | options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; 38 | }) 39 | .AddJwtBearer(options => 40 | { 41 | options.RequireHttpsMetadata = false; 42 | options.SaveToken = true; 43 | options.TokenValidationParameters = new TokenValidationParameters 44 | { 45 | ValidateIssuerSigningKey = true, 46 | IssuerSigningKey = new SymmetricSecurityKey(Encoding.ASCII.GetBytes(secretKey)), 47 | ValidateIssuer = false, 48 | ValidateAudience = false 49 | }; 50 | }); 51 | 52 | // Enable CORS 53 | services.AddCors(options => 54 | { 55 | options.AddPolicy("AllowOrigin", builder => 56 | { 57 | builder.AllowAnyOrigin() 58 | .AllowAnyMethod() 59 | .AllowAnyHeader(); 60 | }); 61 | }); 62 | 63 | // Add MVC services and configure JSON serialization 64 | services.AddControllersWithViews() 65 | .AddNewtonsoftJson(options => 66 | { 67 | options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; 68 | options.SerializerSettings.ContractResolver = new DefaultContractResolver(); 69 | }); 70 | 71 | // Add JWT authentication services 72 | services.AddAuthentication(options => 73 | { 74 | options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; 75 | options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; 76 | }) 77 | .AddJwtBearer(options => 78 | { 79 | options.TokenValidationParameters = new TokenValidationParameters 80 | { 81 | ValidateIssuer = true, 82 | ValidateAudience = true, 83 | ValidateLifetime = true, 84 | ValidateIssuerSigningKey = true, 85 | ValidIssuer = configuration["JwtIssuer"], 86 | ValidAudience = configuration["JwtIssuer"], 87 | IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(configuration["JwtKey"])) 88 | }; 89 | }); 90 | 91 | // Add repositories 92 | services.AddScoped(typeof(IRepository<>), typeof(UserRepository)); 93 | services.AddScoped(typeof(IRepository<>), typeof(ProductRepository)); 94 | 95 | services.AddScoped(typeof(IListRepository<>), typeof(OrderRepository)); 96 | services.AddScoped(typeof(IListRepository<>), typeof(ProductSizeRepository)); 97 | services.AddScoped(typeof(IListRepository<>), typeof(OrderItemRepository)); 98 | 99 | // Add controllers 100 | services.AddControllers(); 101 | } 102 | 103 | 104 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 105 | { 106 | app.UseCors(options => options.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()); 107 | 108 | if (env.IsDevelopment()) 109 | { 110 | app.UseDeveloperExceptionPage(); 111 | } 112 | 113 | app.UseHttpsRedirection(); 114 | 115 | app.UseRouting(); 116 | 117 | app.UseAuthentication(); 118 | 119 | app.UseAuthorization(); 120 | 121 | app.UseEndpoints(endpoints => 122 | { 123 | endpoints.MapControllers(); 124 | }); 125 | } 126 | 127 | } 128 | -------------------------------------------------------------------------------- /backend/TypeConverter.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace backend 5 | { 6 | public class TypeConverter : JsonConverter 7 | { 8 | public override Type Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 9 | { 10 | throw new NotImplementedException(); 11 | } 12 | 13 | public override void Write(Utf8JsonWriter writer, Type value, JsonSerializerOptions options) 14 | { 15 | writer.WriteStringValue(value.FullName); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /backend/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /backend/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "UserAppCon": "Server=10.56.8.36;Database=DB_2023_49;User Id=STUDENT_49;Password=OPENDB_49;TrustServerCertificate=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft.AspNetCore": "Warning" 9 | } 10 | }, 11 | "Jwt": { 12 | "Secret": "your_secret_key_here" 13 | }, 14 | "AllowedHosts": "*" 15 | } 16 | -------------------------------------------------------------------------------- /backend/backend.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /backend/backend.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ApiControllerEmptyScaffolder 5 | root/Common/Api 6 | backend 7 | 8 | 9 | ProjectDebugger 10 | 11 | -------------------------------------------------------------------------------- /backend/backend.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33110.190 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "backend", "backend.csproj", "{721300E2-7102-49C2-A30F-070B168BB6CB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {721300E2-7102-49C2-A30F-070B168BB6CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {721300E2-7102-49C2-A30F-070B168BB6CB}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {721300E2-7102-49C2-A30F-070B168BB6CB}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {721300E2-7102-49C2-A30F-070B168BB6CB}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {8D18A7A7-DE14-496B-82FE-86B28E381894} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.AspNetCore.JsonPatch.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.AspNetCore.JsonPatch.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.IdentityModel.Abstractions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.IdentityModel.Abstractions.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.IdentityModel.JsonWebTokens.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.IdentityModel.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.IdentityModel.Logging.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.IdentityModel.Protocols.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.IdentityModel.Protocols.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.IdentityModel.Tokens.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.IdentityModel.Tokens.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Microsoft.OpenApi.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Microsoft.OpenApi.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Newtonsoft.Json.Bson.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Newtonsoft.Json.Bson.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Serilog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Serilog.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Swashbuckle.AspNetCore.Swagger.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Swashbuckle.AspNetCore.Swagger.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Swashbuckle.AspNetCore.SwaggerGen.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/Swashbuckle.AspNetCore.SwaggerUI.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/System.Data.SqlClient.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/System.Data.SqlClient.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/System.IdentityModel.Tokens.Jwt.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/System.IdentityModel.Tokens.Jwt.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "ConnectionStrings": { 3 | "UserAppCon": "Server=10.56.8.36;Database=DB_2023_49;User Id=STUDENT_49;Password=OPENDB_49;TrustServerCertificate=true" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Information", 8 | "Microsoft.AspNetCore": "Warning" 9 | } 10 | }, 11 | "Jwt": { 12 | "Secret": "your_secret_key_here" 13 | }, 14 | "AllowedHosts": "*" 15 | } 16 | -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/backend.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/backend.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/backend.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/backend.exe -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/backend.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/backend.pdb -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/backend.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "net6.0", 4 | "frameworks": [ 5 | { 6 | "name": "Microsoft.NETCore.App", 7 | "version": "6.0.0" 8 | }, 9 | { 10 | "name": "Microsoft.AspNetCore.App", 11 | "version": "6.0.0" 12 | } 13 | ], 14 | "configProperties": { 15 | "System.GC.Server": true, 16 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/runtimes/unix/lib/netcoreapp2.1/System.Data.SqlClient.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/runtimes/win-arm64/native/sni.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/runtimes/win-arm64/native/sni.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/runtimes/win-x64/native/sni.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/runtimes/win-x64/native/sni.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/runtimes/win-x86/native/sni.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/runtimes/win-x86/native/sni.dll -------------------------------------------------------------------------------- /backend/bin/Debug/net6.0/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/bin/Debug/net6.0/runtimes/win/lib/netcoreapp2.1/System.Data.SqlClient.dll -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] 5 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/apphost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/apphost.exe -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("backend")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("backend")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("backend")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 7fb580ac5935226850acbb534b0b7a5d226f25ae 2 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net6.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = true 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = backend 11 | build_property.RootNamespace = backend 12 | build_property.ProjectDir = C:\Users\45313\Documents\GitHub\Ecommerce\backend\ 13 | build_property.RazorLangVersion = 6.0 14 | build_property.SupportLocalizedComponentNames = 15 | build_property.GenerateRazorMetadataSourceChecksumAttributes = 16 | build_property.MSBuildProjectDirectory = C:\Users\45313\Documents\GitHub\Ecommerce\backend 17 | build_property._RazorSourceGeneratorDebug = 18 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::Microsoft.AspNetCore.Builder; 3 | global using global::Microsoft.AspNetCore.Hosting; 4 | global using global::Microsoft.AspNetCore.Http; 5 | global using global::Microsoft.AspNetCore.Routing; 6 | global using global::Microsoft.Extensions.Configuration; 7 | global using global::Microsoft.Extensions.DependencyInjection; 8 | global using global::Microsoft.Extensions.Hosting; 9 | global using global::Microsoft.Extensions.Logging; 10 | global using global::System; 11 | global using global::System.Collections.Generic; 12 | global using global::System.IO; 13 | global using global::System.Linq; 14 | global using global::System.Net.Http; 15 | global using global::System.Net.Http.Json; 16 | global using global::System.Threading; 17 | global using global::System.Threading.Tasks; 18 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.MvcApplicationPartsAssemblyInfo.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/backend.MvcApplicationPartsAssemblyInfo.cache -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.MvcApplicationPartsAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Swashbuckle.AspNetCore.SwaggerGen")] 15 | 16 | // Generated by the MSBuild WriteCodeFragment class. 17 | 18 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/backend.assets.cache -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/backend.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.csproj.BuildWithSkipAnalyzers: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/backend.csproj.BuildWithSkipAnalyzers -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.csproj.CopyComplete: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/backend.csproj.CopyComplete -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 6dd538e82bb119b1909a916c9a6c61f0b3a0b124 2 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/backend.dll -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.genruntimeconfig.cache: -------------------------------------------------------------------------------- 1 | c3ae1b7ac69b1ac82ffd1d172dea6abf638e1cec 2 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/backend.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/backend.pdb -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/ref/backend.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/ref/backend.dll -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/refint/backend.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Debug/net6.0/refint/backend.dll -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/staticwebassets.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": 1, 3 | "Hash": "7/yvsnDRTixX0vVer35KSjS1HzfM4rGxA/gc1emwSdw=", 4 | "Source": "backend", 5 | "BasePath": "_content/backend", 6 | "Mode": "Default", 7 | "ManifestType": "Build", 8 | "ReferencedProjectsConfiguration": [], 9 | "DiscoveryPatterns": [], 10 | "Assets": [] 11 | } -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/staticwebassets/msbuild.build.backend.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/staticwebassets/msbuild.buildMultiTargeting.backend.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /backend/obj/Debug/net6.0/staticwebassets/msbuild.buildTransitive.backend.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /backend/obj/Release/net6.0/.NETCoreApp,Version=v6.0.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] 5 | -------------------------------------------------------------------------------- /backend/obj/Release/net6.0/backend.AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | using System; 12 | using System.Reflection; 13 | 14 | [assembly: System.Reflection.AssemblyCompanyAttribute("backend")] 15 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Release")] 16 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] 17 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] 18 | [assembly: System.Reflection.AssemblyProductAttribute("backend")] 19 | [assembly: System.Reflection.AssemblyTitleAttribute("backend")] 20 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] 21 | 22 | // Generated by the MSBuild WriteCodeFragment class. 23 | 24 | -------------------------------------------------------------------------------- /backend/obj/Release/net6.0/backend.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 0ec2ec676054acf07573ee4a5afb30cc45394a47 2 | -------------------------------------------------------------------------------- /backend/obj/Release/net6.0/backend.GeneratedMSBuildEditorConfig.editorconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | build_property.TargetFramework = net6.0 3 | build_property.TargetPlatformMinVersion = 4 | build_property.UsingMicrosoftNETSdkWeb = true 5 | build_property.ProjectTypeGuids = 6 | build_property.InvariantGlobalization = 7 | build_property.PlatformNeutralAssembly = 8 | build_property.EnforceExtendedAnalyzerRules = 9 | build_property._SupportedPlatformList = Linux,macOS,Windows 10 | build_property.RootNamespace = backend 11 | build_property.RootNamespace = backend 12 | build_property.ProjectDir = C:\Users\45313\Documents\GitHub\Ecommerce\backend\ 13 | build_property.RazorLangVersion = 6.0 14 | build_property.SupportLocalizedComponentNames = 15 | build_property.GenerateRazorMetadataSourceChecksumAttributes = 16 | build_property.MSBuildProjectDirectory = C:\Users\45313\Documents\GitHub\Ecommerce\backend 17 | build_property._RazorSourceGeneratorDebug = 18 | -------------------------------------------------------------------------------- /backend/obj/Release/net6.0/backend.GlobalUsings.g.cs: -------------------------------------------------------------------------------- 1 | // 2 | global using global::Microsoft.AspNetCore.Builder; 3 | global using global::Microsoft.AspNetCore.Hosting; 4 | global using global::Microsoft.AspNetCore.Http; 5 | global using global::Microsoft.AspNetCore.Routing; 6 | global using global::Microsoft.Extensions.Configuration; 7 | global using global::Microsoft.Extensions.DependencyInjection; 8 | global using global::Microsoft.Extensions.Hosting; 9 | global using global::Microsoft.Extensions.Logging; 10 | global using global::System; 11 | global using global::System.Collections.Generic; 12 | global using global::System.IO; 13 | global using global::System.Linq; 14 | global using global::System.Net.Http; 15 | global using global::System.Net.Http.Json; 16 | global using global::System.Threading; 17 | global using global::System.Threading.Tasks; 18 | -------------------------------------------------------------------------------- /backend/obj/Release/net6.0/backend.assets.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Release/net6.0/backend.assets.cache -------------------------------------------------------------------------------- /backend/obj/Release/net6.0/backend.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/backend/obj/Release/net6.0/backend.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /backend/obj/backend.csproj.nuget.dgspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "format": 1, 3 | "restore": { 4 | "C:\\Users\\45313\\Documents\\GitHub\\Ecommerce\\backend\\backend.csproj": {} 5 | }, 6 | "projects": { 7 | "C:\\Users\\45313\\Documents\\GitHub\\Ecommerce\\backend\\backend.csproj": { 8 | "version": "1.0.0", 9 | "restore": { 10 | "projectUniqueName": "C:\\Users\\45313\\Documents\\GitHub\\Ecommerce\\backend\\backend.csproj", 11 | "projectName": "backend", 12 | "projectPath": "C:\\Users\\45313\\Documents\\GitHub\\Ecommerce\\backend\\backend.csproj", 13 | "packagesPath": "C:\\Users\\45313\\.nuget\\packages\\", 14 | "outputPath": "C:\\Users\\45313\\Documents\\GitHub\\Ecommerce\\backend\\obj\\", 15 | "projectStyle": "PackageReference", 16 | "configFilePaths": [ 17 | "C:\\Users\\45313\\AppData\\Roaming\\NuGet\\NuGet.Config", 18 | "C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config" 19 | ], 20 | "originalTargetFrameworks": [ 21 | "net6.0" 22 | ], 23 | "sources": { 24 | "C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {}, 25 | "https://api.nuget.org/v3/index.json": {} 26 | }, 27 | "frameworks": { 28 | "net6.0": { 29 | "targetAlias": "net6.0", 30 | "projectReferences": {} 31 | } 32 | }, 33 | "warningProperties": { 34 | "warnAsError": [ 35 | "NU1605" 36 | ] 37 | } 38 | }, 39 | "frameworks": { 40 | "net6.0": { 41 | "targetAlias": "net6.0", 42 | "dependencies": { 43 | "Microsoft.AspNetCore.Authentication.JwtBearer": { 44 | "target": "Package", 45 | "version": "[6.0.15, )" 46 | }, 47 | "Microsoft.AspNetCore.Mvc.NewtonsoftJson": { 48 | "target": "Package", 49 | "version": "[6.0.15, )" 50 | }, 51 | "Serilog": { 52 | "target": "Package", 53 | "version": "[2.12.0, )" 54 | }, 55 | "Swashbuckle.AspNetCore": { 56 | "target": "Package", 57 | "version": "[6.2.3, )" 58 | }, 59 | "System.Data.SqlClient": { 60 | "target": "Package", 61 | "version": "[4.8.5, )" 62 | }, 63 | "System.IdentityModel.Tokens.Jwt": { 64 | "target": "Package", 65 | "version": "[6.28.1, )" 66 | } 67 | }, 68 | "imports": [ 69 | "net461", 70 | "net462", 71 | "net47", 72 | "net471", 73 | "net472", 74 | "net48", 75 | "net481" 76 | ], 77 | "assetTargetFallback": true, 78 | "warn": true, 79 | "frameworkReferences": { 80 | "Microsoft.AspNetCore.App": { 81 | "privateAssets": "none" 82 | }, 83 | "Microsoft.NETCore.App": { 84 | "privateAssets": "all" 85 | } 86 | }, 87 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.100\\RuntimeIdentifierGraph.json" 88 | } 89 | } 90 | } 91 | } 92 | } -------------------------------------------------------------------------------- /backend/obj/backend.csproj.nuget.g.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | True 5 | NuGet 6 | $(MSBuildThisFileDirectory)project.assets.json 7 | $(UserProfile)\.nuget\packages\ 8 | C:\Users\45313\.nuget\packages\ 9 | PackageReference 10 | 6.4.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | C:\Users\45313\.nuget\packages\microsoft.extensions.apidescription.server\3.0.0 21 | 22 | -------------------------------------------------------------------------------- /backend/obj/backend.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /backend/obj/project.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "dgSpecHash": "dJZAsVTYsg/dgMknTi6VXlAL5tNMgHtjyaqdbUHrV8uWYYUbGpwSQwNIIW6jaSxz+P7S2T53GZr0OtJqzmJcxA==", 4 | "success": true, 5 | "projectFilePath": "C:\\Users\\45313\\Documents\\GitHub\\Ecommerce\\backend\\backend.csproj", 6 | "expectedPackageFiles": [ 7 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.aspnetcore.authentication.jwtbearer\\6.0.15\\microsoft.aspnetcore.authentication.jwtbearer.6.0.15.nupkg.sha512", 8 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.aspnetcore.jsonpatch\\6.0.15\\microsoft.aspnetcore.jsonpatch.6.0.15.nupkg.sha512", 9 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.aspnetcore.mvc.newtonsoftjson\\6.0.15\\microsoft.aspnetcore.mvc.newtonsoftjson.6.0.15.nupkg.sha512", 10 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.csharp\\4.7.0\\microsoft.csharp.4.7.0.nupkg.sha512", 11 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.extensions.apidescription.server\\3.0.0\\microsoft.extensions.apidescription.server.3.0.0.nupkg.sha512", 12 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.identitymodel.abstractions\\6.28.1\\microsoft.identitymodel.abstractions.6.28.1.nupkg.sha512", 13 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.identitymodel.jsonwebtokens\\6.28.1\\microsoft.identitymodel.jsonwebtokens.6.28.1.nupkg.sha512", 14 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.identitymodel.logging\\6.28.1\\microsoft.identitymodel.logging.6.28.1.nupkg.sha512", 15 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.identitymodel.protocols\\6.10.0\\microsoft.identitymodel.protocols.6.10.0.nupkg.sha512", 16 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.identitymodel.protocols.openidconnect\\6.10.0\\microsoft.identitymodel.protocols.openidconnect.6.10.0.nupkg.sha512", 17 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.identitymodel.tokens\\6.28.1\\microsoft.identitymodel.tokens.6.28.1.nupkg.sha512", 18 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512", 19 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512", 20 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.openapi\\1.2.3\\microsoft.openapi.1.2.3.nupkg.sha512", 21 | "C:\\Users\\45313\\.nuget\\packages\\microsoft.win32.registry\\4.7.0\\microsoft.win32.registry.4.7.0.nupkg.sha512", 22 | "C:\\Users\\45313\\.nuget\\packages\\newtonsoft.json\\13.0.1\\newtonsoft.json.13.0.1.nupkg.sha512", 23 | "C:\\Users\\45313\\.nuget\\packages\\newtonsoft.json.bson\\1.0.2\\newtonsoft.json.bson.1.0.2.nupkg.sha512", 24 | "C:\\Users\\45313\\.nuget\\packages\\runtime.native.system.data.sqlclient.sni\\4.7.0\\runtime.native.system.data.sqlclient.sni.4.7.0.nupkg.sha512", 25 | "C:\\Users\\45313\\.nuget\\packages\\runtime.win-arm64.runtime.native.system.data.sqlclient.sni\\4.4.0\\runtime.win-arm64.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512", 26 | "C:\\Users\\45313\\.nuget\\packages\\runtime.win-x64.runtime.native.system.data.sqlclient.sni\\4.4.0\\runtime.win-x64.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512", 27 | "C:\\Users\\45313\\.nuget\\packages\\runtime.win-x86.runtime.native.system.data.sqlclient.sni\\4.4.0\\runtime.win-x86.runtime.native.system.data.sqlclient.sni.4.4.0.nupkg.sha512", 28 | "C:\\Users\\45313\\.nuget\\packages\\serilog\\2.12.0\\serilog.2.12.0.nupkg.sha512", 29 | "C:\\Users\\45313\\.nuget\\packages\\swashbuckle.aspnetcore\\6.2.3\\swashbuckle.aspnetcore.6.2.3.nupkg.sha512", 30 | "C:\\Users\\45313\\.nuget\\packages\\swashbuckle.aspnetcore.swagger\\6.2.3\\swashbuckle.aspnetcore.swagger.6.2.3.nupkg.sha512", 31 | "C:\\Users\\45313\\.nuget\\packages\\swashbuckle.aspnetcore.swaggergen\\6.2.3\\swashbuckle.aspnetcore.swaggergen.6.2.3.nupkg.sha512", 32 | "C:\\Users\\45313\\.nuget\\packages\\swashbuckle.aspnetcore.swaggerui\\6.2.3\\swashbuckle.aspnetcore.swaggerui.6.2.3.nupkg.sha512", 33 | "C:\\Users\\45313\\.nuget\\packages\\system.data.sqlclient\\4.8.5\\system.data.sqlclient.4.8.5.nupkg.sha512", 34 | "C:\\Users\\45313\\.nuget\\packages\\system.identitymodel.tokens.jwt\\6.28.1\\system.identitymodel.tokens.jwt.6.28.1.nupkg.sha512", 35 | "C:\\Users\\45313\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512", 36 | "C:\\Users\\45313\\.nuget\\packages\\system.security.accesscontrol\\4.7.0\\system.security.accesscontrol.4.7.0.nupkg.sha512", 37 | "C:\\Users\\45313\\.nuget\\packages\\system.security.cryptography.cng\\4.5.0\\system.security.cryptography.cng.4.5.0.nupkg.sha512", 38 | "C:\\Users\\45313\\.nuget\\packages\\system.security.principal.windows\\4.7.0\\system.security.principal.windows.4.7.0.nupkg.sha512", 39 | "C:\\Users\\45313\\.nuget\\packages\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512", 40 | "C:\\Users\\45313\\.nuget\\packages\\system.text.encodings.web\\4.7.2\\system.text.encodings.web.4.7.2.nupkg.sha512", 41 | "C:\\Users\\45313\\.nuget\\packages\\system.text.json\\4.7.2\\system.text.json.4.7.2.nupkg.sha512" 42 | ], 43 | "logs": [] 44 | } -------------------------------------------------------------------------------- /frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ecommerce", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@fortawesome/fontawesome-free": "^6.4.0", 7 | "@fortawesome/fontawesome-svg-core": "^6.4.0", 8 | "@fortawesome/free-regular-svg-icons": "^6.4.0", 9 | "@fortawesome/free-solid-svg-icons": "^6.4.0", 10 | "@fortawesome/react-fontawesome": "^0.2.0", 11 | "@paypal/react-paypal-js": "^7.8.3", 12 | "@reduxjs/toolkit": "^1.9.3", 13 | "@testing-library/jest-dom": "^5.16.5", 14 | "@testing-library/react": "^13.4.0", 15 | "@testing-library/user-event": "^13.5.0", 16 | "axios": "^1.3.4", 17 | "buffer": "^6.0.3", 18 | "jsonwebtoken": "^8.5.1", 19 | "jwt-decode": "^3.1.2", 20 | "react": "^18.2.0", 21 | "react-dom": "^18.2.0", 22 | "react-hook-form": "^7.43.8", 23 | "react-redux": "^8.0.5", 24 | "react-router-dom": "^6.9.0", 25 | "react-scripts": "5.0.1", 26 | "redux": "^4.2.1", 27 | "redux-devtools-extension": "^2.13.9", 28 | "sass": "^1.60.0", 29 | "styled-components": "^5.3.9", 30 | "util": "^0.12.5", 31 | "web-vitals": "^2.1.4" 32 | }, 33 | "scripts": { 34 | "start": "react-scripts start", 35 | "build": "react-scripts build", 36 | "test": "react-scripts test", 37 | "eject": "react-scripts eject" 38 | }, 39 | "eslintConfig": { 40 | "extends": [ 41 | "react-app", 42 | "react-app/jest" 43 | ] 44 | }, 45 | "browserslist": { 46 | "production": [ 47 | ">0.2%", 48 | "not dead", 49 | "not op_mini all" 50 | ], 51 | "development": [ 52 | "last 1 chrome version", 53 | "last 1 firefox version", 54 | "last 1 safari version" 55 | ] 56 | }, 57 | "devDependencies": { 58 | "@babel/core": "^7.21.4", 59 | "@babel/preset-env": "^7.21.4", 60 | "@babel/preset-react": "^7.18.6", 61 | "babel-loader": "^9.1.2", 62 | "crypto-browserify": "^3.12.0", 63 | "resolve-url-loader": "^5.0.0", 64 | "stream-browserify": "^3.0.0", 65 | "svg-inline-loader": "^0.8.2", 66 | "webpack-cli": "^5.0.1" 67 | }, 68 | "browser": { 69 | "crypto": false, 70 | "stream": false 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/frontend/public/favicon.ico -------------------------------------------------------------------------------- /frontend/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | 14 | 18 | 19 | 28 | React App 29 | 30 | 31 | 32 |
33 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/frontend/public/logo192.png -------------------------------------------------------------------------------- /frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mariangle/ecommerce-app-ms-sql-net-react/26bb1a033284f8baa2df447f29ecb0e26b851262/frontend/public/logo512.png -------------------------------------------------------------------------------- /frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /frontend/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import './styles/main.scss'; 2 | // import components 3 | import Header from './components/layout/Header'; 4 | import Footer from './components/layout/Footer'; 5 | // import pages 6 | import Home from "./pages/Home"; 7 | import Shop from './pages/Shop'; 8 | import ProductPage from './pages/ProductDetail'; 9 | import CartPage from "./pages/Cart" 10 | import CheckoutPage from './pages/Checkout'; 11 | import Admin from "./pages/AdminPanel" 12 | import Account from './pages/Account'; 13 | import Authentication from './pages/Authentication'; 14 | import Wishlist from './pages/Wishlist'; 15 | 16 | import { Routes, Route, useLocation } from 'react-router-dom'; 17 | 18 | 19 | function App() { 20 | const location = useLocation(); 21 | const showHeaderFooter = location.pathname !== '/checkout'; 22 | 23 | return ( 24 | <> 25 | {showHeaderFooter &&
} 26 | 27 | } /> 28 | } /> 29 | } /> 30 | } /> 31 | } /> 32 | } /> 33 | } /> 34 | } /> 35 | } /> 36 | 37 | {showHeaderFooter &&