Investor Agreement Generator
Create a simple SAFE (Simple Agreement for Future Equity).
1. The Company: ${data.companyName}, a corporation incorporated in the state of ${data.companyState}.
2. The Investor: ${data.investorName}.
The Company and the Investor agree as follows:
Section 1. The Investment
The Investor will invest ${formatCurrency(data.investmentAmount)} (the "Purchase Amount") in the Company. This investment is made in exchange for the right to receive future equity in the Company, subject to the terms of this agreement.
Section 2. Conversion Terms
Upon an Equity Financing event, this instrument will automatically convert into shares of the Company's Capital Stock at a price determined by the lesser of:
(a) The price per share derived from a pre-money valuation of ${formatCurrency(data.valuationCap)} (the "Valuation Cap"); or
(b) The price per share paid by new investors in the Equity Financing, multiplied by a discount rate of ${data.discountRate}%.
Section 3. Governing Law
This agreement and any dispute arising hereunder shall be governed by the laws of the state of ${data.governingLaw}, without regard to conflict of law principles.
IN WITNESS WHEREOF, the parties have executed this SAFE as of the date first written above.
COMPANY: ${data.companyName}
By: _________________________
Name: _______________________
Title: ________________________
INVESTOR: ${data.investorName}
By: _________________________
`; }; // === Tab Navigation Logic === const validateTab = (tabIndex) => { const inputs = tabContents[tabIndex].querySelectorAll('input[required], select[required]'); for (const input of inputs) { if (!input.value.trim()) { input.classList.add('border-red-500'); return false; } input.classList.remove('border-red-500'); } return true; }; const updateTabs = () => { tabContents.forEach((content, index) => { content.classList.toggle('hidden', index !== currentTab); tabButtons[index].classList.toggle('active', index === currentTab); }); prevBtn.disabled = currentTab === 0; nextBtn.textContent = currentTab === tabButtons.length - 1 ? 'Finish' : 'Next'; nextBtn.disabled = currentTab === tabButtons.length - 1; if (currentTab === tabButtons.length - 1) { // Generate Tab document.getElementById('previewContent').innerHTML = generateAgreementText(); } }; prevBtn.addEventListener('click', () => { if (currentTab > 0) { currentTab--; updateTabs(); } }); nextBtn.addEventListener('click', () => { if (currentTab < tabButtons.length - 1) { if (!validateTab(currentTab)) return; currentTab++; updateTabs(); } }); // === PDF Download Logic (Text-based) === downloadPdfBtn.addEventListener('click', () => { const { jsPDF } = window.jspdf; const pdf = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); const agreementHTML = generateAgreementText(); // Create a temporary element to parse the HTML for text extraction const tempDiv = document.createElement('div'); tempDiv.innerHTML = agreementHTML; const margin = 60; const pdfWidth = pdf.internal.pageSize.getWidth(); const textWidth = pdfWidth - margin * 2; let y = margin; // Function to add text and handle page breaks const addText = (text, options, fontSize = 11) => { pdf.setFontSize(fontSize); const isBold = options.includes('bold'); const isCenter = options.includes('center'); pdf.setFont('times', isBold ? 'bold' : 'normal'); const lines = pdf.splitTextToSize(text, textWidth); lines.forEach(line => { if (y > pdf.internal.pageSize.getHeight() - margin) { pdf.addPage(); y = margin; } pdf.text(line, isCenter ? pdfWidth / 2 : margin, y, { align: isCenter ? 'center' : 'left' }); y += fontSize * 1.2; }); }; // Process each element Array.from(tempDiv.children).forEach(el => { let text = el.textContent || ''; let options = []; let fontSize = 11; if (el.tagName === 'H3') { options.push('bold', 'center'); fontSize = 14; y += 10; } if (el.tagName === 'STRONG') { options.push('bold'); } if (el.style.fontWeight === 'bold') { options.push('bold'); } if (el.style.textAlign === 'center') { options.push('center'); } addText(text, options, fontSize); y += 8; // Spacing between paragraphs }); pdf.save('Investor_Agreement_SAFE.pdf'); }); // === Initial setup calls === populateSelect('companyState', usStates); populateSelect('governingLaw', usStates); document.getElementById('companyState').value = 'Delaware'; // Common default document.getElementById('governingLaw').value = 'Delaware'; // Common default document.getElementById('agreementDate').valueAsDate = new Date(); // Today's date updateTabs(); });