{"id":51338916,"url":"https://github.com/josedasilva11/pulse-dashboard","last_synced_at":"2026-07-02T05:32:53.818Z","repository":{"id":368255101,"uuid":"1284254269","full_name":"josedasilva11/pulse-dashboard","owner":"josedasilva11","description":"Real-time business KPI dashboard with live SSE updates (FastAPI + Chart.js).","archived":false,"fork":false,"pushed_at":"2026-06-29T17:44:06.000Z","size":458,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T19:25:34.711Z","etag":null,"topics":["chartjs","dashboard","fastapi","kpi","python","real-time","server-sent-events","sqlite","sse"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/josedasilva11.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-06-29T17:15:12.000Z","updated_at":"2026-06-29T17:44:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/josedasilva11/pulse-dashboard","commit_stats":null,"previous_names":["josedasilva11/pulse-dashboard"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/josedasilva11/pulse-dashboard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedasilva11%2Fpulse-dashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedasilva11%2Fpulse-dashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedasilva11%2Fpulse-dashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedasilva11%2Fpulse-dashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josedasilva11","download_url":"https://codeload.github.com/josedasilva11/pulse-dashboard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josedasilva11%2Fpulse-dashboard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35034984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chartjs","dashboard","fastapi","kpi","python","real-time","server-sent-events","sqlite","sse"],"created_at":"2026-07-02T05:32:52.375Z","updated_at":"2026-07-02T05:32:53.802Z","avatar_url":"https://github.com/josedasilva11.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pulse Dashboard\n\n\u003e **Live demo:** https://josedasilva11.github.io/pulse-dashboard/  (static client-side version with simulated data, no backend needed)\n\n![Pulse Dashboard live demo](assets/demo.gif)\n\n\nA real-time business KPI dashboard. A FastAPI backend serves sales, bookings, revenue and top-item metrics from a SQLite sample dataset and pushes live updates over Server-Sent Events (SSE) as new events arrive. A single-file dark frontend renders KPI cards and charts with Chart.js and updates live, no page refresh needed. This proves real-time dashboards for the numbers that matter.\n\n## Features\n\n- Live KPI cards: total revenue, order count, bookings and average order value.\n- Live charts: revenue over time (line) and top items by revenue (bar), via Chart.js.\n- Server-Sent Events stream so the UI moves the instant a new event lands.\n- FastAPI backend with REST snapshot endpoints plus an SSE endpoint.\n- SQLite sample dataset, seeded with one command, so it runs out of the box.\n- Event simulator script that injects realistic orders and bookings to watch the dashboard move.\n- Clean, modern dark UI in a single HTML file, no build step.\n\n## Tech\n\nPython, FastAPI, Uvicorn, SQLite (sqlite3), Server-Sent Events, vanilla JS, Chart.js (CDN).\n\n## Run\n\n1. Create and activate a virtual environment, then install dependencies:\n\n   ```bash\n   python -m venv .venv\n   source .venv/bin/activate    # Windows: .venv\\Scripts\\activate\n   pip install -r requirements.txt\n   ```\n\n2. Seed the SQLite sample dataset:\n\n   ```bash\n   python -m app.seed\n   ```\n\n3. Start the server:\n\n   ```bash\n   uvicorn app.main:app --reload\n   ```\n\n4. Open the dashboard at http://localhost:8000\n\n5. In a second terminal (with the same venv activated), run the simulator to push live events:\n\n   ```bash\n   python scripts/simulate.py\n   ```\n\n   Watch the KPI cards and charts update live without refreshing.\n\n## Configuration\n\nCopy `.env.example` to `.env` to override defaults. All settings are optional and have sensible defaults, so the app runs without any `.env` file.\n\n```bash\ncp .env.example .env\n```\n\n## Project layout\n\n- `app/main.py`: FastAPI app, REST snapshot endpoints and the SSE stream.\n- `app/database.py`: SQLite connection, schema and metric queries.\n- `app/events.py`: in-process pub/sub broker used to fan out SSE updates.\n- `app/seed.py`: creates the database and inserts sample data.\n- `app/config.py`: environment-driven settings.\n- `static/index.html`: single-file dark dashboard UI.\n- `scripts/simulate.py`: injects live events into the running server.\n\nBuilt by José Pedro Silva, marjers.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosedasilva11%2Fpulse-dashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosedasilva11%2Fpulse-dashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosedasilva11%2Fpulse-dashboard/lists"}