mirror of
https://github.com/kharonsec/br-acc
synced 2026-04-25 17:15:02 +02:00
docs: redesign README with new brand identity and structure (#14)
Rewrite both EN and pt-BR READMEs with improved information architecture: badges, Mermaid architecture diagram, dataset matrix, collapsible sections, and public-safe defaults documentation. Add PNG header banner. Co-authored-by: bruno cesar <brunoclz@brunos-MacBook-Pro.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
266
README.md
266
README.md
@@ -1,126 +1,216 @@
|
||||
# BR/ACC Open Graph
|
||||
# br/acc open graph
|
||||
|
||||
[](docs/brand/bracc-header.jpg)
|
||||
[](docs/brand/bracc-header.png)
|
||||
|
||||
Language: **English** | [Português (Brasil)](docs/pt-BR/README.md)
|
||||
[English](README.md) | [Portugues](docs/pt-BR/README.md)
|
||||
|
||||
[](https://github.com/World-Open-Graph/br-acc/actions/workflows/ci.yml)
|
||||
**Open-source graph infrastructure that cross-references Brazil's public databases to generate actionable intelligence for civic improvement.**
|
||||
|
||||
[](https://github.com/brunoclz/world-transparency-graph/actions/workflows/ci.yml)
|
||||
[](https://www.gnu.org/licenses/agpl-3.0)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/commits)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/issues)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/stargazers)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/network/members)
|
||||
[](https://x.com/brunoclz)
|
||||
[](https://discord.gg/YyvGGgNGVD)
|
||||
|
||||
BR/ACC Open Graph is an open-source graph infrastructure for public data intelligence, built as an initiative from [World Open Graph](https://worldopengraph.com). Primary website: [bracc.org](https://bracc.org)
|
||||
[Discord](https://discord.gg/YyvGGgNGVD) | [Twitter](https://x.com/brunoclz) | [Website](https://bracc.org) | [Contributing](#contributing)
|
||||
|
||||
## What BR/ACC Represents
|
||||
---
|
||||
|
||||
- Public-interest graph infrastructure for transparency work.
|
||||
- Reproducible ingestion and processing for public records.
|
||||
- Investigative signals with explicit methodological caution.
|
||||
## What is br/acc?
|
||||
|
||||
Data patterns from public records are signals, not legal proof.
|
||||
br/acc is a decentralized movement of Brazilian builders using technology and open data to make public information more accessible. This repository is one of its projects: an open-source graph infrastructure that ingests official Brazilian public databases — company registries, health records, education metrics, employment data, public finances, procurement, environment — and normalizes them into a single queryable graph.
|
||||
|
||||
## What Is In This Repository
|
||||
It makes public data that is already open but scattered across dozens of portals accessible in one place. It does not interpret, score, or rank results — it surfaces connections and lets users draw their own conclusions.
|
||||
|
||||
- Public API (`api/`)
|
||||
- ETL pipelines and downloaders (`etl/`, `scripts/`)
|
||||
- Frontend explorer (`frontend/`)
|
||||
- Infrastructure and schema bootstrap (`infra/`)
|
||||
- Documentation, legal pack, and release gates (`docs/`, root policies)
|
||||
[Learn more at bracc.org](https://bracc.org)
|
||||
|
||||
## Architecture At A Glance
|
||||
---
|
||||
|
||||
- Graph DB: Neo4j 5 Community
|
||||
- Backend: FastAPI (Python 3.12+, async)
|
||||
- Frontend: Vite + React 19 + TypeScript
|
||||
- ETL: Python (pandas, httpx)
|
||||
- Infra: Docker Compose
|
||||
## Features
|
||||
|
||||
- **45 data pipelines** — CNPJ, TSE, DataSUS, INEP, CAGED, RAIS, IBAMA, SICONFI, PNCP, Portal da Transparencia, and 35 more
|
||||
- **Neo4j graph database** — entities, relationships, and connections normalized into a single queryable graph
|
||||
- **React frontend** — search, explore corporate networks, and analyze entity connections
|
||||
- **Public API** — programmatic access to graph data via FastAPI
|
||||
- **Reproducible ETL** — every data source has a download script and a transform-load pipeline
|
||||
- **Privacy-first** — LGPD compliant, public-safe defaults, no personal data exposure
|
||||
|
||||
---
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# set at least NEO4J_PASSWORD
|
||||
|
||||
make dev
|
||||
|
||||
cp .env.example .env # set NEO4J_PASSWORD
|
||||
make dev # start all services
|
||||
export NEO4J_PASSWORD=your_password
|
||||
make seed
|
||||
make seed # load sample data
|
||||
```
|
||||
|
||||
- API: `http://localhost:8000/health`
|
||||
- Frontend: `http://localhost:3000`
|
||||
- Neo4j Browser: `http://localhost:7474`
|
||||
You should see all containers running. Verify with:
|
||||
|
||||
- API: http://localhost:8000/health
|
||||
- Frontend: http://localhost:3000
|
||||
- Neo4j Browser: http://localhost:7474
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
| Layer | Technology |
|
||||
|---|---|
|
||||
| Graph DB | Neo4j 5 Community |
|
||||
| Backend | FastAPI (Python 3.12+, async) |
|
||||
| Frontend | Vite + React 19 + TypeScript |
|
||||
| ETL | Python (pandas, httpx) |
|
||||
| Infra | Docker Compose |
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
A[Public Data Sources] --> B[ETL Pipelines]
|
||||
B --> C[(Neo4j)]
|
||||
C --> D[FastAPI]
|
||||
D --> E[React Frontend]
|
||||
D --> F[Public API]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Repository Map
|
||||
|
||||
- `api/`: FastAPI app, routers, Cypher query loading
|
||||
- `etl/`: pipeline definitions and ETL runtime
|
||||
- `frontend/`: React application for graph exploration
|
||||
- `infra/`: Neo4j initialization and compose-related infra
|
||||
- `scripts/`: operational and validation scripts
|
||||
- `docs/`: legal, release, and dataset documentation
|
||||
|
||||
## Operating Modes / Public-Safe Defaults
|
||||
|
||||
Use these defaults for public deployments:
|
||||
|
||||
- `PRODUCT_TIER=community`
|
||||
- `PUBLIC_MODE=true`
|
||||
- `PUBLIC_ALLOW_PERSON=false`
|
||||
- `PUBLIC_ALLOW_ENTITY_LOOKUP=false`
|
||||
- `PUBLIC_ALLOW_INVESTIGATIONS=false`
|
||||
- `PATTERNS_ENABLED=false`
|
||||
- `VITE_PUBLIC_MODE=true`
|
||||
- `VITE_PATTERNS_ENABLED=false`
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# dependencies
|
||||
cd api && uv sync --dev
|
||||
cd ../etl && uv sync --dev
|
||||
cd ../frontend && npm install
|
||||
|
||||
# quality
|
||||
make check
|
||||
make neutrality
|
||||
```
|
||||
api/ FastAPI backend (routes, services, models)
|
||||
etl/ ETL pipelines and download scripts
|
||||
frontend/ React app (Vite + TypeScript)
|
||||
infra/ Docker, Neo4j schema, seed scripts
|
||||
scripts/ Utility and automation scripts
|
||||
docs/ Documentation, brand assets, legal index
|
||||
data/ Downloaded datasets (git-ignored)
|
||||
```
|
||||
|
||||
## Releases
|
||||
---
|
||||
|
||||
Track update history in GitHub Releases:
|
||||
|
||||
- [Releases page](https://github.com/World-Open-Graph/br-acc/releases)
|
||||
- [Release policy](docs/release/release_policy.md)
|
||||
|
||||
## API Surface
|
||||
## API Reference
|
||||
|
||||
| Method | Route | Description |
|
||||
|---|---|---|
|
||||
| GET | `/health` | Health check |
|
||||
| GET | `/api/v1/public/meta` | Aggregated metrics and source health |
|
||||
| GET | `/api/v1/public/graph/company/{cnpj_or_id}` | Public company subgraph |
|
||||
| GET | `/api/v1/public/patterns/company/{cnpj_or_id}` | Returns `503` while pattern engine is disabled |
|
||||
| GET | `/api/v1/public/patterns/company/{cnpj_or_id}` | Pattern analysis (when enabled) |
|
||||
|
||||
## Brazil Dataset Matrix (Legal Basis)
|
||||
Full interactive docs available at `http://localhost:8000/docs` after starting the API.
|
||||
|
||||
BR/ACC maintains a legal-basis registry for Brazilian public datasets used in transparency workflows.
|
||||
|
||||
| Scope | Coverage | Includes legal basis | File |
|
||||
|---|---|---|---|
|
||||
| Brazil public data matrix | 93 sources | Yes | [docs/pt-BR/datasets/matriz-bases-publicas-brasil.md](docs/pt-BR/datasets/matriz-bases-publicas-brasil.md) |
|
||||
|
||||
This matrix includes dataset, disclosure scope, source URL, format, indicative legal foundation, and approximate record volume where available. The current full matrix is maintained in Portuguese (pt-BR).
|
||||
---
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) for workflow, quality gates, and review expectations.
|
||||
We welcome contributions of all kinds — code, data pipelines, documentation, and bug reports. Check open issues for good first tasks, or open a new one to discuss your idea.
|
||||
|
||||
## Contributors
|
||||
If you find this project useful, **star the repo** — it helps others discover it.
|
||||
|
||||
- BRACC Core Team — maintainers
|
||||
- OpenAI Codex — AI-assisted engineering contributor
|
||||
---
|
||||
|
||||
## Support the Project
|
||||
|
||||
[](https://github.com/sponsors/brunoclz)
|
||||
|
||||
If you want to support development directly:
|
||||
|
||||
| Network | Address |
|
||||
|---|---|
|
||||
| Solana | `HFceUyei1ndQypNKoiYSsHLHrVcaMZeNBeRhs8LmmkLn` |
|
||||
| Ethereum | `0xbB3538D3e1B1Dd7c916BE7DfAC9ac7e322f592c7` |
|
||||
|
||||
---
|
||||
|
||||
## Community
|
||||
|
||||
- **Discord**: [discord.gg/YyvGGgNGVD](https://discord.gg/YyvGGgNGVD)
|
||||
- **Twitter**: [@brunoclz](https://x.com/brunoclz)
|
||||
- **Website**: [bracc.org](https://bracc.org)
|
||||
- **Brazilian Accelerationism Community** on X
|
||||
|
||||
---
|
||||
|
||||
## Legal & Ethics
|
||||
|
||||
All data processed by this project is public by law. Every source is published by a Brazilian government portal or international open-data initiative and made available under one or more of the following legal instruments:
|
||||
|
||||
| Law | Scope |
|
||||
|---|---|
|
||||
| **CF/88 Art. 5 XXXIII, Art. 37** | Constitutional right to access public information |
|
||||
| **Lei 12.527/2011 (LAI)** | Freedom of Information Act — regulates access to government data |
|
||||
| **LC 131/2009 (Lei da Transparencia)** | Mandates real-time publication of fiscal and budget data |
|
||||
| **Lei 13.709/2018 (LGPD)** | Data protection — Art. 7 IV/VII allow processing of publicly available data for public interest |
|
||||
| **Lei 14.129/2021 (Governo Digital)** | Mandates open data by default for government agencies |
|
||||
|
||||
<details>
|
||||
<summary><b>Brazil Dataset Matrix (Legal Basis)</b></summary>
|
||||
|
||||
| # | Source | Portal | Legal Basis |
|
||||
|---|--------|--------|-------------|
|
||||
| 1 | CNPJ (Company Registry) | Receita Federal | LAI, CF Art. 37 |
|
||||
| 2 | TSE (Elections & Donations) | dadosabertos.tse.jus.br | Lei 9.504/1997 (Lei Eleitoral), LAI |
|
||||
| 3 | Portal da Transparencia | portaldatransparencia.gov.br | LC 131/2009, LAI |
|
||||
| 4 | CEIS/CNEP (Sanctions) | Portal da Transparencia | LAI, Lei 12.846/2013 (Lei Anticorrupcao) |
|
||||
| 5 | BNDES (Dev. Bank Loans) | bndes.gov.br | LAI, LC 131/2009 |
|
||||
| 6 | PGFN (Tax Debt) | portaldatransparencia.gov.br | LAI, Lei 6.830/1980 |
|
||||
| 7 | ComprasNet (Procurement) | comprasnet.gov.br | Lei 14.133/2021 (Licitacoes), LAI |
|
||||
| 8 | TCU (Audit Sanctions) | portal.tcu.gov.br | LAI, CF Art. 71 |
|
||||
| 9 | TransfereGov | transferegov.sistema.gov.br | LC 131/2009, LAI |
|
||||
| 10 | RAIS (Labor Stats) | PDET/MTE | LAI (aggregate, no personal data) |
|
||||
| 11 | INEP (Education Census) | dados.gov.br | LAI, Lei 14.129/2021 |
|
||||
| 12 | DataSUS/CNES (Health) | datasus.saude.gov.br | LAI, Lei 8.080/1990 (SUS) |
|
||||
| 13 | IBAMA (Embargoes) | dados.gov.br | LAI, Lei 9.605/1998 (Crimes Ambientais) |
|
||||
| 14 | DOU (Official Gazette) | in.gov.br | CF Art. 37 (publicidade) |
|
||||
| 15 | Camara (Deputy Expenses) | dadosabertos.camara.leg.br | LAI, CF Art. 37 |
|
||||
| 16 | Senado (Senator Expenses) | dadosabertos.senado.leg.br | LAI, CF Art. 37 |
|
||||
| 17 | ICIJ (Offshore Leaks) | offshoreleaks.icij.org | Public interest journalism database |
|
||||
| 18 | OpenSanctions (Global PEPs) | opensanctions.org | Open-data aggregator (CC-licensed) |
|
||||
| 19 | CVM (Securities Proceedings) | dados.cvm.gov.br | LAI, Lei 6.385/1976 |
|
||||
| 20 | CVM Funds | dados.cvm.gov.br | LAI, Lei 6.385/1976 |
|
||||
| 21 | Servidores (Public Servants) | Portal da Transparencia | LC 131/2009, LAI |
|
||||
| 22 | CEAF (Expelled Servants) | portaldatransparencia.gov.br | LAI, Lei 8.112/1990 |
|
||||
| 23 | CEPIM (Barred NGOs) | portaldatransparencia.gov.br | LAI |
|
||||
| 24 | CPGF (Govt Credit Cards) | portaldatransparencia.gov.br | LC 131/2009, LAI |
|
||||
| 25 | Viagens a Servico | portaldatransparencia.gov.br | LC 131/2009, LAI |
|
||||
| 26 | Renuncias Fiscais | portaldatransparencia.gov.br | LC 131/2009, LAI |
|
||||
| 27 | Acordos de Leniencia | portaldatransparencia.gov.br | Lei 12.846/2013, LAI |
|
||||
| 28 | BCB Penalidades | dados.bcb.gov.br | LAI, Lei 4.595/1964 |
|
||||
| 29 | STF (Supreme Court) | portal.stf.jus.br | CF Art. 93 IX (publicidade judiciaria) |
|
||||
| 30 | PEP CGU | portaldatransparencia.gov.br | LAI, Decreto 9.687/2019 |
|
||||
| 31 | TSE Bens (Candidate Assets) | dadosabertos.tse.jus.br | Lei 9.504/1997 |
|
||||
| 32 | TSE Filiados (Party Members) | dadosabertos.tse.jus.br | Lei 9.096/1995 (Lei dos Partidos) |
|
||||
| 33 | OFAC SDN | treasury.gov | US public sanctions list |
|
||||
| 34 | EU Sanctions | data.europa.eu | EU public sanctions list |
|
||||
| 35 | UN Sanctions | un.org | UN Security Council public list |
|
||||
| 36 | World Bank Debarment | worldbank.org | Public debarment list |
|
||||
| 37 | Holdings (derived) | — | Derived from CNPJ data |
|
||||
| 38 | SIOP (Budget Amendments) | siop.planejamento.gov.br | LC 131/2009, LAI |
|
||||
| 39 | Senado CPIs | dadosabertos.senado.leg.br | LAI, CF Art. 58 §3 |
|
||||
|
||||
</details>
|
||||
|
||||
All findings are presented as source-attributed data connections, never as accusations. The platform enforces public-safe defaults that prevent exposure of personal information in public deployments.
|
||||
|
||||
<details>
|
||||
<summary><b>Public-safe defaults</b></summary>
|
||||
|
||||
```
|
||||
PRODUCT_TIER=community
|
||||
PUBLIC_MODE=true
|
||||
PUBLIC_ALLOW_PERSON=false
|
||||
PUBLIC_ALLOW_ENTITY_LOOKUP=false
|
||||
PUBLIC_ALLOW_INVESTIGATIONS=false
|
||||
PATTERNS_ENABLED=false
|
||||
VITE_PUBLIC_MODE=true
|
||||
VITE_PATTERNS_ENABLED=false
|
||||
```
|
||||
</details>
|
||||
|
||||
- [ETHICS.md](ETHICS.md)
|
||||
- [LGPD.md](LGPD.md)
|
||||
- [PRIVACY.md](PRIVACY.md)
|
||||
@@ -128,7 +218,17 @@ Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) for wor
|
||||
- [DISCLAIMER.md](DISCLAIMER.md)
|
||||
- [SECURITY.md](SECURITY.md)
|
||||
- [ABUSE_RESPONSE.md](ABUSE_RESPONSE.md)
|
||||
- [docs/legal/legal-index.md](docs/legal/legal-index.md)
|
||||
- [Legal Index](docs/legal/legal-index.md)
|
||||
|
||||
---
|
||||
|
||||
## Releases
|
||||
|
||||
- [Release history](https://github.com/World-Open-Graph/br-acc/releases)
|
||||
- [Release policy](docs/release/release_policy.md)
|
||||
- [Maintainer runbook](docs/release/release_runbook.md)
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
|
||||
BIN
docs/brand/bracc-header.png
Normal file
BIN
docs/brand/bracc-header.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@@ -1,122 +1,235 @@
|
||||
# BR/ACC Open Graph
|
||||
# br/acc open graph
|
||||
|
||||
[](../brand/bracc-header.jpg)
|
||||
[](../brand/bracc-header.png)
|
||||
|
||||
Idioma: [English](../../README.md) | **Português (Brasil)**
|
||||
[English](../../README.md) | [Portugues](README.md)
|
||||
|
||||
[](https://github.com/World-Open-Graph/br-acc/actions/workflows/ci.yml)
|
||||
[](https://www.gnu.org/licenses/agpl-3.0)
|
||||
**Infraestrutura open-source em grafo que cruza bases publicas brasileiras para gerar inteligencia acionavel para melhoria civica.**
|
||||
|
||||
BR/ACC Open Graph é uma infraestrutura open source de grafo para inteligência de dados públicos.
|
||||
Site principal: [bracc.org](https://bracc.org)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/actions/workflows/ci.yml)
|
||||
[](https://www.gnu.org/licenses/agpl-3.0)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/commits)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/issues)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/stargazers)
|
||||
[](https://github.com/brunoclz/world-transparency-graph/network/members)
|
||||
[](https://x.com/brunoclz)
|
||||
[](https://discord.gg/YyvGGgNGVD)
|
||||
|
||||
BR/ACC Open Graph é uma iniciativa da [World Open Graph](https://worldopengraph.com).
|
||||
Este repositório contém o código completo da edição pública do BR/ACC.
|
||||
[Discord](https://discord.gg/YyvGGgNGVD) | [Twitter](https://x.com/brunoclz) | [Website](https://bracc.org) | [Contribuir](#contribuindo)
|
||||
|
||||
## O Que o BR/ACC Representa
|
||||
---
|
||||
|
||||
- Infraestrutura de interesse público para transparência.
|
||||
- Ingestão e processamento reprodutíveis de registros públicos.
|
||||
- Sinais investigativos com cautela metodológica explícita.
|
||||
## O que e br/acc?
|
||||
|
||||
Padrões em dados públicos são sinais, não prova jurídica.
|
||||
br/acc e um movimento descentralizado de builders brasileiros usando tecnologia e dados abertos para tornar informacao publica mais acessivel. Este repositorio e um de seus projetos: uma infraestrutura open-source em grafo que ingere bases de dados publicas brasileiras oficiais — registros de empresas, saude, educacao, emprego, financas publicas, licitacoes, meio ambiente — e normaliza tudo em um unico grafo consultavel.
|
||||
|
||||
## O Que Existe Neste Repositório
|
||||
Ele torna dados publicos que ja sao abertos, mas espalhados em dezenas de portais, acessiveis em um so lugar. Nao interpreta, pontua ou classifica resultados — apenas exibe conexoes e deixa os usuarios tirarem suas proprias conclusoes.
|
||||
|
||||
- API pública (`api/`)
|
||||
- Pipelines ETL e downloaders (`etl/`, `scripts/`)
|
||||
- Frontend de exploração (`frontend/`)
|
||||
- Infraestrutura e bootstrap de schema (`infra/`)
|
||||
- Documentação, pacote legal e gates de release (`docs/`, políticas na raiz)
|
||||
[Saiba mais em bracc.org](https://bracc.org)
|
||||
|
||||
## Arquitetura (Resumo)
|
||||
---
|
||||
|
||||
- Banco de Grafo: Neo4j 5 Community
|
||||
- Backend: FastAPI (Python 3.12+, async)
|
||||
- Frontend: Vite + React 19 + TypeScript
|
||||
- ETL: Python (pandas, httpx)
|
||||
- Infra: Docker Compose
|
||||
## Funcionalidades
|
||||
|
||||
## Quick Start
|
||||
- **45 pipelines de dados** — CNPJ, TSE, DataSUS, INEP, CAGED, RAIS, IBAMA, SICONFI, PNCP, Portal da Transparencia e mais 35
|
||||
- **Banco de dados em grafo Neo4j** — entidades, relacionamentos e conexoes normalizados em um unico grafo consultavel
|
||||
- **Frontend React** — busque, explore redes empresariais e analise conexoes de entidades
|
||||
- **API publica** — acesso programatico aos dados do grafo via FastAPI
|
||||
- **ETL reproduzivel** — cada fonte de dados tem um script de download e um pipeline de transformacao e carga
|
||||
- **Privacy-first** — compativel com LGPD, defaults publicos seguros, sem exposicao de dados pessoais
|
||||
|
||||
---
|
||||
|
||||
## Inicio Rapido
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# defina ao menos NEO4J_PASSWORD
|
||||
|
||||
make dev
|
||||
|
||||
cp .env.example .env # defina NEO4J_PASSWORD
|
||||
make dev # inicie todos os servicos
|
||||
export NEO4J_PASSWORD=sua_senha
|
||||
make seed
|
||||
make seed # carregue dados de exemplo
|
||||
```
|
||||
|
||||
- API: `http://localhost:8000/health`
|
||||
- Frontend: `http://localhost:3000`
|
||||
- Neo4j Browser: `http://localhost:7474`
|
||||
Todos os containers devem estar rodando. Verifique em:
|
||||
|
||||
## Mapa do Repositório
|
||||
- API: http://localhost:8000/health
|
||||
- Frontend: http://localhost:3000
|
||||
- Neo4j Browser: http://localhost:7474
|
||||
|
||||
- `api/`: app FastAPI, rotas e carregamento de queries Cypher
|
||||
- `etl/`: definição de pipelines e runtime ETL
|
||||
- `frontend/`: aplicação React para exploração do grafo
|
||||
- `infra/`: inicialização do Neo4j e infra relacionada
|
||||
- `scripts/`: scripts operacionais e de validação
|
||||
- `docs/`: documentação legal, de release e de datasets
|
||||
---
|
||||
|
||||
## Modos de Operação / Defaults Públicos
|
||||
## Arquitetura
|
||||
|
||||
Use estes defaults para deploy público:
|
||||
| Camada | Tecnologia |
|
||||
|---|---|
|
||||
| Banco de Grafo | Neo4j 5 Community |
|
||||
| Backend | FastAPI (Python 3.12+, async) |
|
||||
| Frontend | Vite + React 19 + TypeScript |
|
||||
| ETL | Python (pandas, httpx) |
|
||||
| Infra | Docker Compose |
|
||||
|
||||
- `PRODUCT_TIER=community`
|
||||
- `PUBLIC_MODE=true`
|
||||
- `PUBLIC_ALLOW_PERSON=false`
|
||||
- `PUBLIC_ALLOW_ENTITY_LOOKUP=false`
|
||||
- `PUBLIC_ALLOW_INVESTIGATIONS=false`
|
||||
- `PATTERNS_ENABLED=false`
|
||||
- `VITE_PUBLIC_MODE=true`
|
||||
- `VITE_PATTERNS_ENABLED=false`
|
||||
|
||||
## Desenvolvimento
|
||||
|
||||
```bash
|
||||
# dependências
|
||||
cd api && uv sync --dev
|
||||
cd ../etl && uv sync --dev
|
||||
cd ../frontend && npm install
|
||||
|
||||
# qualidade
|
||||
make check
|
||||
make neutrality
|
||||
```mermaid
|
||||
graph LR
|
||||
A[Fontes de Dados Publicos] --> B[Pipelines ETL]
|
||||
B --> C[(Neo4j)]
|
||||
C --> D[FastAPI]
|
||||
D --> E[Frontend React]
|
||||
D --> F[API Publica]
|
||||
```
|
||||
|
||||
## Superfície da API
|
||||
---
|
||||
|
||||
| Método | Rota | Descrição |
|
||||
## Mapa do Repositorio
|
||||
|
||||
```
|
||||
api/ Backend FastAPI (rotas, servicos, modelos)
|
||||
etl/ Pipelines ETL e scripts de download
|
||||
frontend/ App React (Vite + TypeScript)
|
||||
infra/ Docker, schema Neo4j, scripts de seed
|
||||
scripts/ Scripts utilitarios e de automacao
|
||||
docs/ Documentacao, assets de marca, indice legal
|
||||
data/ Datasets baixados (ignorado pelo git)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Referencia da API
|
||||
|
||||
| Metodo | Rota | Descricao |
|
||||
|---|---|---|
|
||||
| GET | `/health` | Health check |
|
||||
| GET | `/api/v1/public/meta` | Métricas agregadas e saúde das fontes |
|
||||
| GET | `/api/v1/public/graph/company/{cnpj_or_id}` | Subgrafo público de empresa |
|
||||
| GET | `/api/v1/public/patterns/company/{cnpj_or_id}` | Retorna `503` enquanto o engine de patterns está desabilitado |
|
||||
| GET | `/api/v1/public/meta` | Metricas agregadas e saude das fontes |
|
||||
| GET | `/api/v1/public/graph/company/{cnpj_or_id}` | Subgrafo publico de empresa |
|
||||
| GET | `/api/v1/public/patterns/company/{cnpj_or_id}` | Analise de padroes (quando habilitado) |
|
||||
|
||||
## Como Contribuir
|
||||
Documentacao interativa completa em `http://localhost:8000/docs` apos iniciar a API.
|
||||
|
||||
Contribuições são bem-vindas. Comece por [CONTRIBUTING.md](CONTRIBUTING.md) para fluxo, gates de qualidade e expectativas de revisão.
|
||||
---
|
||||
|
||||
## Contribuidores
|
||||
## Contribuindo
|
||||
|
||||
- Time Core do BR/ACC — mantenedores
|
||||
- OpenAI Codex — colaborador de engenharia com assistência de IA
|
||||
Contribuicoes de todos os tipos sao bem-vindas — codigo, pipelines de dados, documentacao e relatos de bugs. Veja as issues abertas para primeiras tarefas, ou abra uma nova para discutir sua ideia.
|
||||
|
||||
## Legal e Ética
|
||||
Se voce achou o projeto util, **de uma estrela no repo** — ajuda outras pessoas a descobri-lo.
|
||||
|
||||
- [../../ETHICS.md](../../ETHICS.md) / [ETHICS.md](ETHICS.md)
|
||||
- [../../LGPD.md](../../LGPD.md) / [LGPD.md](LGPD.md)
|
||||
- [../../PRIVACY.md](../../PRIVACY.md) / [PRIVACY.md](PRIVACY.md)
|
||||
- [../../TERMS.md](../../TERMS.md) / [TERMS.md](TERMS.md)
|
||||
- [../../DISCLAIMER.md](../../DISCLAIMER.md) / [DISCLAIMER.md](DISCLAIMER.md)
|
||||
- [../../SECURITY.md](../../SECURITY.md) / [SECURITY.md](SECURITY.md)
|
||||
- [../../ABUSE_RESPONSE.md](../../ABUSE_RESPONSE.md) / [ABUSE_RESPONSE.md](ABUSE_RESPONSE.md)
|
||||
- [../legal/legal-index.md](../legal/legal-index.md) / [legal-index.md](legal-index.md)
|
||||
---
|
||||
|
||||
## Licença
|
||||
## Apoie o Projeto
|
||||
|
||||
[GNU Affero General Public License v3.0](LICENSE)
|
||||
[](https://github.com/sponsors/brunoclz)
|
||||
|
||||
Se quiser apoiar o desenvolvimento diretamente:
|
||||
|
||||
| Rede | Endereco |
|
||||
|---|---|
|
||||
| Solana | `HFceUyei1ndQypNKoiYSsHLHrVcaMZeNBeRhs8LmmkLn` |
|
||||
| Ethereum | `0xbB3538D3e1B1Dd7c916BE7DfAC9ac7e322f592c7` |
|
||||
|
||||
---
|
||||
|
||||
## Comunidade
|
||||
|
||||
- **Discord**: [discord.gg/YyvGGgNGVD](https://discord.gg/YyvGGgNGVD)
|
||||
- **Twitter**: [@brunoclz](https://x.com/brunoclz)
|
||||
- **Website**: [bracc.org](https://bracc.org)
|
||||
- **Comunidade Brazilian Accelerationism** no X
|
||||
|
||||
---
|
||||
|
||||
## Legal e Etica
|
||||
|
||||
Todos os dados processados por este projeto sao publicos por lei. Cada fonte e publicada por um portal do governo brasileiro ou iniciativa internacional de dados abertos, disponibilizada sob um ou mais dos seguintes instrumentos legais:
|
||||
|
||||
| Lei | Escopo |
|
||||
|---|---|
|
||||
| **CF/88 Art. 5 XXXIII, Art. 37** | Direito constitucional de acesso a informacao publica |
|
||||
| **Lei 12.527/2011 (LAI)** | Lei de Acesso a Informacao — regula o acesso a dados governamentais |
|
||||
| **LC 131/2009 (Lei da Transparencia)** | Obriga publicacao em tempo real de dados fiscais e orcamentarios |
|
||||
| **Lei 13.709/2018 (LGPD)** | Protecao de dados — Art. 7 IV/VII permitem tratamento de dados publicos para interesse publico |
|
||||
| **Lei 14.129/2021 (Governo Digital)** | Obriga dados abertos por padrao para orgaos governamentais |
|
||||
|
||||
<details>
|
||||
<summary><b>Matriz de Datasets Brasil (Base Legal)</b></summary>
|
||||
|
||||
| # | Fonte | Portal | Base Legal |
|
||||
|---|-------|--------|------------|
|
||||
| 1 | CNPJ (Cadastro de Empresas) | Receita Federal | LAI, CF Art. 37 |
|
||||
| 2 | TSE (Eleicoes e Doacoes) | dadosabertos.tse.jus.br | Lei 9.504/1997 (Lei Eleitoral), LAI |
|
||||
| 3 | Portal da Transparencia | portaldatransparencia.gov.br | LC 131/2009, LAI |
|
||||
| 4 | CEIS/CNEP (Sancoes) | Portal da Transparencia | LAI, Lei 12.846/2013 (Lei Anticorrupcao) |
|
||||
| 5 | BNDES (Emprestimos) | bndes.gov.br | LAI, LC 131/2009 |
|
||||
| 6 | PGFN (Divida Ativa) | portaldatransparencia.gov.br | LAI, Lei 6.830/1980 |
|
||||
| 7 | ComprasNet (Licitacoes) | comprasnet.gov.br | Lei 14.133/2021 (Licitacoes), LAI |
|
||||
| 8 | TCU (Sancoes de Auditoria) | portal.tcu.gov.br | LAI, CF Art. 71 |
|
||||
| 9 | TransfereGov | transferegov.sistema.gov.br | LC 131/2009, LAI |
|
||||
| 10 | RAIS (Estatisticas Trabalhistas) | PDET/MTE | LAI (agregado, sem dados pessoais) |
|
||||
| 11 | INEP (Censo Educacional) | dados.gov.br | LAI, Lei 14.129/2021 |
|
||||
| 12 | DataSUS/CNES (Saude) | datasus.saude.gov.br | LAI, Lei 8.080/1990 (SUS) |
|
||||
| 13 | IBAMA (Embargos) | dados.gov.br | LAI, Lei 9.605/1998 (Crimes Ambientais) |
|
||||
| 14 | DOU (Diario Oficial) | in.gov.br | CF Art. 37 (publicidade) |
|
||||
| 15 | Camara (Despesas de Deputados) | dadosabertos.camara.leg.br | LAI, CF Art. 37 |
|
||||
| 16 | Senado (Despesas de Senadores) | dadosabertos.senado.leg.br | LAI, CF Art. 37 |
|
||||
| 17 | ICIJ (Offshore Leaks) | offshoreleaks.icij.org | Base de dados jornalistica de interesse publico |
|
||||
| 18 | OpenSanctions (PEPs Globais) | opensanctions.org | Agregador open-data (licenca CC) |
|
||||
| 19 | CVM (Processos de Valores Mobiliarios) | dados.cvm.gov.br | LAI, Lei 6.385/1976 |
|
||||
| 20 | CVM Fundos | dados.cvm.gov.br | LAI, Lei 6.385/1976 |
|
||||
| 21 | Servidores Publicos | Portal da Transparencia | LC 131/2009, LAI |
|
||||
| 22 | CEAF (Servidores Expulsos) | portaldatransparencia.gov.br | LAI, Lei 8.112/1990 |
|
||||
| 23 | CEPIM (ONGs Impedidas) | portaldatransparencia.gov.br | LAI |
|
||||
| 24 | CPGF (Cartoes Corporativos) | portaldatransparencia.gov.br | LC 131/2009, LAI |
|
||||
| 25 | Viagens a Servico | portaldatransparencia.gov.br | LC 131/2009, LAI |
|
||||
| 26 | Renuncias Fiscais | portaldatransparencia.gov.br | LC 131/2009, LAI |
|
||||
| 27 | Acordos de Leniencia | portaldatransparencia.gov.br | Lei 12.846/2013, LAI |
|
||||
| 28 | BCB Penalidades | dados.bcb.gov.br | LAI, Lei 4.595/1964 |
|
||||
| 29 | STF (Supremo Tribunal Federal) | portal.stf.jus.br | CF Art. 93 IX (publicidade judiciaria) |
|
||||
| 30 | PEP CGU | portaldatransparencia.gov.br | LAI, Decreto 9.687/2019 |
|
||||
| 31 | TSE Bens (Patrimonio de Candidatos) | dadosabertos.tse.jus.br | Lei 9.504/1997 |
|
||||
| 32 | TSE Filiados (Filiacao Partidaria) | dadosabertos.tse.jus.br | Lei 9.096/1995 (Lei dos Partidos) |
|
||||
| 33 | OFAC SDN | treasury.gov | Lista publica de sancoes dos EUA |
|
||||
| 34 | EU Sanctions | data.europa.eu | Lista publica de sancoes da UE |
|
||||
| 35 | UN Sanctions | un.org | Lista publica do Conselho de Seguranca da ONU |
|
||||
| 36 | World Bank Debarment | worldbank.org | Lista publica de impedimentos |
|
||||
| 37 | Holdings (derivado) | — | Derivado dos dados CNPJ |
|
||||
| 38 | SIOP (Emendas Orcamentarias) | siop.planejamento.gov.br | LC 131/2009, LAI |
|
||||
| 39 | Senado CPIs | dadosabertos.senado.leg.br | LAI, CF Art. 58 §3 |
|
||||
|
||||
</details>
|
||||
|
||||
Todos os achados sao apresentados como conexoes de dados atribuidas a fontes, nunca como acusacoes. A plataforma aplica defaults publicos seguros que impedem exposicao de informacoes pessoais em deployments publicos.
|
||||
|
||||
<details>
|
||||
<summary><b>Defaults publicos seguros</b></summary>
|
||||
|
||||
```
|
||||
PRODUCT_TIER=community
|
||||
PUBLIC_MODE=true
|
||||
PUBLIC_ALLOW_PERSON=false
|
||||
PUBLIC_ALLOW_ENTITY_LOOKUP=false
|
||||
PUBLIC_ALLOW_INVESTIGATIONS=false
|
||||
PATTERNS_ENABLED=false
|
||||
VITE_PUBLIC_MODE=true
|
||||
VITE_PATTERNS_ENABLED=false
|
||||
```
|
||||
</details>
|
||||
|
||||
- [ETHICS.md](../../ETHICS.md)
|
||||
- [LGPD.md](../../LGPD.md)
|
||||
- [PRIVACY.md](../../PRIVACY.md)
|
||||
- [TERMS.md](../../TERMS.md)
|
||||
- [DISCLAIMER.md](../../DISCLAIMER.md)
|
||||
- [SECURITY.md](../../SECURITY.md)
|
||||
- [ABUSE_RESPONSE.md](../../ABUSE_RESPONSE.md)
|
||||
- [Indice Legal](../legal/legal-index.md)
|
||||
|
||||
---
|
||||
|
||||
## Releases
|
||||
|
||||
- [Historico de releases](https://github.com/World-Open-Graph/br-acc/releases)
|
||||
- [Politica de releases](../release/release_policy.md)
|
||||
- [Runbook do mantenedor](../release/release_runbook.md)
|
||||
|
||||
---
|
||||
|
||||
## Licenca
|
||||
|
||||
[GNU Affero General Public License v3.0](../../LICENSE)
|
||||
|
||||
Reference in New Issue
Block a user