Skip to content

KeepitSimpleAnalytics/tic_dashboard

Repository files navigation

Raleigh Transparency Studio

A premium healthcare price transparency analytics dashboard built with FastAPI, React, and ClickHouse.

Features

  • Price Benchmarking: Compare negotiated rates against Medicare fee schedule with interactive visualizations
  • Network Integrity: Analyze ghost providers, EIN coverage, and taxonomy distribution
  • Service Mix Analysis: Billing class and place of service flow visualization
  • Medicare Sensitivity: Identify rate outliers relative to Medicare benchmarks
  • Provider Scorecards: Organization-level metrics with drill-down capabilities

Tech Stack

Backend

  • FastAPI - Async REST API with automatic OpenAPI docs
  • ClickHouse - High-performance analytics database
  • Socket.IO - Real-time WebSocket communication
  • Pydantic - Data validation and serialization

Frontend

  • React 18 - UI framework
  • Vite - Build tool
  • TypeScript - Type safety
  • Tailwind CSS - Utility-first styling
  • Framer Motion - Animations
  • Recharts - Chart library
  • Zustand - State management
  • TanStack Query - Server state caching

Quick Start

Prerequisites

  • Docker and Docker Compose
  • ClickHouse with the tic database populated
  • Node.js 20+ (for local development)
  • Python 3.11+ (for local development)

Using Docker Compose

# Copy environment file
cp .env.example .env

# Edit .env with your ClickHouse connection details
vim .env

# Start all services
make dashboard-up

# View logs
docker compose logs -f

# Stop services
make dashboard-down

Local Development

# Backend
cd api
pip install uv
uv pip install -e ".[dev]"
uvicorn src.dashboard_api.main:app --reload

# Frontend (in another terminal)
cd web
npm install
npm run dev

Environment Variables

Variable Description Default
CLICKHOUSE_HOST ClickHouse server hostname localhost
CLICKHOUSE_HTTP_PORT ClickHouse HTTP port 8123
CLICKHOUSE_DB Database name tic
CLICKHOUSE_USER Database user default
CLICKHOUSE_PASSWORD Database password (empty)
VITE_API_URL API URL for frontend http://localhost:8050

Project Structure

tic_dashboard/
├── api/                    # FastAPI backend
│   ├── src/dashboard_api/
│   │   ├── main.py        # App entry point
│   │   ├── config.py      # Settings
│   │   ├── deps.py        # Dependencies
│   │   ├── models/        # Pydantic schemas
│   │   ├── routes/        # API endpoints
│   │   └── services/      # Business logic
│   └── tests/
├── web/                    # React frontend
│   └── src/
│       ├── api/           # API client & hooks
│       ├── components/    # Reusable components
│       ├── features/      # Feature modules
│       ├── stores/        # Zustand stores
│       └── utils/         # Utilities
├── scripts/ddl/           # ClickHouse DDL
├── docker-compose.yml
└── Makefile

API Endpoints

Endpoint Description
GET /api/filters Available filter options
GET /api/filters/stats Dashboard statistics
GET /api/rates/tracer Rate benchmarking data
GET /api/network/integrity Network integrity analysis
GET /api/medicare/sensitivity Medicare sensitivity analysis
GET /api/orgs Organization list
GET /api/orgs/{id} Organization detail

Design System

The dashboard uses a premium dark theme with glassmorphism effects:

  • Primary: Indigo (#6366f1)
  • Accent: Cyan (#22d3ee)
  • Background: Slate-950 (#020617)
  • Cards: Glass effect with backdrop blur

Key Visual Features

  • Animated counters and transitions
  • Gradient text and glowing accents
  • Interactive charts with tooltips
  • Responsive grid layout
  • Dark/light theme toggle

Development

Running Tests

# API tests
cd api && pytest -v

# Frontend tests
cd web && npm test

Code Quality

# Lint and format
make lint
make format

Building for Production

# Build images
docker compose build

# Run in production mode
docker compose -f docker-compose.yml up -d

License

MIT

tic_dashboard

tic_dashboard

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published