How arrudacaio/fiscaliza works
Project type and purpose
• This is a single-page application built with React.js, packaged and served by a minimal Node/Express static server (server.js + Procfile).
• Purpose: let users view and explore ongoing parliamentary spending by fetching data from the external “Dados Abertos” API.
File structure
• Top level:
• server.js & Procfile – an Express app that serves the compiled React bundle.
• public/index.html – the HTML entry point.
• package.json / package-lock.json – dependencies and scripts (build, start).
• src/ directory:
• src/index.js + src/App.js – React bootstrap and root component.
• src/routes.js – React Router setup for page navigation.
• src/pages/Main – main view that renders fetched data.
• src/components/Card – reusable Card component with its own styles.
• src/services/api.js – encapsulates all HTTP calls to the external API.
• src/utils – any helper functions.
• No internal database; all data comes from a third-party REST API.
README for additional insights
• Describes learning goals (consuming external APIs, React patterns).
• Highlights the external “Dados Abertos” endpoint as the data source.
Elements
• Browser → Server (static file fetch)
• React → External API (data fetch)
• CI/CD → Hosting
• Front-end (blue rectangles)
• Server/Deployment (green rectangles)
• External systems (orange ovals)