Project structure
API layer
Chargeworx.Api- ASP.NET Core Web API with Swagger/OpenAPI documentation
- OAuth2 client credentials flow via IdentityServer4
- Scope-based authorization (AdminUIScope, PaymentScope)
- Controllers organized by domain (Admin, Payment, Internal)
- Request logging middleware and health checks
- HTTP clients for admin operations
- Typed clients for company, project, user, and transaction management
- HTTP clients for payment operations
- Transaction processing and payment info management
Admin UI layer
Chargeworx.Admin- ASP.NET Core MVC admin portal with Razor views
- Cookie-based authentication with optional MFA
- Session management and user invitation system
- Real-time notifications via SignalR
- Report generation and data visualization
- Background process monitoring
Domain layer
Chargeworx.Api.Domain- Business logic and orchestration
- Managers for each domain entity
- Integration with payment processors (CyberSource, PayPal/Payflow)
- Anti-fraud service integration
- Import/export services
- Email notification services
- Domain models and DTOs
- Enums and constants
- Validation attributes
- Request handlers (Admin, Payment)
Data layer
Chargeworx.Api.Data- Entity Framework Core contexts for 4 separate databases
- Repository pattern via stores
- Stored procedures for complex queries
- Database migrations and seeding
- Connection abstractions for multi-database support
- Shared configuration models
- Encryption helpers (AES, RSA)
- Cache management
- AWS integration utilities
Payment processing
Chargeworx.PaymentProcessor- CyberSource SOAP/REST API integration
- PayPal Payflow Pro integration
- Account updater service
- Chargeback and refund processing
- Report download and parsing
Utilities
Chargeworx.ConsoleImporter- Console utility for data seeding
- Bulk import of companies, projects, and keys
- Migration tools
- Integration test harness
- Test configuration and fixtures
- Email sender service
- Firebase push notifications
- View rendering for emails
- In-memory cache manager
