← Back to Projects

leptons1618@anishgiri.dev:~/projects/ingesta cat project.toml

Full-Stack 2024 Stable

Ingesta

A browser workspace that turns Excel workbooks into database tables — and then lets you clean, validate and reshape the data before any of it is committed.

category
Full-Stack
year
2024
status
Stable
stack
9 tools
highlights
6
write-up
4 min read

01Highlights

  1. A seven-stage import wizard turns selected sheets into new tables with an inferred schema, in one run you can re-do from scratch.
  2. Every column carries a semantic type, and the mapping to PostgreSQL, MySQL, SQL Server or SQLite happens once, when the DDL is built.
  3. Reshaping steps are serialisable values, so a dataset is stored as a base grid plus an ordered list of operations — and rollback is a replay.
  4. Effects are measured while a step runs, so the history list shows rows in, rows out and cells changed instead of guessing.
  5. Destructive operations are classified before they run, and nothing touches a live table without a snapshot and a plan you have read.
  6. Seven Bun check scripts cover the import pipeline, the workspace operation engine, table operations and the SQLite path.

02Built with

  • 01TypeScript
  • 02React
  • 03Next.js
  • 04Tailwind CSS
  • 05Zustand
  • 06SheetJS
  • 07PostgreSQL
  • 08SQLite
  • 09Bun

03Case study

February 10, 2024 4 min read 726 words

Ingesta — An Import Wizard, and the Workspace That Makes Its Mistakes Fixable

Getting a spreadsheet into a database is the easy half. The interesting half is the place in between, where the data is still yours to change.

The problem

Parsing a workbook, inferring a schema and inserting the rows is easy once and impossible to trust. Dates arrive as text, numbers carry thousands separators, the same entity is keyed three different ways — and the usual response is to skip the middle entirely and fix everything in the database with hand-written SQL against a table that has already been committed to. That is unreviewable, hard to take back, and nobody writes down what they changed.

The solution

Split the problem in two. A one-shot seven-stage wizard parses workbooks and creates tables; the browser holds the file list and run history while the server opens a short-lived connection per call. Past the parser everything speaks one `Grid` shape with semantic types that are mapped to a real engine only when the DDL is built, so no layer above the dialect knows whether the destination is PostgreSQL, MySQL, SQL Server or SQLite.

Outcomes

  • One `Grid` shape carries the data everywhere past the parser, with semantic column types that reach an engine only at DDL-build time.
  • Reshaping steps are plain serialisable values rather than closures, so a step can be stored, shown, re-run and diffed.
  • Effects are counted while an operation runs — rows in and out, cells changed — so the history list reports measurements rather than estimates.

+3 more in the write-up

Inside the write-up

  1. The gap nobody builds
  2. One shape, one set of types
  3. Operations are values, not actions
  4. Rollback is replay, not undo
  5. The boring part is the guardrails
  6. Checked by scripts, not vibes
Read the full case study →

Related projects