Skip to content

Contract document PDF rendering #498

Description

@clstaudt

Summary

Tuttle manages contracts as structured business-term records (rate, dates, VAT, billing cycle, charges), but cannot render them as formatted agreement documents. Freelancers who want to send a contract to a client must create the document elsewhere.

Since the contract data is already in Tuttle, rendering it as a clean PDF is a natural next step.

Existing infrastructure

  • The Contract model already captures: client, dates, rate/fixed price, currency, VAT, billing cycle, payment terms, and additional ContractCharge line items
  • The User model includes a signature image and business details
  • The Jinja2 + headless browser PDF pipeline is battle-tested for invoices
  • Invoice templates already handle multi-currency, VAT categories, and line item tables

Goals

  • Freelancers can export a contract as a professionally formatted PDF
  • The document includes all relevant contract terms, charges, and both parties' details
  • The freelancer's signature image can optionally be included
  • Contract PDFs are stored locally alongside invoice PDFs

Possible approaches (to be discussed)

  1. "Export as PDF" on the contract detail view — a new Jinja2 template that renders the existing Contract data as a formatted agreement, with an export button in the UI
  2. Editable contract text — allow the user to add free-text clauses (preamble, terms & conditions, termination clause) beyond the structured fields, stored as a text field on the contract model
  3. Contract templates — reusable boilerplate text that can be selected when creating a contract, similar to invoice note templates

Questions to refine

  • Is a pure rendering of existing structured data sufficient, or do freelancers need free-text legal clauses?
  • Should there be a "contract template" system for reusable boilerplate?
  • How important is a signing workflow? (For v1, the freelancer's stored signature on the PDF may be enough — the client can countersign on paper or via their own process)
  • Should the contract PDF include a place for the client's signature?

Feedback wanted

If you're a freelancer, we'd love to hear:

  • Do you currently use formal written contracts? Or do you work on informal agreements / email confirmations?
  • What sections does your typical contract include? (scope, payment terms, liability, IP rights, termination, …)
  • Would a clean PDF of the structured contract data be useful as-is, or do you need to add custom legal text?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededneeds refinementThe feature needs to be defined in more detail

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions