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.
- 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.
- 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.
- Install Docker and Docker Compose.
- Clone the repository:
git clone https://github.com/Youssef-Adell/Hardware-Market-API.git
cd Hardware-Market-API- Rename the example files:
webapi.env.example→webapi.envsqlserver.env.example→sqlserver.env
- Update the
.envfiles with your credentials:webapi.env: Add database connection strings, JWT secret, and third-party API keys.sqlserver.env: Set the SQL Server admin password.
Run the following command to build and start the containers:
docker-compose up --build - The API will be available at http://localhost:5000.
- SQL Server will be accessible at localhost:1433.
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.