Project Alpha Document Workflow

This guide explains how quotes, contracts, invoices, payments, projects, public links, and scheduled jobs fit together in the current application.

Workflow at a Glance

Client
  |
  +-> Quote --approved--> Contract --signed/activated--> Work
                                      |
                                      +-> Regular invoice
                                      +-> Scheduled long-term invoices
                                      +-> Manually generated on-demand invoices
                                                    |
                                                    v
                                                  Payment

Documents may also be created directly. A quote is helpful for traceability, but it is not required before creating a contract or invoice.

Shared Concepts

Clients

Every quote, contract, and invoice belongs to a client. Clients may also belong to an organization.

Projects and job codes

When a quote does not already have a job code, approval generates one and carries it into derived documents.

Document families

All document families use the same three tables: quotes, contracts, and invoices. Type columns distinguish the workflow:

Family Quote value Contract value Invoice value
Regular regular regular regular
Long-term long_term long_term long_term
On-demand on_demand on_demand on_demand

Quotes

Quotes propose a scope and price before work is placed under contract.

Primary statuses:

draft -> pending -> approved
                 -> rejected
                 -> denied
                 -> expired

Approval from the authenticated application

The Documents > Quotes settings control automatic creation:

Both settings default to enabled. Long-term and on-demand quote approval creates a contract but does not create the first invoice; those invoice workflows begin after contract activation.

A valid quote link allows the client to approve or deny a pending quote. Approval creates a pending contract. A regular quote also creates a private draft invoice; long-term and on-demand quotes wait for their contract-specific invoice workflow.

Regular Contracts

A regular contract represents one-time work.

Typical flow:

pending --signed PDF--> active --complete--> completed
   |                       |
   +------deny------------> denied
   +------void------------> cancelled

Long-Term Contracts

Long-term contracts model recurring services.

Typical flow:

pending --signed document + Activate--> active <--> paused
                                             |
                                             +--> recurring invoices
                                             +--> completed/cancelled

Activation requires a signed document. Uploading the document from the authenticated application records it, after which the operator explicitly activates the contract. A signed upload accepted through the current public-link route activates the contract as part of that client action. Activation sets next_invoice_date from the existing value or the contract start date.

If the contract is already due when activated, Project Alpha attempts to generate the first invoice immediately. The daily cron job then generates later invoices from:

The generator is idempotent and performs up to 36 catch-up passes so a deployment returning after downtime can create missed billing periods without running forever.

An eligible long-term contract must be active, have a signed document, and have a due next_invoice_date.

On-Demand Contracts

On-demand contracts cover work billed only when requested.

Typical flow:

pending --signed document + Activate--> active
                                             |
                                             +--Generate invoice--> on-demand invoice
                                             +--Generate invoice--> on-demand invoice

Invoices and Payments

Primary invoice statuses:

draft -> sent/unpaid -> partial -> paid
                  |        |
                  +------> overdue
                  +------> void

Public links are random, expiring tokens that allow a client to interact without a persistent account.

Document Available interaction
Quote View, download, approve, or deny while pending
Contract View, download, and submit a signed document while eligible
Invoice View, download, and start Stripe Checkout while payable
Project invoice View, download, and pay the aggregate balance; payment is allocated to child invoices

Links can expire or be revoked. Paying an invoice or voiding related documents may revoke active links. Configure the public application URL and document-link lifetime before emailing links.

Scheduled Follow-Up

The cron service handles:

See Cron Service for the installed schedule, which uses the configured Project Alpha timezone.

Operational Checklist

Before using document automation:

  1. Configure company identity, sender profile, timezone, and public application URL.
  2. Configure SMTP and send a test email.
  3. Configure Stripe in test mode and verify webhook delivery.
  4. Review quote auto-creation and invoice-notification settings.
  5. Create one regular, one long-term, and one on-demand test workflow.
  6. Confirm public links work through the production hostname.
  7. Confirm cron logs show successful invoice, reminder, reconciliation, and backup jobs.

Report behavior that differs from this guide through a public GitHub issue, using sanitized example data.