Inspiration

What it does

How we built it

Challenges we ran into

Accomplishments th## Inspiration

Every hackathon builder and frontend engineer encounters the same repetitive friction: before writing a single line of client UI or business logic, teams burn 4 to 8 hours designing database schemas, resolving cascading foreign keys, creating migration scripts, and setting up fake JSON mock servers. We built SchemaCraft AI to compress that entire prerequisite setup into a sub-15ms deterministic step running entirely inside the user's browser with zero backend overhead.

What it does

SchemaCraft AI acts as an autonomous 3NF relational database architect and in-memory mock API runtime:

  • Natural Language & Preset Parsing: Ingests domain requirements (Healthcare Emergency Triage, B2B Multi-Tenant SaaS, E-Commerce, Ride-Sharing) and deterministically compiles a normalized 3rd Normal Form (3NF) relational entity graph.
  • Referential Integrity Enforcement: Automatically injects indexed UUID primary keys (PK), bidirectional cascading foreign keys (FK), and unique integrity constraints without cyclic deadlocks.
  • Polyglot Code Export: Generates production-ready PostgreSQL DDL (init.sql) with ON DELETE CASCADE, valid Prisma 5+ schema definitions (schema.prisma), and strict TypeScript CRUD DTO interfaces (types.ts).
  • Edge In-Memory Mock REST Sandbox: Instantly mounts an in-browser mock REST runner pre-seeded with referentially linked realistic records, delivering sub-6ms query telemetry and live payload previews.

How we built it

  • Core Engine & Architecture: Built with Next.js 14 (App Router) and 97.6% strict TypeScript. The compilation engine is deterministic and runs fully client-side without third-party API dependencies or recurring server costs.
  • UI/UX Design: Modern dark glassmorphism built with Tailwind CSS, Lucide icons, responsive relational DAG entity cards, and 1-click clipboard/file bundle exports.
  • Engineering & DevOps: Containerized using multi-stage Docker builds (deps -> builder -> runner) with non-root security standards, orchestrated via docker-compose.yml, and continuously deployed to Vercel.
  • Quality & Automation: Integrated Playwright browser automation scripts to capture high-definition telemetry screenshots and end-to-end video walkthroughs.

Challenges we ran into

Preventing cyclic foreign key dependencies and ensuring proper topological sorting of relational tables during schema compilation was our primary engineering hurdle. We designed a directed acyclic graph (DAG) resolution step that orders parent entities before dependent children, ensuring generated PostgreSQL DDL and Prisma schemas execute without migration failures.

Accomplishments that we're proud of

  • Achieving sub-15ms execution latency for complete 3NF schema compilation directly in the browser.
  • Generating clean, ANSI-compliant SQL DDL and Prisma models with zero hallucinations.
  • Achieving 100% test passing rates with zero TypeScript compiler errors on initial production deploy.

What we learned (Build With AI: BASICS)

Strict adherence to the Devpost Learn agentic methodology was transformative. Formally interviewing, scoping, and locking down scope.md, prd.md, and spec.md before generating scaffold code eliminated scope creep and architectural deadlocks, allowing us to build an enterprise-grade deliverable on the first attempt.

What's next for SchemaCraft AI

We plan to add automated GraphQL schema generation, interactive visual ERD drag-and-drop relationship editing, and direct one-click migrations to Supabase and Neon PostgreSQL instances.at we're proud of

What we learned

What's next for SchemaCraft AI

Built With

Share this project:

Updates

Submission history