Skip to content

Repository files navigation

Apiscribe

Apiscribe turns spoken or written API requirements into production-ready assets: canonical contracts, AI-enriched schemas, and exportable artifacts (OpenAPI, docs, pseudocode, tests).

Key Capabilities

  • Intent → Contract → Enrich → Artifact pipeline with persistent MongoDB storage.
  • AI guardrails powered by Google Gemini with strict validation so enrichment cannot invent behavior.
  • Artifact generators producing OpenAPI 3.0.3, markdown docs, implementation pseudocode, and test scaffolds.

Architecture Snapshot

Layer Technology
UI Next.js App Router, Tailwind, shadcn/ui
API /api/intent, /api/contract, /api/enrich, /api/generate, plus list/detail routes
Data MongoDB via Mongoose (Intent, Contract)
AI Gemini models with prompt + validator (lib/enrich/*)
Artifacts Pure TypeScript generators (lib/artifacts)

Setup

git clone …
npm install
cp .env.local.example .env.local   # add MONGODB_URI, GEMINI_API_KEY
npm run dev

Visit http://localhost:3000. Other scripts: npm run lint, npm run build, npm run start.

Workflow

  1. Save intent – deduplicates exact matches, otherwise persists a new record.
  2. Generate contract – infers semantics, HTTP method, failure model.
  3. Run enrichment – Gemini adds invariants/error codes/schema detail under guardrails.
  4. Export artifacts – OpenAPI, docs, pseudocode, or tests from the enriched contract.

REST endpoints mirror each stage for integrations, and list APIs expose stored intents/contracts.

Project Layout

app/
  api/…      # Route handlers
  page.tsx   # Main studio
components/  # Step panels, JSON viewer, shadcn wrappers
lib/
  artifacts/ # Exporters
  enrich/    # Prompt, validator, canonical models
  models/    # Mongoose schemas

About

ApiScribe turns natural-language API intents into canonical contracts, applies validated AI enrichment, and generates OpenAPI specs, docs, pseudocode, and tests.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages