Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nonsalant/contract
A signable contract that lives in a single file
https://github.com/nonsalant/contract
contracts freelance self-hosted small-business
Last synced: about 3 hours ago
JSON representation
A signable contract that lives in a single file
- Host: GitHub
- URL: https://github.com/nonsalant/contract
- Owner: nonsalant
- License: mit
- Created: 2015-10-22T12:04:10.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2024-06-25T13:38:52.000Z (7 months ago)
- Last Synced: 2025-01-28T13:16:52.603Z (7 days ago)
- Topics: contracts, freelance, self-hosted, small-business
- Language: PHP
- Homepage: https://stefanmatei.com/contract-generator/
- Size: 592 KB
- Stars: 514
- Watchers: 23
- Forks: 98
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
### Updates
🆕 12/31/23: Added functionality for shortcodes.
---
# Single File Contract
## A contract that lives in a **single file** and becomes static HTML after it's been signed.1. [**Generate** a contract file →](https://stefanmatei.com/contract-generator/edit)
1. **Upload** it to your server
1. **Send** your client a link to it
* **[View demo](https://stefanmatei.com/contract-generator/contract-demo.html)**[![email-contract](https://user-images.githubusercontent.com/180561/209838611-9b40307e-de05-44c0-967a-54399d85ef53.png)](https://stefanmatei.com/contract-generator/contract-demo.html)
---
## How it works
* **[Contract Generator →](https://stefanmatei.com/contract-generator/edit)**
1. Click the link above to create a contract file with custom content or HTML, a signature for the first party, and filename like `contract-1234567890.php`.
2. Upload the generated file to your own server or domain. You can also rename this file and put it in a folder with a unique name, eg: `contract-1234567890/index.php`.
3. Once signed by both parties, **the PHP file will delete itself from your server and leave behind a static HTML file.**---
[![Netlify Status](https://api.netlify.com/api/v1/badges/dc7d73d9-c327-4bcd-a33a-657603bc64ab/deploy-status)](https://app.netlify.com/sites/stefanmatei/deploys)
---
## What's in each file
### [contract.php](https://github.com/nonsalant/contract/blob/master/contract.php)
An example of a contract script: contains **all code** (PHP, CSS, HTML, PNG-data, JS) required by a stand-alone contract file. Upon being signed, this script deletes itself (or rather, it deletes its .php file), and leaves behind an .html file with the same name: a final version of the contract, signed by both parties.
The first 10 or so lines of the file are used to store contract metadata (one per line), ie:
```php