Skip to content

A comprehensive e-commerce API built with .NET Core, featuring JWT authentication, product management, order management, user and role management, image uploads, payment integration with Stripe and PayPal, caching with Redis, and background tasks using Hangfire. Implements Onion Architecture, MediatR, and CQRS for maintainability and scalability.

Notifications You must be signed in to change notification settings

yadavvirus/ECommerceAPI

 
 

Repository files navigation

ECommerceAPI

Comprehensive setup of ECommerceAPI solution with advanced architectural patterns and integrations.

Solution Structure:

  • Established solution structure (ECommerceAPI.Sln) with distinct separation of concerns into Core, Infrastructure, and Presentation layers to enhance maintainability and scalability.

DTOs and Mapping:

  • Created extensive DTOs for various components, including authentication, product categories, orders, and payments.
  • Configured custom IMapper profiles to facilitate seamless mapping between domain entities and DTOs, ensuring data consistency and reducing boilerplate code.

Authentication and Authorization:

  • Implemented secure JWT-based authentication mechanisms to safeguard API endpoints.
  • Developed comprehensive handlers and validators for key authentication workflows such as email confirmation, login, registration, and password reset, ensuring robust user management.
  • Incorporated user revocation and email confirmation functionalities to enhance security and user verification processes.

Product Management:

  • Developed command and query handlers for detailed product operations, including creation, updates, and retrieval, adhering to the CQRS pattern for clear separation of concerns.
  • Implemented advanced product filtering and categorization logic to support complex queries and enhance user experience.
  • Enhanced product management with DTOs that reflect nested relationships with categories and images, providing a rich data model for the front end.

Order Management:

  • Efficiently handles order creation, updating, and management, ensuring smooth processing of customer purchases.

User and Role Management:

  • Provides robust user and role management functionalities, enabling efficient administration of user permissions and access control.

Image Uploads:

  • Supports image uploads for products and user profiles during registration, enhancing the user experience with visual content.

Payment Integration:

  • Integrated Stripe and PayPal payment gateways to enable secure and flexible transaction processing.
  • Configured payment service settings to allow dynamic and customizable payment operations, supporting multiple payment methods.

Caching and Background Tasks:

  • Utilizes Redis as a distributed cache to enhance related performance and reduce database load.
  • Implemented Hangfire to manage background tasks, including email notifications and scheduled jobs, ensuring reliable and scalable processing.

Email Notifications:

  • Configured email service to handle various notification scenarios, including user confirmations and marketing campaigns.
  • Set up a robust mailing infrastructure with customizable email templates to support dynamic and personalized email content.

Scheduling and Local Storage:

  • Implemented scheduling services using Hangfire to manage periodic tasks such as data clean-up and report generation.
  • Set up local storage service to handle file uploads and persistent storage operations, ensuring data integrity and availability.

Domain Entities and Repositories:

  • Defined comprehensive domain entities for orders, products, transactions, and more, providing a rich and extensible data model.
  • Implemented repository patterns for data access and manipulation, ensuring a clear separation of data access logic and business logic.
  • Configured Unit of Work to manage database transactions and ensure data consistency across multiple operations.

Dependency Injection and Configurations:

  • Configured dependency injection for service registrations across the application, promoting loose coupling and testability.
  • Set up initial configurations for database contexts, external services, and third-party integrations, ensuring a flexible and maintainable configuration setup.

Error Handling and Validation:

  • Added custom exception handling for specific domain scenarios to provide meaningful error messages and enhance debugging.
  • Implemented comprehensive validation logic for commands and queries to ensure data integrity and prevent invalid data from entering the system.

Excel Operations:

  • Utilized ClosedXML to generate Excel files containing product data, enhancing data export capabilities.
  • Implemented functionality to create Excel files with multiple sheets and customized styles, providing a rich data export experience.

URL Helper:

  • Simplifies URL generation and handling within the application, making routing and linking more efficient.

Documentation:

  • Included XML documentation for core methods and classes to improve code readability and maintainability.

About

A comprehensive e-commerce API built with .NET Core, featuring JWT authentication, product management, order management, user and role management, image uploads, payment integration with Stripe and PayPal, caching with Redis, and background tasks using Hangfire. Implements Onion Architecture, MediatR, and CQRS for maintainability and scalability.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%