Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
TonyS-devPublic

About

FirstLook is a React + TypeScript app that gives consultants an honest first read on a messy client dataset (CSV) before kickoff. Nulls, duplicates, and format inconsistencies are detected in code, never guessed — while an LLM turns the findings into a client-ready summary that an IT manager can actually understand.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

FirstLook

AI-assisted CSV data-quality assessment for a consultant's first look at unfamiliar client data

React TypeScript Vite TailwindCSS shadcn/ui Anthropic Claude Google Gemini Vitest MIT License


🖥 Live demo

Live URL here:

https://first-look-ai.vercel.app

Screenshots

FirstLook upload screen
Upload screen

FirstLook dashboard with a clean CSV, no issues found
Dashboard: no issues found

FirstLook dashboard showing warning-level findings
Dashboard: warning-level findings

FirstLook dashboard showing critical-severity findings
Dashboard: critical-severity findings


Overview

A consultant receives an unfamiliar client CSV before kickoff, no data dictionary, no one to ask. FirstLook gives them an honest first read: what's in the file, what's wrong, and what to ask the client, in a form comfortable to show the client's IT manager.

It runs entirely in the browser. Upload a CSV, optionally add an LLM API key, and get back a severity-framed, plain-language data quality assessment instead of a raw table dump.

Non-negotiable design rule: every finding is computed deterministically in code (nulls, duplicates/identity conflicts, format inconsistencies). The LLM never invents a number. It only writes the plain-language narrative layer on top of facts already computed, and the report still works, findings and all, if the LLM call fails or no key is provided.

graph LR
    A[CSV Upload] --> B[csvParser]
    B --> C{Deterministic checks}
    C -->|nulls| D[analysis.ts]
    C -->|duplicates / identity| D
    C -->|format inconsistencies| D
    D --> E[Dashboard: severity-framed findings]
    D -.optional.-> F[LLM Assistant]
    F -->|Claude, fallback Gemini| G[Client-summary + kickoff questions]
    G -.-> E
Loading

🛠 Tech stack

Frontend:

  • React 19, TypeScript
  • Vite 8
  • Tailwind CSS 4 + shadcn/ui (Base UI primitives)
  • Papaparse (CSV parsing)
  • Zod (LLM response schema validation)

AI Integration:

  • Anthropic Claude (@anthropic-ai/sdk), primary provider
  • Google Gemini (@google/genai), fallback provider
  • Structured, schema-validated output only; graceful fallback to computed findings + generic narrative on any network or malformed-response failure

Testing:

  • Vitest, Testing Library, jsdom

Project structure

FirstLook/
├── src/
│   ├── components/     # Dashboard, FindingCard, FindingGroups, ExecutiveSummary,
│   │                   # KickoffQuestions, TechnicalDetail, ApiKeyInput, ui/ (shadcn)
│   ├── lib/            # csvParser, analysis, columnResolver, columnLabels,
│   │                   # llmClient + anthropicProvider/geminiProvider, findingPresentation
│   └── types.ts
├── data/                # sample CSVs for manual testing
├── skill/               # packaged Claude Skill (propose-before-code)
├── openspec/             # proposal.md, architecture.md, tasks.md
├── NOTES.md
└── README.md

Getting started

Prerequisites

  • Node.js 20+
  • npm

1. Clone the repository

git clone https://github.com/TonyS-dev/FirstLook.git
cd FirstLook

2. Install dependencies

npm install

3. Run the app

npm run dev

Open the printed local URL (default http://localhost:5173).

No .env file or server-side setup required. The app is 100% client-side.


Credential setup (API key)

An LLM API key is optional. Without one, the dashboard still shows every computed finding (nulls, duplicates, format inconsistencies) with heuristic column labels, just without the plain-language verdict and kickoff questions layer.

To enable the AI Assistant layer:

  1. Get a key from Anthropic Console (sk-ant-...) or Google AI Studio (AIza...)
  2. In the app, select your provider (Anthropic or Gemini) and paste the key into the API key field
  3. The key lives only in-memory for the current session. It's never written to localStorage, sessionStorage, or cookies, and isn't sent anywhere except directly to the selected provider's API

Features

  • Tolerant CSV parsing: no schema assumptions, works on any reasonably-formed CSV
  • Deterministic data-quality checks, all computed in code, never by the LLM:
    • Nulls, including sentinel values (n/a, na, -, null, none)
    • Exact duplicate rows and identity conflicts (same name, different customer ID)
    • Format inconsistencies (mixed date formats, categorical casing/whitespace variants)
  • Severity-framed dashboard: one-line verdict first, plain-language findings (what we found / why it matters / what to ask), technical detail collapsed by default
  • Grouped kickoff questions: by theme (Data Quality, Data Capture Process, Business Rules), not a flat list
  • Multi-provider LLM assistant: Claude primary, Gemini fallback, structured/schema-validated output only
  • Graceful degradation: a failed or missing LLM call never blocks the computed report
  • Print-to-PDF export: window.print() + print stylesheet, so the consultant can leave kickoff with a physical/digital copy

⚠ Known gaps

  • API key exposure: the selected provider's API key travels client-side and is visible in the browser's network tab / devtools. It's never persisted beyond in-memory React state, but this is a browser-only app with no backend to proxy the call.
  • LLM data exposure: the AI Assistant call sends some real extracted values from the uploaded CSV (not the raw file, not full rows) to the selected provider: real customer names/IDs found in identity-conflict findings, and categorical values under evaluation for format inconsistencies.
  • Cross-field arithmetic validation (e.g. line_total ≈ qty × unit_price × (1 - disc_pct)) is intentionally not implemented. See NOTES.md for why (ambiguous column-role inference was judged more likely to produce false "this data is wrong" findings than genuine catches).
  • No auth, persistence, or backend service. Out of scope by design (client-side, single-session tool only).

Testing

npm run test

AI skill

/skill packages one real, specific rule derived from an actual correction made while building this project: propose interfaces/design and wait for explicit confirmation before writing code. See skill/SKILL.md.


License

MIT


Documentation


Author / contact

Antonio Santiago (TonyS-dev) GitHub Email: tony@tonys-dev.com

About

FirstLook is a React + TypeScript app that gives consultants an honest first read on a messy client dataset (CSV) before kickoff. Nulls, duplicates, and format inconsistencies are detected in code, never guessed — while an LLM turns the findings into a client-ready summary that an IT manager can actually understand.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages