For: Aditya (Frontend Engineer)
Project: Conduit (Autonomous Agentic Data Engineering Framework)
Goal: Design, build, and connect the Next.js frontend pages and components to the FastAPI backend. Ensure high visual excellence, rich micro-animations, glassmorphism UI elements, dark mode support, and seamless interactive elements.
All pages must share a consistent global layout with a sidebar navigation that is clean, responsive, and responsive to active routing.
- Dashboard (
/): High-level metrics, active sources, recent executions, system status. - Ingest & Review (
/ingest): File upload dropzone, interactive real-time proposal analysis. - Proposals (
/proposals): Ledger of all schema resolutions and generated transformations. - Audit Logs (
/audit): Immutable record of all executions, AI prompts, and generated transformation history. - Quarantine Logs (
/quarantine): Detail view of rows failed during execution. - Data Sources (
/sources): Connected warehouse units and their status. - Skill Registry (
/skills— New): Registered skills, categorization, code attachments, and registration interface. - Knowledge Graph (
/graph— New): Relationship graph visualization, downstream impact analyzer, and lineage explorer.
- Key Metrics (Cards):
- Total Files Processed
- Auto-Resolved Rate (
AUTO_LINK/ total) - Quarantined Rows Count
- Average Execution Duration (ms)
- Active Data Warehouses: Grid of connected sources showing database units, types, and connectivity status (Green/Red indicator).
- Recent Executions Activity Feed: Mini-table showing last 5 audit entries with direct links to audit details.
- System Classification Breakdown: Pie chart or bar indicator showing proportion of
AUTO_LINK,SCHEMA_EVOLUTION, andCONFLICTclassifications.
- Drag-and-Drop Uploader:
- Select Target Table (dropdown fetched from
/api/sources). - Dropzone accepting CSV/Parquet files.
- Enforces client-side validation (blocks files >50MB, rejects non-CSV/Parquet).
- Select Target Table (dropdown fetched from
- Interactive Ingest State Machine:
- Idle State: File selection & target table setup.
- Uploading State: File sending, progress bar.
- AI Reasoning State: Spinning loaders, animated terminal showing steps:
Validating File Magic Bytes...Introspecting Target Schema...Building Context Bundle...Generating Transformation Script via Llama-3.3-70B...Validating AST Syntax & Imports Safety...Classifying Gateway Policy Rules...
- Resolution Display State: Renders the full
ProposalResponse(Drift visualizer, generated code, AI reasoning). - Action Execution State: Click Approve (executes script, updates database, transitions to success execution details) or Reject (returns to uploader).
- Proposals Ledger Table:
- Columns: ID, Target Table, Classification (Badge:
AUTO_LINK[Green],SCHEMA_EVOLUTION[Orange],CONFLICT[Red]), Confidence Score, Detected Drift Count, LLM Model, Created Time, Actions. - Filter by status (
AUTO_LINK,SCHEMA_EVOLUTION,CONFLICT, etc.) and search by target table name. - Page pagination support.
- Columns: ID, Target Table, Classification (Badge:
- Action Toolbar: Header showing proposal ID and status badges. Approve button (opens credentials/approver ID input) and Reject button (opens reason modal).
- Tabbed Review Interface:
- Tab 1: Schema Drift Visualizer:
- Displays a side-by-side column mapping.
- Highlights columns with drift:
MISSING_COLUMN(Missing in incoming - Red)EXTRA_COLUMN(Extra in incoming - Orange)TYPE_MISMATCH(Data type mismatch - Red)NULLABILITY_CHANGE(Nullable column contains nulls when target is NOT NULL - Red)
- Severity tag indicator (
LOW,MEDIUM,HIGH).
- Tab 2: Transformation Code & AI Reasoning:
- Side-by-side or split layout.
- Left: Markdown-rendered plain English AI reasoning (the why and how of the plan, plus warning notes).
- Right: Beautiful syntax-highlighted editor showing the generated Python Pandas code (read-only).
- Tab 3: AI Context Bundle (Phase 2 feature):
- Lists organizational context parsed before generating:
- Detected PII Columns (e.g.
customer_email- highlighted as secure). - Downstream Business KPI Impact (e.g. "Feeds Monthly Revenue dashboard").
- Downstream Dependencies (other tables reading from this target table).
- Applied Skills from Registry (links to the active skills matching the file schema).
- Detected PII Columns (e.g.
- Lists organizational context parsed before generating:
- Tab 1: Schema Drift Visualizer:
- Audit Ledger (
/audit): Table showing executed pipelines. Shows ID, file name, active skill, status (SUCCESS/FAILED), approver ID, and execution time. - Audit Detail (
/audit/[id]): Full traceback/post-mortem panel:- Summary of execution performance: duration, rows written, rows quarantined.
- Executed Script Tab: Shows the exact Python script run inside the sandbox.
- AI Prompt Sent Tab: Collapsible panel showing the exact XML-wrapped prompt fed to Llama.
- AI Raw JSON Response Tab: Raw response JSON from Groq.
- List of Records: Left panel shows list of quarantined records with timestamp, proposal ID, and error reason.
- JSON Inspector: Right panel shows the pretty-printed raw CSV/Parquet row JSON that failed validation or insertion. Allows searching key-value pairs to isolate data issues.
- Grid layout showcasing database schemas, tables, expected column structures, row counts, and data distributions.
- Skill Catalog Dashboard:
- Cards for registered skills showing category (
SECURITY,DATETIME_STANDARDIZATION,SCHEMA_EVOLUTION, etc.), status (ACTIVE,DRAFT,DEPRECATED), and short description. - Search field to dynamically filter skills.
- Cards for registered skills showing category (
- Skill Detail Panel (
/skills/[id]):- Shows owner, version, use cases, and constraints.
- Shows registered mapping scripts and issue context references.
- Add script or add issue form to expand a skill's registry profile.
- Mark as Deprecated (uses
PATCH /api/skills/{id}) which adds visual deprecation badges.
- Register Skill Dialog:
- Form fields: Name, category, description, use cases, constraints, owner, input/output examples.
- Interactive Node-Edge Visualizer:
- Rendered using D3.js, Vis.js, or Cytoscape.js.
- Nodes:
TABLE(Blue),SKILL(Purple),COLUMN(Teal),KPI(Gold),PROJECT(Gray),FILE(Green). - Edges: Connecting lines labelled with relation types (
BELONGS_TO,DEPENDS_ON,USES_SKILL,AFFECTS_KPI, etc.). - Node hover shows tooltips with metadata (e.g., column PII flags, row count, schema definitions).
- Lineage BFS Traversal:
- Enter a table or column name to display its linear source-to-target path graph.
- Impact Analysis Panel:
- Select an entity (e.g.
orders_cleantable) and click "Analyze Downstream Impact". - Renders a tree of affected resources (dashboards, downstream tables, projects) with depth indicators. Helpful to visualize what breaks if a column changes.
- Select an entity (e.g.
All endpoints prefixed with /api are proxied by the Next.js dev server. Below is the API contract for integration.
- Request Type:
multipart/form-data - Payload:
file:UploadFile(CSV or Parquet)target_table:string(e.g.,"orders_clean")
- Response Structure (
ProposalResponse):
{
"proposal_id": "8fa8db6b-6bfb-4d40-bfdf-4a6c8e31ba6e",
"gateway_status": "SCHEMA_EVOLUTION",
"target_table": "orders_clean",
"drift_detected": [
{
"column": "cust_email",
"issue_type": "MISSING_COLUMN",
"source_value": "cust_email",
"target_expectation": "customer_email",
"suggested_action": "RENAME",
"severity": "MEDIUM"
}
],
"proposed_steps": [
"Rename column 'cust_email' to 'customer_email'",
"Format email values to lowercase",
"Inject hash values for security mask if flagged"
],
"generated_code": "import pandas as pd\n\ndef transform(df):\n df = df.rename(columns={'cust_email': 'customer_email'})\n return df",
"confidence_score": 0.88,
"pii_columns_found": ["customer_email"],
"estimated_rows": 105,
"llm_model_used": "llama-3.3-70b-versatile",
"reasoning": "Detected column 'cust_email' that closely maps to 'customer_email' in the target schema. Renaming has been suggested. No other drifts found.",
"reasoning_note": "A context rule exists showing customer_email is flagged as PII. Masking is recommended."
}- Query Params:
limit:int(default: 100)offset:int(default: 0)
- Response: List of
ProposalResponseobjects.
- Path Variable:
proposal_id(string uuid) - Response: Singular
ProposalResponseobject.
- Request Body (
ApproveRequest):
{
"human_approver_id": "admin-aditya"
}- Response (
ExecutionResult):
{
"proposal_id": "8fa8db6b-6bfb-4d40-bfdf-4a6c8e31ba6e",
"rows_written": 100,
"rows_quarantined": 5,
"execution_status": "SUCCESS",
"duration_ms": 142
}- Request Body (
RejectRequest):
{
"reason": "Generated Python code contains invalid renaming syntax."
}- Response: Status Code
200 OK
- Response (
ProposalContextResponse):
{
"proposal_id": "8fa8db6b-6bfb-4d40-bfdf-4a6c8e31ba6e",
"target_table": "orders_clean",
"context_bundle": {
"related_skills": [
{
"id": 1,
"name": "pii_masking",
"category": "SECURITY",
"description": "Hashes PII columns using SHA-256"
}
],
"related_entities": [
{
"id": 12,
"name": "orders_clean",
"node_type": "TABLE"
}
],
"dependencies": [
{
"name": "raw_orders",
"node_type": "TABLE"
}
],
"business_context": [
"Feeds Monthly Revenue calculation dashboard"
],
"pii_columns": ["customer_email"]
},
"generated_at": "2026-06-07T03:30:00Z"
}- Query Params:
category:string(optional, e.g.,"SECURITY")status:string(optional, e.g.,"ACTIVE")limit:int(default: 100)offset:int(default: 0)
- Response: List of
SkillResponseobjects.
[
{
"id": 1,
"skill_name": "pii_masking",
"version": "1.0.0",
"category": "SECURITY",
"description": "Hashes PII columns using SHA-256",
"use_cases": "Hashing emails, credit cards, SSNs",
"constraints": "Requires valid string column",
"owner": "Security Team",
"status": "ACTIVE",
"created_at": "2026-06-06T15:00:00Z"
}
]- Query Params:
query:string(term to search in name/description)
- Response: List of
SkillResponseobjects.
- Response (
SkillDetailResponse):
{
"id": 1,
"skill_name": "pii_masking",
"version": "1.0.0",
"category": "SECURITY",
"description": "Hashes PII columns using SHA-256",
"use_cases": "Hashing emails, credit cards, SSNs",
"constraints": "Requires valid string column",
"owner": "Security Team",
"status": "ACTIVE",
"created_at": "2026-06-06T15:00:00Z",
"scripts": [
{
"id": 5,
"script_path": "/scripts/masking.py",
"script_hash": "a4f89d3...",
"is_validated": true
}
],
"examples": [
{
"id": 2,
"input": "john.doe@gmail.com",
"output": "8fa8db6b6bfb4d40bfdf4a6c8e31ba6e..."
}
],
"issue_references": [
{
"id": 1,
"issue_reference": "SEC-101",
"resolution_notes": "Added hashing logic for GDPR compliance"
}
]
}- Request Body (
CreateSkillRequest):
{
"skill_name": "pii_masking",
"version": "1.0.0",
"category": "SECURITY",
"description": "Hashes PII columns using SHA-256",
"use_cases": "Encrypt sensitive fields",
"constraints": "Python hashlib dependent",
"owner": "Security Team",
"examples": [
{
"input": "test",
"output": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
}
]
}- Response: Created
SkillResponseobject (Status: 201 Created).
- Request Body (
UpdateSkillRequest):
{
"status": "DEPRECATED",
"owner": "Core Platform team"
}- Response: Updated
SkillResponseobject.
- Request Body (
AddSkillScriptRequest):
{
"script_path": "/scripts/hashing_sha256.py",
"script_hash": "847291a8df",
"is_validated": true
}- Response: Status Code
201 Created
- Request Body (
AddSkillIssueRequest):
{
"issue_reference": "DATA-404",
"resolution_notes": "Avoided plain text leakage in logs"
}- Response: Status Code
201 Created
- Response: List of
GraphNodeResponseobjects.
[
{
"id": 1,
"node_type": "TABLE",
"entity_id": "orders_clean",
"entity_name": "Clean Orders",
"metadata": {
"row_count": 10500,
"schema": "conduit"
}
},
{
"id": 2,
"node_type": "SKILL",
"entity_id": "pii_masking",
"entity_name": "PII Masking",
"metadata": {}
}
]- Response: List of
GraphEdgeResponseobjects.
[
{
"id": 1,
"source_node_id": 1,
"target_node_id": 2,
"relation_type": "USES_SKILL",
"confidence_score": 1.0,
"created_at": "2026-06-06T18:00:00Z"
}
]- Request Body (
CreateGraphNodeRequest):
{
"node_type": "TABLE",
"entity_id": "orders_clean",
"entity_name": "Clean Orders",
"metadata": {
"schema": "conduit"
}
}- Response: Created
GraphNodeResponse(201 Created).
- Request Body (
CreateGraphEdgeRequest):
{
"source_node_id": 1,
"target_node_id": 2,
"relation_type": "USES_SKILL",
"confidence_score": 0.95
}- Response: Created
GraphEdgeResponse(201 Created).
- Path Variable:
node_id(int) - Response (
NeighborsResponse):
{
"node_id": 1,
"neighbors": [
{
"direction": "outbound",
"relation_type": "USES_SKILL",
"confidence_score": 1.0,
"node": {
"id": 2,
"node_type": "SKILL",
"entity_id": "pii_masking",
"entity_name": "PII Masking",
"metadata": {}
}
}
],
"total": 1
}- Path Variable:
entity(string stable identifier, e.g. table/file name) - Response (
LineageGraphResponse): Returns nodes and edges along BFS lineage path traversal.
{
"nodes": [
{ "id": 1, "node_type": "FILE", "entity_id": "clean_orders.csv", "entity_name": "clean_orders.csv" },
{ "id": 2, "node_type": "TABLE", "entity_id": "orders_clean", "entity_name": "Clean Orders Table" }
],
"edges": [
{ "id": 1, "source_node_id": 1, "target_node_id": 2, "relation_type": "TRANSFORMS_INTO", "confidence_score": 1.0 }
]
}- Path Variable:
entity(string identifier) - Response (
ImpactAnalysisResponse):
{
"entity": "orders_clean",
"start_nodes": [
{ "id": 2, "node_type": "TABLE", "entity_id": "orders_clean", "entity_name": "Clean Orders Table" }
],
"impacted_nodes": [
{
"node": {
"id": 5,
"node_type": "KPI",
"entity_id": "monthly_revenue",
"entity_name": "Monthly Revenue"
},
"depth": 1,
"relation_type": "AFFECTS_KPI",
"path": ["orders_clean", "monthly_revenue"]
}
],
"total_impacted": 1
}- Query Params:
limit:int(default: 100)offset:int(default: 0)
- Response: List of
LineageEventResponseobjects.
[
{
"id": 1,
"proposal_id": "8fa8db6b-6bfb-4d40-bfdf-4a6c8e31ba6e",
"source_entity": "clean_orders.csv",
"target_entity": "orders_clean",
"operation_type": "AUTO_LINK",
"skill_used": "pii_masking",
"executed_at": "2026-06-07T03:32:00Z"
}
]- Path Variable:
proposal_id(string uuid) - Response: List of
LineageEventResponsefor specific proposal execution.
- Response: List of active Warehouse units.
[
{
"id": 1,
"name": "orders_clean",
"unit_type": "TABLE",
"status": "ACTIVE"
}
]- Query Params:
limit:int(default: 100)offset:int(default: 0)
- Response: List of
AuditEntryobjects.
[
{
"id": 1,
"proposal_id": "8fa8db6b-6bfb-4d40-bfdf-4a6c8e31ba6e",
"filename": "clean_orders.csv",
"skill_name": "pii_masking",
"execution_status": "SUCCESS",
"human_approver_id": "admin-aditya",
"executed_at": "2026-06-07T03:32:00Z",
"llm_prompt_sent": "<xml>...",
"llm_raw_response": "{\"code\": ...}",
"transformation_script_ref": "/scripts/8fa8db6b.py"
}
]- Path Variable:
entry_id(int) - Response: Singular detailed
AuditEntryobject.
- Query Params:
limit:int(default: 100)offset:int(default: 0)
- Response: List of
QuarantineEntryobjects.
[
{
"id": 1,
"proposal_id": "8fa8db6b-6bfb-4d40-bfdf-4a6c8e31ba6e",
"raw_row": {
"order_id": "999",
"customer_email": "broken-email-no-at-sign",
"amount": "abc"
},
"failure_reason": "ValueError: Invalid email format, ValueError: Could not parse amount as float",
"quarantined_at": "2026-06-07T03:32:00Z"
}
]- Path Variable:
proposal_id(string uuid) - Response: List of
QuarantineEntryrecords specifically generated by the given proposal's execution.