A serverless dashboard for visualizing pyqual quality metrics across multiple repositories.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ CI/CD Pipeline│────▶│ JSON Artifacts │────▶│ Static Dashboard│
│ (GitHub/GitLab)│ │ (summary.json) │ │ (React SPA) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Optional API │
│ (FastAPI) │
│ for local dev │
└─────────────────┘
- 📊 Real-time quality metrics visualization
- 📈 Historical trends and regressions
- 🔍 Multi-repository overview
- 🚀 Serverless deployment (GitHub Pages, Cloudflare Pages)
- 📱 Responsive design
- 🔐 No backend required for production
-
Configure CI to upload artifacts:
- GitHub Actions: Use the provided
.github/workflows/pyqual-enhanced.yml - GitLab CI: Use the provided
.gitlab-ci.yml
- GitHub Actions: Use the provided
-
Deploy to GitHub Pages:
# Clone this dashboard git clone https://github.com/your-org/pyqual-dashboard cd pyqual-dashboard # Configure your repositories cp config/repos.example.json config/repos.json # Edit repos.json with your repository URLs # Deploy npm install npm run build npm run deploy
-
Start the development server:
cd dashboard npm install npm run dev -
Start the optional API server:
cd api pip install -r requirements.txt uvicorn main:app --reload
Create config/repos.json:
{
"repositories": [
{
"id": "pyqual",
"name": "Pyqual",
"url": "https://github.com/semcod/pyqual",
"branch": "main",
"ciUrl": "https://github.com/semcod/pyqual/actions"
},
{
"id": "my-project",
"name": "My Project",
"url": "https://github.com/myorg/my-project",
"branch": "main",
"ciUrl": "https://github.com/myorg/my-project/actions"
}
]
}The dashboard can fetch data from:
-
Direct GitHub Releases (recommended):
- CI creates a GitHub Release with artifacts
- Dashboard fetches
summary.jsonfrom release assets
-
Raw Git LFS:
- Push
.pyqual/directory to LFS - Dashboard fetches from Git LFS
- Push
-
S3/Cloud Storage:
- CI uploads to S3 bucket
- Dashboard fetches from storage
-
Local API:
- FastAPI server serves local
.pyqual/data - Useful for testing and on-premises
- FastAPI server serves local
The dashboard expects summary.json in this format:
{
"timestamp": "2026-03-31T20:00:00Z",
"commit": "abc123...",
"branch": "main",
"status": "passed|failed",
"duration_s": 62.114,
"iterations": 1,
"metrics": {
"coverage": 85.5,
"maintainability": 75.2,
"security": 100.0
},
"gates": [
{
"metric": "coverage",
"value": 85.5,
"threshold": 80.0,
"passed": true
}
],
"stages": [
{
"name": "test",
"duration_s": 10.5,
"passed": true,
"skipped": false
}
]
}# .github/workflows/deploy-dashboard.yml
name: Deploy Dashboard
on:
push:
branches: [main]
paths: ['dashboard/**']
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: |
cd dashboard
npm install
npm run build
npm run deploy- Connect your GitHub repo
- Build command:
cd dashboard && npm run build - Output directory:
dashboard/dist
vercel --prod- Update
src/types/metrics.ts - Add visualization in
src/components/MetricsPanel.tsx - Update color schemes in
src/theme/colors.ts
Edit src/theme/index.ts:
export const theme = {
colors: {
primary: '#your-color',
success: '#your-green',
warning: '#your-yellow',
error: '#your-red'
}
}If using the FastAPI backend:
GET /api/projects- List all repositoriesGET /api/projects/{id}/runs- Get recent runsGET /api/projects/{id}/metrics- Get metrics historyGET /api/projects/{id}/runs/{run_id}- Get specific run details
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details.