Prerequisites
Before you begin, ensure you have the following installed:- Docker (20.10+)
- Docker Compose (2.0+)
- Git
- 8GB+ RAM recommended (minimum 4GB)
- 10GB+ disk space for Docker images and initial data
For production deployments with 40M+ nodes, you’ll need significantly more resources (32GB+ RAM recommended, 64GB ideal).
Quick Start (3 Commands)
Get BR-ACC running with sample data in under 5 minutes:Configure environment
.env.example are suitable for local development. For production, you should:- Set a strong
NEO4J_PASSWORD(not “changeme”) - Generate a secure
JWT_SECRET_KEY(32+ characters) - Adjust memory settings based on your hardware
Example production memory settings
Example production memory settings
Verify Installation
Once the services are running, verify that everything is working:API Documentation
Interactive Swagger UI at http://localhost:8000/docs
Frontend
React application at http://localhost:3000
Neo4j Browser
Graph database UI at http://localhost:7474
API Health
Health endpoint at http://localhost:8000/health
Your First Query
Let’s explore the API with some example requests:- Get Metadata
- Search Company
- Neo4j Cypher
- Python SDK
- Total nodes and relationships
- Company, contract, and sanction counts
- Source health status
- Data quality metrics
Loading Real Data
The seed data is minimal and synthetic. To load real Brazilian public data:Option 1: Individual Source (Recommended for Testing)
Option 2: Full Ingestion (Heavy)
- Prompts for confirmation before resetting the database
- Runs all implemented ETL pipelines in order
- Continues on errors and generates detailed reports
- Can take several hours to complete
- Writes audit reports to
audit-results/bootstrap-all/
View bootstrap-all report
View bootstrap-all report
loaded- Successfully ingestedblocked_external- Source unavailableblocked_credentials- Requires API keysfailed_download- Download errorfailed_pipeline- Processing errorskipped- Intentionally skipped
Managing Services
- Start
- Stop
- Logs
- Status
Environment Configuration
Key environment variables in.env:
Neo4j Settings
Neo4j Settings
API Settings
API Settings
Privacy & Security Settings
Privacy & Security Settings
Optional External Service Credentials
Optional External Service Credentials
Troubleshooting
Neo4j connection errors
Neo4j connection errors
Symptom: API returns “neo4j: error” or connection refusedSolutions:
- Check Neo4j is running:
docker compose ps neo4j - View Neo4j logs:
docker compose logs neo4j - Wait for health check: Neo4j takes 10-30 seconds to start
- Verify password in
.envmatchesNEO4J_PASSWORD - Check port 7687 is not in use:
lsof -i :7687
Out of memory errors
Out of memory errors
Symptom: Neo4j crashes or becomes unresponsiveSolutions:
- Increase heap and pagecache in
.env: - Restart services:
docker compose restart neo4j - Consider loading data in smaller batches
Port conflicts
Port conflicts
Symptom: “port is already allocated” errorSolutions:
- Check what’s using the port:
lsof -i :7474(or :8000, :3000) - Stop conflicting service
- Or change ports in
docker-compose.yml
Seed script fails
Seed script fails
Symptom:
seed-dev.sh returns errorsSolutions:- Ensure Neo4j is fully started: wait 30 seconds after
docker compose up - Check
NEO4J_PASSWORDis set:echo $NEO4J_PASSWORD - Export password:
export NEO4J_PASSWORD=changeme - Run script again:
bash infra/scripts/seed-dev.sh
Next Steps
Architecture Overview
Learn how BR-ACC works under the hood
API Reference
Explore all available API endpoints
ETL Pipelines
Deep dive into data pipelines
Contributing
Contribute to the project
Need help? Join our Discord community or open an issue on GitHub.