How ajayxr/pandaapi works
PandaAPI is an ASP.NET Core REST API for Brazilian document workflows. Its main paths are CPF/CNPJ validation (including CSV/XLSX batch validation), CNPJ lookup and PDF reporting, and account registration or login that returns JWTs. It also generates document numbers and exposes health checks. The graph includes the database and the external CNPJ data provider. Relationships reflect shown calls and README capabilities; unsampled controllers and runtime wiring are represented only where the source index or README supports them.
Main entry points: Program.cs ASP.NET runtime · GetCnpjController.cs CNPJ lookup endpoints · AuthService.cs Account and JWT service · CnpjValidator.cs CNPJ validation
Components 20
API and access
- ASP.NET runtime
PandaAPI/Program.cs - Validation endpoints
PandaAPI/Controllers/ValidationController.cs - CPF batch endpoint
PandaAPI/Controllers/CpfBatchValidationController.cs - Document generation endpoint
PandaAPI/Controllers/GenerateController.cs - CNPJ lookup endpoints
PandaAPI/Controllers/GetCnpjController.cs - Authentication endpoints
PandaAPI/Controllers/AuthController.cs - Health endpoints
PandaAPI/Controllers/HealthController.cs
Document services
- CPF validation
PandaAPI/Services/CpfValidator.cs - CNPJ validation
PandaAPI/Services/CnpjValidator.cs - Batch file processing
PandaAPI/Services/CpfBatchValidationService.cs - CNPJ data lookup
PandaAPI/Services/GetCnpjService.cs - PDF report generation
PandaAPI/Services/CnpjPdfService.cs
Identity and storage
- Authentication contract
PandaAPI/Interfaces/IAuthService.cs - Account and JWT service
PandaAPI/Services/AuthService.cs - User database
PandaAPI/Data/AppDbContext.cs - User and auth DTOs
PandaAPI/Models - JWT and provider options
PandaAPI/Configuration
Health and integrations
- Database health check
PandaAPI/HealthChecks/DatabaseHealthCheck.cs - cnpj.ai provider
Other components
- API consumer
Connections 26
- API consumer → ASP.NET runtime: sends requests
PandaAPI/Program.cs - ASP.NET runtime → Validation endpoints: routes requests
PandaAPI/Program.cs - ASP.NET runtime → CPF batch endpoint: routes requests
PandaAPI/Program.cs - ASP.NET runtime → Document generation endpoint: routes requests
PandaAPI/Program.cs - ASP.NET runtime → CNPJ lookup endpoints: routes requests
PandaAPI/Program.cs - ASP.NET runtime → Authentication endpoints: routes requests
PandaAPI/Program.cs - ASP.NET runtime → Health endpoints: routes requests
PandaAPI/Program.cs - Validation endpoints → CPF validation: validates CPF
PandaAPI/Controllers/ValidationController.cs - Validation endpoints → CNPJ validation: validates CNPJ
PandaAPI/Controllers/ValidationController.cs - CPF batch endpoint → Batch file processing: processes upload
PandaAPI/Controllers/CpfBatchValidationController.cs - Batch file processing → CPF validation: checks records
PandaAPI/Services/CpfBatchValidationService.cs - Document generation endpoint → CPF validation: generates CPF
PandaAPI/Controllers/GenerateController.cs - Document generation endpoint → CNPJ validation: generates CNPJ
PandaAPI/Controllers/GenerateController.cs - CNPJ lookup endpoints → CNPJ validation: checks CNPJ
PandaAPI/Controllers/GetCnpjController.cs - CNPJ lookup endpoints → CNPJ data lookup: fetches company data
PandaAPI/Controllers/GetCnpjController.cs - CNPJ lookup endpoints → PDF report generation: builds report
PandaAPI/Controllers/GetCnpjController.cs - PDF report generation → CNPJ validation: formats CNPJ
PandaAPI/Services/CnpjPdfService.cs - Authentication endpoints → Authentication contract: calls auth operations
PandaAPI/Controllers/AuthController.cs - ASP.NET runtime → Account and JWT service: registers implementation
PandaAPI/Program.cs - Account and JWT service → User database: reads and writes users
PandaAPI/Services/AuthService.cs - Account and JWT service → User and auth DTOs: uses user and DTO types
PandaAPI/Services/AuthService.cs - Account and JWT service → JWT and provider options: reads JWT options
PandaAPI/Services/AuthService.cs - ASP.NET runtime → JWT and provider options: configures JWT
PandaAPI/Program.cs - ASP.NET runtime → Database health check: registers readiness check
PandaAPI/Program.cs - Database health check → User database: checks connectivity
PandaAPI/HealthChecks/DatabaseHealthCheck.cs - CNPJ data lookup → cnpj.ai provider: requests company data
PandaAPI/Services/GetCnpjService.cs