Skip to content
pushpender1043Public

About

Enterprise data-automation & analytics dashboard prototype featuring KPI tracking, CSV ingestion, custom alert rules, data exports, and role-based admin views built with React, TypeScript, and TanStack Router.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

DatX β€” 5G Session Failure Intelligence & Telecom Analytics Platform

DatX Banner

Enterprise-Grade 5G Radio Access Network (RAN) Failure Telemetry & Intelligence Console

TypeScript React TanStack Start Tailwind CSS Supabase License

Built by Pushpender


πŸ“Œ Overview

DatX is a telecom-grade analytics and network monitoring platform engineered to ingest, aggregate, and analyze high-volume daily cell-level 5G session failure exports. Designed with a minimal, high-efficiency telemetry UI inspired by modern telecom operations centers (NOCs), DatX transforms 78,000+ raw daily rows into actionable circle, vendor, and cause-level intelligence in seconds.

The system incorporates rolling 7-day analytics windows, Pareto root-cause analysis (80/20 rule), automated Z-score anomaly detection, customizable alert thresholds, worst-cell ranking, and client-side streaming CSV ingestion.


πŸš€ Key Features

1. Rolling 7-Day Network Intelligence

  • Automatically tracks network health over a dynamic rolling 7-day window.
  • Date-less raw exports are mapped against upload ingestion dates.
  • Automated retention engine stores an active 30-day archive while rolling off outdated records.

2. Multi-Dimensional Telemetry & Drill-Down

  • Circle & Regional Analysis: Complete coverage of 23 telecom circles (DL, MUM, AP, KAR, MH, etc.) mapped across North, South, East, and West regions.
  • Vendor Diagnostics: Filter failure rates across RAN equipment vendors (Ericsson, Nokia, Samsung, Huawei, ZTE).
  • Frequency Bands & Site Types: Deep dive into sub-6GHz and mmWave bands (n78, n28, n5, etc.) and cell site configurations (Macro, Small Cell, Indoor).
  • Cause Families & Root Causes: Categorizes failures across Radio Network, Transport, Protocol, NAS/Authentication, and Signalling with human-readable cause labels.
  • Interactive Pareto Analysis: 80/20 chart dynamically isolates the minority of root causes responsible for the vast majority of network session drops.

3. Automated Anomaly Detection & Alert Engine

  • Z-Score Anomaly Engine: Statistical time-series analysis (|z| >= 1.8 with >15% baseline divergence) detects sudden anomalous spikes in failure causes across circles.
  • Customizable Alert Rules: Configure user-defined spike detection (% jump over historical baseline) or absolute volume thresholds with real-time alert badges.

4. High-Performance Client-Side CSV Pipeline

  • In-Browser Pre-flight Validator: Inspects file structure, verifies required columns (Serving Cell Name, Call Type, Circle), validates cell nomenclature format (MU_x_VENDOR_..._BAND_SECTOR), and displays sample rows before uploading.
  • Streaming Aggregation: Melts wide-format CSV exports (~78k+ rows) into compact fact models in chunks without blocking the UI thread, slashing network payloads and database storage by over 90%.

5. Worst-Performing Cells Ranking

  • Identifies and ranks the top degraded cells across the network.
  • Displays primary failure trigger, vendor, band, and exact failure tallies with search and pagination.

6. Role-Based Access Control (RBAC) & Security

  • Built-in Supabase authentication with Row Level Security (RLS).
  • Administrator: Access to data ingestion, file upload deletion, and circle master list maintenance.
  • Analyst: Read-only telemetry, deep filtering, interactive drill-down, and executive report export.

7. Instant Executive Reporting

  • Client-Side CSV Export: Generates clean filtered datasets formatted for offline analysis.
  • Print-Ready PDF Reports: Creates crisp, print-formatted executive failure summaries with corporate headers, active filter context, and summary tables.

πŸ› οΈ Architecture & Tech Stack

DatX Architecture
β”‚
β”œβ”€β”€ Client / Frontend
β”‚   β”œβ”€β”€ TanStack Start (SSR & Server Functions)
β”‚   β”œβ”€β”€ React 19 + TypeScript (Strict Mode)
β”‚   β”œβ”€β”€ Tailwind CSS v4 + Radix UI Primitives
β”‚   β”œβ”€β”€ Recharts (Pareto, Time-Series, Donut, Ranked Bars)
β”‚   └── Lucide Icons + Sonner Toasts
β”‚
β”œβ”€β”€ Server / Functions
β”‚   β”œβ”€β”€ TanStack Start Server Functions (`createServerFn`)
β”‚   β”œβ”€β”€ Nitro Engine (Universal deployment ready)
β”‚   └── Zod Schema Validation
β”‚
└── Database & Auth
    β”œβ”€β”€ Supabase (PostgreSQL 15+)
    β”œβ”€β”€ Row Level Security (RLS) Policies
    └── Custom RBAC (`user_roles` & `has_role` RPC)

πŸ“‚ Project Structure

