How arthur-sena/teste-novibet works
Project type and purpose
• This is a .NET 8.0 Web API microservice (“Novibet”) with a complementary test project (“Novibet.Test”).
• Purpose: provide IP-lookup and country information via HTTP endpoints, backed by Entity Framework Core, in-memory caching, and a scheduled job to refresh IP data.
File structure
• Top-level Novibet folder contains:
• Controllers: Http API entry points (IpController).
• Services: business logic interfaces and implementations (IpService, UpdateIpJobService).
• Application: higher‐level use‐case orchestrators (IpApplication, UpdateIpJobApplication).
• Repositories: data‐access interfaces and EF Core implementations (IpRepository, CountryRepository).
• Models: domain and DTO classes (IPAddressDomain, CountryDomain, IPAddressResponse, IpReportResponse, CacheConfiguration).
• AppDbContext: EF Core DbContext, configured via appsettings.json.
• Program.cs / launchSettings.json: application startup, dependency injection, Quartz scheduler registration.
• Novibet.Test folder:
• Unit tests for Repository classes using xUnit, Moq, EF Core In-Memory provider.
README for additional insights
• Uses EF Core for persistence.
• In-memory caching for repeated IP lookups.
• Quartz to schedule a recurring job that updates IP data.
• xUnit/Moq for testing.
Elements
• Blue rectangles for API/Controllers
• Green rectangles for Application/Service layer
• Orange rectangles for Repository/DbContext
Summary of steps
• Step C: Annotate with technologies (.NET 8, EF Core, MemoryCache, Quartz).
• Step E: Optionally, add a small inset showing the test project layering over repositories with EF InMemory.