How dadosjusbr/api works
DadosJusBr is a Go API serving consolidated, open judicial remuneration data to the public and portal clients. Its workflow begins with HTTP requests for agency and remuneration information, filtered search/downloads, or transparency indexes; handlers retrieve stored collection results and return summaries or raw data, with search results optionally fetched from S3 and serialized as CSV. The README describes upstream collectors and storage, but this repository exposes the API rather than implementing collection or normalization. Handler internals are only partially sampled, so uncertain route-to-storage details are not expanded.
Main entry points: uiapi/handlers.go Portal handlers · main.go Server and routes · papi/handlers.go Public handlers · postgres.go Search database adapter
Components 13
HTTP entrypoints
- Server and routes
main.go
Portal API
- Portal handlers
uiapi/handlers.go - Search filters
uiapi/search_params.go - Search database adapter
uiapi/postgres.go - Archive search
uiapi/aws.go - Portal response models
uiapi/models.go
Public data API
- Public handlers
papi/handlers.go - Public response models
papi/models.go
Data access
- Storage client
- PostgreSQL
- AWS S3
Other components
- API consumer
- Upstream collectors
Connections 15
- API consumer → Server and routes: sends HTTP requests
- Server and routes → Portal handlers: dispatches portal routes
- Server and routes → Public handlers: dispatches public routes
- Server and routes → Storage client: constructs client
- Portal handlers → Storage client: reads agency data
- Public handlers → Storage client: reads stored data
- Portal handlers → Search filters: parses search filters
- Portal handlers → Search database adapter: queries filtered records
- Search database adapter → PostgreSQL: runs SQL queries
- Portal handlers → Archive search: requests archive rows
- Archive search → AWS S3: downloads ZIP objects
- Portal handlers → Portal response models: builds API responses
- Public handlers → Public response models: builds API responses
- Storage client → PostgreSQL: reads stored records
- Storage client → AWS S3: reads stored files