DatX/
β”œβ”€β”€ public/                 # Static assets, favicon, robots.txt
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/         # UI component library
β”‚   β”‚   β”œβ”€β”€ dashboard/      # Analytics widgets (charts, filters, KPIs, alerts)
β”‚   β”‚   β”œβ”€β”€ ui/             # Radix UI + shadcn primitive components
β”‚   β”‚   β”œβ”€β”€ app-shell.tsx   # Responsive hover-rail navigation & layout
β”‚   β”‚   └── brand.tsx       # DatX SVG mark & branding typography
β”‚   β”œβ”€β”€ hooks/              # Custom React hooks (e.g., use-mobile)
β”‚   β”œβ”€β”€ integrations/       # Database & external service clients
β”‚   β”‚   └── supabase/       # Auth middleware, clients & generated types
β”‚   β”œβ”€β”€ lib/                # Core business logic & algorithms
β”‚   β”‚   β”œβ”€β”€ alert-rules.ts  # Rules engine for spike & threshold detection
β”‚   β”‚   β”œβ”€β”€ analytics-data.ts# Data transformers, filters & Z-score math
β”‚   β”‚   β”œβ”€β”€ analytics.functions.ts # Type-safe SSR server functions
β”‚   β”‚   β”œβ”€β”€ csv-ingest.ts   # Streaming parser, cell decoder & validator
β”‚   β”‚   β”œβ”€β”€ export-utils.ts # Browser CSV & print-ready PDF generator
β”‚   β”‚   └── utils.ts        # Class merging and formatting helpers
β”‚   β”œβ”€β”€ routes/             # TanStack Start file-based routing
β”‚   β”‚   β”œβ”€β”€ __root.tsx      # Global app layout & shell
β”‚   β”‚   β”œβ”€β”€ index.tsx       # Route gateway & auth redirector
β”‚   β”‚   β”œβ”€β”€ auth.tsx        # Sign-in and account registration
β”‚   β”‚   └── _authenticated/ # Protected dashboard & admin routes
β”‚   β”‚       β”œβ”€β”€ dashboard.tsx # Primary analytics view
β”‚   β”‚       └── admin.tsx   # CSV ingestion & circle management
β”‚   β”œβ”€β”€ router.tsx          # TanStack Router configuration
β”‚   β”œβ”€β”€ server.ts           # Nitro / SSR server entrypoint
β”‚   └── styles.css          # Design tokens & Tailwind CSS v4 styling
β”œβ”€β”€ .env.example            # Environment variable template
β”œβ”€β”€ components.json         # UI component registry configuration
β”œβ”€β”€ package.json            # Project manifest & dependencies
β”œβ”€β”€ tsconfig.json           # Strict TypeScript configuration
└── vite.config.ts          # Vite + TanStack Start + Nitro configuration

⚑ Getting Started

Prerequisites

  • Node.js: v18.0.0 or higher
  • npm (or pnpm / yarn)
  • A Supabase project (free tier works great)

1. Clone the Repository

git clone https://github.com/pushpender1043/_DatX.git
cd _DatX

2. Configure Environment Variables

Copy .env.example to .env:

cp .env.example .env

Populate your Supabase connection parameters in .env:

SUPABASE_PROJECT_ID="your-project-id"
SUPABASE_URL="https://your-project-id.supabase.co"
SUPABASE_PUBLISHABLE_KEY="your-publishable-key"

VITE_SUPABASE_PROJECT_ID="your-project-id"
VITE_SUPABASE_URL="https://your-project-id.supabase.co"
VITE_SUPABASE_PUBLISHABLE_KEY="your-publishable-key"

SUPABASE_SERVICE_ROLE_KEY="your-service-role-key"

⚠️ Important: Never commit your .env file to git. It is listed in .gitignore by default.

3. Install Dependencies

npm install

4. Run Development Server

npm run dev

Open http://localhost:3000 in your browser.


πŸ“Š Database Schema Setup

If setting up a fresh Supabase instance, ensure the following core tables exist:

-- Circles Master List
create table public.circles (
  code text primary key,
  name text not null,
  region text not null,
  is_active boolean default true,
  updated_at timestamptz default now(),
  updated_by uuid references auth.users(id)
);

-- Upload Logs
create table public.uploads (
  id uuid primary key default gen_random_uuid(),
  file_name text not null,
  upload_date date not null,
  row_count integer not null,
  cell_count integer not null,
  total_failures bigint not null,
  uploaded_by uuid references auth.users(id),
  created_at timestamptz default now()
);

-- Aggregated Failure Facts
create table public.failure_facts (
  id bigint generated always as identity primary key,
  upload_id uuid references public.uploads(id) on delete cascade,
  upload_date date not null,
  circle_code text not null,
  vendor text not null,
  site_type text not null,
  band text not null,
  call_type text not null,
  cause text not null,
  failures integer not null
);

-- Top Degrading Cells
create table public.top_cells (
  id bigint generated always as identity primary key,
  upload_id uuid references public.uploads(id) on delete cascade,
  upload_date date not null,
  cell_name text not null,
  circle_code text not null,
  vendor text not null,
  band text not null,
  site_type text not null,
  call_type text not null,
  top_cause text not null,
  failures integer not null
);

-- Role-Based Access Control
create table public.user_roles (
  id uuid primary key default gen_random_uuid(),
  user_id uuid references auth.users(id) on delete cascade,
  role text not null check (role in ('admin', 'analyst')),
  unique (user_id, role)
);

πŸ§ͺ Available Scripts

Command Action
npm run dev Starts the local development server
npm run build Builds client and SSR bundles with Nitro
npm run preview Previews the production build locally
npm run lint Runs ESLint across the codebase
npm run format Auto-formats code with Prettier

πŸ”’ Security Best Practices

  • Zero Credential Leaks: .env and environment secret patterns are strictly ignored by .gitignore.
  • JWT & Role Checks: Server functions enforce authentication and admin authorization via Supabase claims and database RPCs.
  • CSRF Protection: Native TanStack Start CSRF middleware safeguards state-changing server functions.
  • Input Sanitization: Client and server parse and validate payloads through strict zod schemas.

πŸ‘€ Author

Developed with ❀️ by Pushpender


πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

About

Enterprise data-automation & analytics dashboard prototype featuring KPI tracking, CSV ingestion, custom alert rules, data exports, and role-based admin views built with React, TypeScript, and TanStack Router.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages