ClauseCraft.
Can a complex document begin with a simple conversation?
- STATUS
- Built project
- CONTENT BASIS
- Source reviewed
- BUILT WITH
- Next.jsTypeScriptPostgreSQLDrizzleZod
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.
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.
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.
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.
- 01Structured intake
- 02Zod validation
- 03Clause templates
- 04Document / PDF