{"id":46044196,"url":"https://github.com/mateusjssilva/analytics-dashboard","last_synced_at":"2026-03-01T07:06:28.178Z","repository":{"id":334401519,"uuid":"1141238499","full_name":"MateusjsSilva/analytics-dashboard","owner":"MateusjsSilva","description":"A robust application developed in Python (FastAPI) that integrates public data from multiple sources, providing a modern interface for data visualization, management (CRUD), and analysis.","archived":false,"fork":false,"pushed_at":"2026-01-24T14:17:17.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-25T02:16:57.172Z","etag":null,"topics":["fastapi","ibge","intefration","test"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MateusjsSilva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-24T14:05:30.000Z","updated_at":"2026-01-24T14:17:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MateusjsSilva/analytics-dashboard","commit_stats":null,"previous_names":["mateusjssilva/analytics-dashboard"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/MateusjsSilva/analytics-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MateusjsSilva%2Fanalytics-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MateusjsSilva%2Fanalytics-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MateusjsSilva%2Fanalytics-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MateusjsSilva%2Fanalytics-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MateusjsSilva","download_url":"https://codeload.github.com/MateusjsSilva/analytics-dashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MateusjsSilva%2Fanalytics-dashboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29963120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T06:55:38.174Z","status":"ssl_error","status_checked_at":"2026-03-01T06:53:04.810Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","ibge","intefration","test"],"created_at":"2026-03-01T07:06:27.328Z","updated_at":"2026-03-01T07:06:28.166Z","avatar_url":"https://github.com/MateusjsSilva.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Analytics Dashboard\n\nA robust application developed in **Python (FastAPI)** that integrates public data from multiple sources, providing a modern interface for data visualization, management (CRUD), and analysis.\n\n## Features\n\n- **Analytical Dashboard**: General statistics visualization and dynamic charts (Chart.js) for data analysis.\n- **Integration with Public APIs**:\n    - **IBGE**: Detailed country data (regions, capitals, area).\n    - **Chamber of Deputies**: Information about Brazilian parliamentarians (parties, states, contacts).\n- **Full CRUD Management**: Ability to create, edit, list, and delete records for both countries and deputies.\n- **Real‑time Synchronization**: Button to update the local database by consuming external APIs.\n- **Modern Interface**: Responsive layout with Dark theme, using Jinja2, Tailwind‑like CSS, and subtle animations.\n\n## Technologies Used\n\n- **Backend**: Python 3.9+, FastAPI, SQLAlchemy (ORM).\n- **Database**: MySQL 8.0 running in a Docker container.\n- **Frontend**: HTML5, CSS3 (Vanilla), Jinja2 Templates, JavaScript (Chart.js).\n- **Infrastructure**: Docker \u0026 Docker Compose.\n\n## Project Structure\n\n```text\nanalytics-dashboard/\n├── app/\n│   ├── core/           # Database and environment configurations\n│   ├── models/         # SQLAlchemy models (Country, Deputy)\n│   ├── services/       # Business logic and API integration\n│   ├── templates/      # Jinja2 HTML files\n│   ├── static/         # CSS and static assets\n│   └── main.py         # Application entry point\n├── docker-compose.yml  # Database orchestration\n├── requirements.txt    # Project dependencies\n└── .env                # Environment variables\n```\n\n## How to Run\n\n### 1. Prerequisites\n- Docker Desktop installed and **running**.\n- Python 3.9+ installed locally.\n\n### 2. Set Up the Database\nStart the MySQL container using Docker Compose:\n```bash\ndocker-compose up -d\n```\n\n### 3. Set Up the Python Environment\nCreate a virtual environment and install dependencies:\n```bash\n# Create venv\npython -m venv venv\n\n# Activate venv (Windows)\n.\\\\venv\\\\Scripts\\\\activate\n\n# Activate venv (Linux/macOS)\nsource venv/bin/activate\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n### 4. Run the Application\nStart the Uvicorn server:\n```bash\nuvicorn app.main:app --reload\n```\n\nAccess the app at: `http://localhost:8000` (recommended) or `http://127.0.0.1:8000`\n\n## Usage\n\n1. **Synchronization**: On first access, go to the Dashboard and click **\"Synchronize All Data\"**. This will populate the local database with data from IBGE and the Chamber.\n2. **Navigation**: Use the side menu to switch between the Dashboard (charts), the Countries list, and the Deputies list.\n3. **CRUD**: In each listing, you will find options to add new records manually, edit existing ones, or delete them.\n\n## Configuration (.env)\n\nThe `.env` file at the root controls the database connection. Default for Docker:\n```env\nDB_HOST=localhost\nDB_PORT=3306\nDB_NAME=test_db\nDB_USER=user\nDB_PASSWORD=vobys_local_pass\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateusjssilva%2Fanalytics-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateusjssilva%2Fanalytics-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateusjssilva%2Fanalytics-dashboard/lists"}