Generative AI2025Production Prototype

Relic Lab

Structured generative AI for speculative product dossiers

Generative AI application that turns a present-day problem into a future artifact dossier with typed outputs, a local vault, export workflows, demo mode, and request-level tests.

Node.jsExpressOpenAI APIZodVitestTypeScript

Visual evidence

System visualization

A glowing speculative artifact encased in amber acrylic within an illuminated research vault

Case study

Problem, Build, Outcome

Problem

Most generative AI experiences stop at an unstructured chat response, making creative output difficult to reuse, compare, validate, or export.

Build

Built a Node.js and Express application around the OpenAI Responses API with Zod-validated artifact schemas, local persistence, deterministic demo data, and test coverage for generation failure modes.

Outcome

Transforms an open-ended problem into a repeatable, reviewable artifact dossier that can be saved, deduplicated, copied, and exported as Markdown or JSON.

Architecture

System Flow

1Problem input
2OpenAI Responses
3Zod schema gate
4Vault & export

Architecture Notes

  • API layer turns an unstructured prompt into an OpenAI Responses request with strict output requirements.
  • Validation layer parses the output against Zod schemas before anything reaches storage.
  • Persistence layer manages saved dossiers, deduplication, and file exports.

Engineering choices

Technical Decisions

Used OpenAI Responses with structured schemas instead of raw completion text to guarantee the output structure.

Added deterministic demo mode so the application remains fully testable and demonstrable even without API credentials.

Added request-level validation tests to verify that invalid responses fail predictably instead of poisoning state.

Evidence

Proof Points

Zod-validated artifact schemas for structured generation

Local vault with duplication prevention and Markdown/JSON export

Integration tests verifying parsing, schema guardrails, and demo fallbacks

Next read

Related Deep Dives