How borges070/projeto_integrador_1 works
1. What this repository contains
- The repo is split into two clear parts: ETL/, which holds the executable data pipeline, and docs/, which holds product, requirements, data, wireframe, and delivery artifacts.
- There is no front-end or API implementation in this repo; the runtime code is centered on data ingestion and preparation.
2. Overall architecture
- Civitas is designed as a legislative transparency platform: it collects public political/legislative data, cleans and enriches it, then produces curated datasets and insights for dashboards and profiles.
- The pipeline appears to support the downstream concepts described in the README: law explorer, proposal dashboard, politician profile, party pages, and commission pages.
3. ETL pipeline orchestrator
- ETL/main.py is the entry point and likely coordinates the full batch flow.
- The flow is modular: extract → validate → transform → load → insight generation, with logging configured separately.
4. Extraction boundary
- ETL/extract.py is the ingestion layer that connects the platform to external public data sources.
- This is the repository’s main inbound boundary: raw legislative or parliamentary data enters here before any normalization.
5. Data quality and contract enforcement
- ETL/validators.py enforces input expectations before data is accepted downstream.
- Architecturally, this is the gate between raw external data and the internal analytical model.
6. Transformation layer
- ETL/transform.py is where domain data is normalized and reshaped into analytics-ready structures.
- This layer is where the repository would align heterogeneous source data into consistent entities such as bills, politicians, votes, parties, commissions, and timelines.
7. Load/persistence layer
- ETL/load.py is the outbound boundary of the pipeline and is responsible for storing the processed data into the target system.
- The exact storage technology is not shown in the tree, so the repo only reveals the existence of a persistence step, not the database/vendor itself.
8. Insight generation
- ETL/gerar_insights.py is a post-processing stage that produces derived metrics and summaries.
- These outputs likely feed the dashboard-style views described in the README, such as KPIs, voting summaries, and other computed indicators.
9. Operational concerns
- ETL/logger_config.py centralizes logging, which suggests the pipeline is meant to be run as a repeatable batch job with traceable execution.
- ETL/requirements.txt indicates the pipeline is Python-based and its dependencies are isolated to this subsystem.
10. Documentation and design artifacts
- The docs/ tree contains the project’s vision, requirements, data model, ER diagram, wireframes, demo material, and final reports.
- These artifacts define the intended domain model and user-facing surfaces, but they are not runtime components.
11. How to draw the architecture
- A good diagram would show external public legislative sources feeding the ETL pipeline, then a validated/transformed dataset store, then derived insights consumed by the Civitas product views.
- The documentation layer should be shown separately as specification and design inputs, not as an operational service.
12. Important boundary to keep in mind
- This repo is primarily a data-processing and product-definition repository, not a complete application repository.
- The architecture is therefore centered on data ingestion, domain normalization, and metric generation rather than request/response web services.
Main entry points: gerar_insights.py Insights · extract.py Extract · main.py Pipeline · validators.py Validate
Components 20
External Sources
Public legislative and political data outside the repo
- Public Data · Public legislative and political sources that feed the pipeline
ETL Pipeline
Executable data processing flow
- Pipeline · Entry point that coordinates the batch flow
ETL/main.py - Extract · Connects to external data sources and pulls raw records
ETL/extract.py - Validate · Checks incoming data before downstream processing
ETL/validators.py - Transform · Reshapes and enriches raw data into analytics-ready entities
ETL/transform.py - Load · Writes processed data to the target store
ETL/load.py - Insights · Generates derived summaries and indicators
ETL/gerar_insights.py - Logging · Central logging configuration for pipeline runs
ETL/logger_config.py - Curated Data · Validated and transformed repository data used by later stages
Civitas Views
Downstream analytical surfaces implied by the project
- Law Explorer · Search and browse legislative records
- Proposal Dashboard · Dashboard for bills and proposals
- Profile Pages · Profiles for politicians and related activity
- Party Pages · Pages for parties and their data
- Commission Pages · Pages for commissions and their records
Documentation
Vision, requirements, data model, and delivery artifacts
- Vision · Product vision and scope documents
docs/Un1/Documento de Visão do Produto.pdf - Requirements · Functional and non-functional requirements
docs/Un2/Documento de Requisitos - Civitas.pdf - Data Model · Data documentation and ER model
docs/Un3/Documento de Dados - Civitas.pdf - Wireframes · Wireframe and link artifacts for interface design
docs/Un3/Wireframe.md - Insight Doc · Insights module documentation
docs/Un4/civitas_modulo_4_insights.pdf - Delivery Pack · Demo, final report, and compliance deliverables
docs/Un5/Relatorio_Final_CIVITAS.pdf
Connections 18
- Public Data → Extract: raw records · Public data enters the extraction boundary
- Extract → Validate: checks · Extracted data is validated before use
- Validate → Transform: accepted data · Validated data is normalized and reshaped
- Transform → Load: curated data · Transformed entities are persisted
- Load → Curated Data: stored · Loaded data becomes the curated analytical store
- Curated Data → Insights: inputs · Curated data feeds derived metrics and summaries
- Insights → Law Explorer: powers · Insights support the law explorer view
- Insights → Proposal Dashboard: powers · Insights support the proposal dashboard
- Curated Data → Profile Pages: powers · Curated data supports politician profiles
- Curated Data → Party Pages: powers · Curated data supports party pages
- Curated Data → Commission Pages: powers · Curated data supports commission pages
- Pipeline → Extract: starts · The orchestrator launches the pipeline stages
- Pipeline → Logging: uses · Execution is traced through central logging
- Vision → Requirements: refines · Vision informs requirements
- Requirements → Data Model: constrains · Requirements shape the data model
- Data Model → Wireframes: informs · Data model and UI concepts inform wireframes
- Insight Doc → Insights: documents · Documentation describes the insights module
- Delivery Pack → Vision: packages · Delivery artifacts include project definition and reporting