Welcome to the E-Commerce API project! This API is built using ASP.NET and is designed to handle various e-commerce functionalities such as user authentication, product management, payment processing, and more.
- ASP.NET API: Robust and scalable backend development.
- SQL & Entity Framework: Efficient data management.
- Identity: Secure user authorization.
- Pagination, Sorting, and Filters: Enhance data retrieval.
- Stripe Integration: Seamless payment processing.
- Redis: Efficient caching.
- Clean Architecture: Maintainable code structure.
- JWT Token & Refresh Token: Secure authentication.
- Dependency Injection: Manage dependencies.
- Repository Pattern: Data access logic.
- ASP.NET Core
- Entity Framework Core
- SQL Server
- Redis
- Stripe API
- JWT Tokens
- Clean Architecture
- Dependency Injection
- Repository Pattern
-
Clone the repository:
git clone https://github.com/yousefsaad12/Ecommerce.git cd Ecommerce -
Set up the database:
- Update the connection string in
appsettings.jsonto point to your SQL Server instance. - Run the following command to apply migrations:
dotnet ef database update
- Update the connection string in
-
Set up Redis:
- Ensure Redis is installed and running on your machine.
-
Set up Stripe:
- Add your Stripe API keys in
appsettings.json.
- Add your Stripe API keys in
-
Run the application:
dotnet run
- Use tools like Postman to interact with the API.
- Swagger UI is available at
/swaggerfor API documentation and testing.
-
Authentication:
POST /api/auth/register- Register a new user.POST /api/auth/login- Login a user.POST /api/auth/refresh- Refresh JWT token.
-
Products:
GET /api/products- Get all products with pagination, sorting, and filters.GET /api/products/{id}- Get a single product by ID.POST /api/products- Create a new product.PUT /api/products/{id}- Update a product by ID.DELETE /api/products/{id}- Delete a product by ID.
-
Payments:
POST /api/payments/charge- Process a payment using Stripe.
Contributions are welcome! Please fork the repository and create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Thanks to the ASP.NET community for their continuous support and resources.