Store API is a robust e-commerce backend built with ASP.NET Core (.NET 8), designed to support modern web and mobile store applications. It provides comprehensive features for product management, user authentication, order processing, payments, reviews, wishlists, reporting, and more.
-
User Authentication & Authorization
- JWT-based authentication
- Google external login
- Role-based access (Admin, User)
- Email confirmation and password reset
-
Product Management
- CRUD operations for products and categories
- Photo upload and management
- Fuzzy and FreeText search for products
- Product reviews and ratings
-
Order & Basket
- Basket management (add, update, remove, clear)
- Order creation and tracking
- Delivery methods with admin protection
-
Wishlist
- Add/remove products to user wishlist
- Retrieve wishlist items
-
Address & Profile
- Manage user addresses
- Edit profile, change password, delete account
-
Payment Integration
- Stripe payment support
- Payment status tracking
-
Reporting
- Automated daily and monthly PDF reports (QuestPDF)
- Email delivery to admins
- Hangfire for background job scheduling
-
Rate Limiting & Caching
- Global rate limiting for API protection
- In-memory caching for performance
-
Validation & Documentation
- FluentValidation for all entities and DTOs
- Swagger/OpenAPI documentation with endpoint descriptions
- .NET 8 / ASP.NET Core
- Entity Framework Core
- Hangfire (background jobs)
- Stripe (payments)
- QuestPDF (PDF reports)
- AutoMapper (object mapping)
- FluentValidation (model validation)
- Swagger (API documentation)
- StackExchange.Redis (caching)
- FuzzySharp (fuzzy search)
- Microsoft Identity (user management)
-
Swagger UI ? https://my-store.runasp.net/swagger/index.html
Interactive API documentation with ability to test endpoints. -
ERD (Entity Relationship Diagram) https://www.mermaidchart.com/app/projects/e83481e1-0ccf-49a4-a8c4-a78e722e996f/diagrams/e6f2cc00-dae2-46ad-981b-d57e32488218/version/v0.1/edit The database schema is documented using Mermaid chart for better visualization:
- .NET 8 SDK
- SQL Server
- Redis
- Stripe Account (for payments)
- Google Developer Console (for Google login)
-
Clone the repository
- git clone https://github.com/AmiraAshour/Store.g it cd store-api
-
Configure appsettings.json
- Add your connection strings, Stripe keys, Google OAuth credentials, and email settings.
-
Run database migrations
- dotnet ef database update
-
Start Redis server (if using caching)
-
Run the application
- dotnet run
- Access Swagger UI
- Navigate to
https://localhost:7025/swaggerfor interactive API documentation.
- Hangfire Dashboard
- Navigate to
/dashboardfor background job monitoring.
-
Account:
/api/account
Register, login, Google login, email confirmation, password reset, profile management -
Products:
/api/products
CRUD, search, reviews, photos -
Categories:
/api/categories
CRUD -
Orders:
/api/orders
Create, get, delivery methods (admin only) -
Basket:
/api/basket
Add, update, remove, clear items -
Wishlist:
/api/wishlist
Add/remove/get wishlist items -
Address:
/api/address
Add, update, delete, get addresses -
Payment:
/api/payment
Stripe payment processing -
Reports:
/api/reports
Daily/monthly PDF reports (admin only)
## Project Structure
Store.API/
├── Controllers/ # API controllers (Account, Products, Orders, etc.)
├── Middleware/ # Custom middleware (exception handling, logging, etc.)
├── Properties/ # Project properties and settings
├── Program.cs # Application entry point and configuration
├── appsettings.json # Main configuration file
Store.Core/
├── DTO/ # Data Transfer Objects
├── Entities/ # Domain entities (Product, Category, User, Order, etc.)
├── Interfaces/ # Service and repository interfaces
├── Services/ # Business logic / service implementations
├── Shared/ # Shared utilities, enums, helpers
├── FluentValidation/ # Validators for entities and DTOs
Store.Infrastructure/
├── Data/ # DbContext, migrations, database seeding
├── Repositories/ # Repository implementations
├── Config/ # Entity configurations
wwwroot/
├── images/ # Static files (uploads, product photos, etc.)
README.md # Project documentation
Contributions are welcome!
- Fork the repo
- Create a feature branch
- Submit a pull request
This project is licensed under the MIT License.
For questions or support, open an issue or contact amira3shour74@gmail.com (mailto:amira3shour74@gmail.com).