Skip to content

Youssef-Adell/Hardware-Market-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hardware Market: E-Commerce (API)

Swagger Documentation

📖 Overview

Hardware Market is a RESTful API for a tech-focused e-commerce platform, offering features for user authentication, product and order management, payment processing, and customer reviews. It supports both customer and admin roles, ensuring a secure and efficient shopping experience.

✨ Key Features

  • Product Management: Admins can create, update, and delete products; customers can search, filter, and review products.
  • Order Management: Customers can place and track orders; admins can manage and update order statuses.
  • Payment Integration: Secure payment processing for seamless checkout experiences.
  • Product Reviews: Customers can leave reviews and ratings for purchased products.
  • Coupons: Admins can create and manage discount coupons; customers can validate and apply them.
  • Authentication: Registration, login, email confirmation, password recovery, and token refresh.
  • Pagination & Sorting: Supports pagination and sorting for products, orders, and reviews.

⚙️ Tech Stack

  • ASP.NET Core 9 - A free, cross-platform and open-source web-development framework.
  • Entity Framework Core 9 - An open source object–relational mapping framework.
  • Microsoft SQL Server - A relational database management system.
  • ASP.NET Core Identity - A membership system for managing users, authentication, and authorization in ASP.NET Core applications.
  • JWT - A secure, compact token format used for transmitting information between parties as a JSON object.
  • Serilog - A logging library that allows logging to various outputs like files, console, etc.
  • Docker - A containerization platform for packaging applications and their dependencies to ensure consistency across different environments.

🔗 Third-Party Services

  • Stripe - A payment processing platform.
  • Brevo - An email sending service.

🛠️ Setup & Run

1. Prerequisites

git clone https://github.com/Youssef-Adell/Hardware-Market-API.git
cd Hardware-Market-API

2. Configure Environment Variables

  • Rename the example files:
    • webapi.env.examplewebapi.env
    • sqlserver.env.examplesqlserver.env
  • Update the .env files with your credentials:
    • webapi.env: Add database connection strings, JWT secret, and third-party API keys.
    • sqlserver.env: Set the SQL Server admin password.

3. Start the Application

Run the following command to build and start the containers:

docker-compose up --build  

Note

Database, logs, and DataProtection keys are stored in Docker volumes (sqlserver-data, webapi-logs, dataprotection-keys) to ensure data persistence and consistency across container restarts or rebuilds.

About

RESTful API for tech e-commerce with product/order management, payments, coupons and reviews, built with ASP.NET Core.

Topics

Resources

Stars

Watchers

Forks

Contributors