AN INDEX OF CURIOSITY
tushar.ravaliya18@gmail.com
BACK TO SELECTED WORK
FIELD NOTE 04 /DOCUMENT TOOLS / SAAS

ClauseCraft.

Can a complex document begin with a simple conversation?

STATUS
Built project
CONTENT BASIS
Source reviewed
BUILT WITH
Next.js
TypeScript
PostgreSQL
Drizzle
Zod

A document SaaS project that turns structured intake into NDA and freelance agreement drafts. The implementation includes template-based document generation, saved documents, PDF export, authentication, and optional AI clause explanations.

01

Structured inputs, predictable drafts

Zod validates intake fields on the server. A template engine chooses the relevant clauses and produces canonical Markdown from the validated input.

02

A document has a lifecycle

Authenticated users can create and retrieve their documents. PostgreSQL and Drizzle store form data and rendered drafts; a PDF route supports exporting them.

03

Optional services with boundaries

The source contains Stripe entitlement flows and an AI explanation endpoint with document ownership checks and a daily cap. These services require their respective configuration.

THE SYSTEM, AT A GLANCE
  1. 01Structured intake
  2. 02Zod validation
  3. 03Clause templates
  4. 04Document / PDF
KEEP EXPLORING / FIELD NOTE 01

Trip Tracker