How 3bd-allah/donation-hub works
DonationHub is an ASP.NET Core donation and crowdfunding API. Users register or sign in, then use JWT-protected endpoints; category reads are public, while category changes require an admin. The application also models campaigns and donations, but the supplied tree and excerpts do not show campaign or donation request workflows, so those are represented as domain and persistence capabilities rather than an invented pipeline. The graph focuses on demonstrated controller dispatch, selected use-case dependencies, and startup seeding; unsampled feature implementations are not assumed.
Main entry points: AppDbContext.cs EF Core Context · DatabaseSeeder.cs Database Seeder · Category.cs Category Model · ApplicationUser.cs Identity User
Components 21
HTTP API
- Authentication Endpoints
DonationHub.Api/Controllers/AuthController.cs - Category Endpoints
DonationHub.Api/Controllers/CategoryController.cs - API Startup
DonationHub.Api/Program.cs
Application Use Cases
- Authentication Use Cases
DontationHub.Application/Features/Authentication - Login Handler
DontationHub.Application/Features/Authentication/Login/LoginCommandHandler.cs - Refresh Handler
DontationHub.Application/Features/Authentication/Refresh/RotateRefreshTokenHandler.cs - Category Use Cases
DontationHub.Application/Features/Categories - Category Detail Query
DontationHub.Application/Features/Categories/GetById/GetCategoryByIdQuery.cs - Application Contracts
DontationHub.Application/Shared/RequestResponse.cs
Domain Model
- Category Model
DonationHub.Domain/Entities/Category.cs - Campaign Model
DonationHub.Domain/Entities/Campaign.cs - Donation Model
DonationHub.Domain/Entities/Donation.cs - Refresh Token Model
DonationHub.Domain/Entities/RefreshToken.cs
Identity and Persistence
- Identity User
DonationHub.Infrastructure/Identity/ApplicationUser.cs - Login Service
DonationHub.Infrastructure/Authentication/LoginService.cs - Token Service
DonationHub.Infrastructure/Services/TokenService.cs - EF Core Context
DonationHub.Infrastructure/Persistence/AppDbContext.cs - Generic Repository
DonationHub.Infrastructure/Repositories/BaseRepository.cs - Database Seeder
DonationHub.Infrastructure/Persistence/Seed/DatabaseSeeder.cs
Other components
- API Client
- SQL Server Database
Connections 23
- API Client → Authentication Endpoints: sends requests
DonationHub.Api/Controllers/AuthController.cs - API Client → Category Endpoints: sends requests
DonationHub.Api/Controllers/CategoryController.cs - Authentication Endpoints → Authentication Use Cases: dispatches requests
DonationHub.Api/Controllers/AuthController.cs - Category Endpoints → Category Use Cases: dispatches requests
DonationHub.Api/Controllers/CategoryController.cs - Login Handler → Login Service: calls
DontationHub.Application/Features/Authentication/Login/LoginCommandHandler.cs - Login Handler → Token Service: calls
DontationHub.Application/Features/Authentication/Login/LoginCommandHandler.cs - Refresh Handler → Token Service: calls
DontationHub.Application/Features/Authentication/Refresh/RotateRefreshTokenHandler.cs - Login Service → Identity User: uses identity
DonationHub.Infrastructure/Authentication/LoginService.cs - Category Detail Query → Generic Repository: queries
DontationHub.Application/Features/Categories/GetById/GetCategoryByIdQuery.cs - Category Detail Query → Category Model: reads
DontationHub.Application/Features/Categories/GetById/GetCategoryByIdQuery.cs - Generic Repository → EF Core Context: uses
DonationHub.Infrastructure/Repositories/BaseRepository.cs - EF Core Context → SQL Server Database: persists entities
README.md - EF Core Context → Identity User: maps
DonationHub.Infrastructure/Persistence/AppDbContext.cs - EF Core Context → Category Model: maps
DonationHub.Infrastructure/Persistence/AppDbContext.cs - EF Core Context → Campaign Model: maps
DonationHub.Infrastructure/Persistence/AppDbContext.cs - EF Core Context → Donation Model: maps
DonationHub.Infrastructure/Persistence/AppDbContext.cs - EF Core Context → Refresh Token Model: maps
DonationHub.Infrastructure/Persistence/AppDbContext.cs - Database Seeder → EF Core Context: seeds data
DonationHub.Infrastructure/Persistence/Seed/DatabaseSeeder.cs - Database Seeder → Identity User: creates admin
DonationHub.Infrastructure/Persistence/Seed/DatabaseSeeder.cs - Database Seeder → Category Model: creates categories
DonationHub.Infrastructure/Persistence/Seed/DatabaseSeeder.cs - Database Seeder → Campaign Model: creates campaign
DonationHub.Infrastructure/Persistence/Seed/DatabaseSeeder.cs - API Startup → Database Seeder: runs seeding
DonationHub.Api/Program.cs - API Startup → EF Core Context: configures startup
DonationHub.Api/Program.cs