Skip to content

feat(frontend): Next.js scaffolding + core config model + YAML serializers - #76

Merged
Jatin-8898 merged 5 commits into
blackrock:mainfrom
maan-iitd2:pr/frontend-foundations
Sep 9, 2026
Merged

feat(frontend): Next.js scaffolding + core config model + YAML serializers#76
Jatin-8898 merged 5 commits into
blackrock:mainfrom
maan-iitd2:pr/frontend-foundations

Conversation

@maan-iitd2

@maan-iitd2 maan-iitd2 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

What

First frontend PR: InGen Studio, a Next.js 15 / React 19 SPA for building ingen YAML configs visually. This PR ships only the non-visual foundation:

  • Build scaffolding: package.json/lock, next.config.mjs, jsconfig.json (@/*src/* alias), eslint.config.js, .env* (adapter-mode config — mock: localStorage + simulated runs, no backend needed; http: talks to the FastAPI wrapper in feat(backend): thin FastAPI wrapper around the ingen CLI #75), public/ assets.
  • src/models/ — the in-memory config shape everything else depends on (configModel, types, constants), plus applyIntent/interfaceOps, the deterministic executor that turns the inChat assistant's {ops} into model mutations.
  • src/serializers/ — lossless YAML ↔ model round-trip (yamlSerializer/yamlDeserializer).
  • Two small, dependency-free helpers pulled forward from a later PR because configModel/applyIntent import them directly and won't load without them: src/utils/id.js (id generation) and src/lib/fuzzy.js (Levenshtein distance, used for inChat's "did you mean 'status'?" column-typo correction).

Not in this PR, by design: routing (src/app/), adapters/services, state/hooks, or any UI component. This PR alone does not build a running app — that lands over the next few PRs (adapters/state → app shell → editor UI), each building on this one.

Testing

  • npm install && npm run lint — clean, no errors.
  • npm run test43/43 passed, covering the config model (add/remove/rename/reorder interfaces and sources, validation), applyIntent (including a dedicated suite for the remove/add-transform ops), and the YAML serializers (round-trip losslessness, deterministic/idempotent output, key ordering, empty-section dropping).

What it looks like

This PR is a library layer with no UI of its own, but the serializer is what produces the YAML a
user actually ships. Below is modelToYaml output rendered live in the Studio — key ordering,
section ordering and empty-section dropping are all this PR's code:

YAML produced by the serializers

Shown running as part of the complete Studio on a local integration branch, since this PR alone
does not render an app.

🤖 Generated with Claude Code

…izers

Foundation for InGen Studio, a Next.js 15 / React 19 SPA for building
ingen YAML configs visually. This PR ships only the non-visual base
that later UI PRs build on:

- Build scaffolding: package.json/lock, next.config.mjs, jsconfig.json
  (@/* import alias), eslint.config.js, .env* (adapter-mode config:
  mock vs http), public/ assets.
- src/models/: the in-memory config shape everything else depends on
  (configModel, types, constants) plus applyIntent/interfaceOps, the
  deterministic executor for the inChat assistant's ops.
- src/serializers/: lossless YAML <-> model round-trip.
- src/utils/id.js, src/lib/fuzzy.js: small, dependency-free helpers
  that models/applyIntent import directly (pulled forward from the
  later state/hooks/lib wave since configModel and applyIntent need
  them to even load).

Routing, adapters/services, state, and all UI components are separate
follow-up PRs — this PR alone does not build a running app (no
src/app/ yet), by design.

## Testing

- `npm run lint` — clean.
- `npm run test` — 43/43 passed (models + serializers unit tests,
  including round-trip yaml -> model -> yaml losslessness).

Signed-off-by: maan-iitd2 <maan.iitd.ac.in@gmail.com>
Comments cited a DESIGN.md that does not exist in this repository, and
internal project-phase vocabulary ('Phase 0/1/5.1') that is meaningless
to an external reader. Replace them with descriptions of what the code
actually does.

Signed-off-by: maan-iitd2 <maan.iitd.ac.in@gmail.com>
The filename referenced an internal project phase rather than the ops
under test.

Signed-off-by: maan-iitd2 <maan.iitd.ac.in@gmail.com>
Comment thread frontend/src/models/configModel.js Outdated
Comment thread frontend/src/serializers/yamlDeserializer.js Outdated
Comment thread frontend/src/serializers/yamlDeserializer.js Outdated
Comment thread frontend/src/models/applyIntent.js Outdated
maan-iitd2 and others added 2 commits September 9, 2026 17:43
…med sources, run_config passthrough, shared constants

- reorderInterfaces rejects repeated names instead of silently dropping one
- yamlToModel throws on a source without an id (matches backend source["id"])
- run_config holds only what the file declares; backend resolves defaults
- applyIntent uses SOURCE_TYPES/OUTPUT_TYPES from constants.js (also fixes
  splitted_file being rejected by the local copy)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jatin-8898
Jatin-8898 merged commit 1e715bc into blackrock:main Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants