Free forever

Stripe Atlas gets you incorporated. RoadWork keeps you compliant.

Every first-time founder gets stuck after incorporation. Delaware franchise tax? Form 1120? Foreign corp registration? Board minutes? RoadWork handles all of it — generates your forms, tracks your deadlines, manages your expenses, teaches you what matters. Built by a founder who just went through it.

0%
Compliance
0 of 0
0
Pending
0
Overdue
$0
NOL
Dashboard
Compliance
Company
Expenses
Generate

Weekly Review

Every Friday, 15 minutes. Reflect, plan, reset. The most important habit you'll build.

5

Entity Information

Operating Address

Professional Licenses (Optional)

Track professional licenses that need annual renewal. These will appear in your compliance checklist.

All data stays in your browser. Nothing is sent to any server. RoadWork runs entirely client-side.

Track Your Deductions

Every dollar you spend on the business before revenue creates a Net Operating Loss (NOL) that carries forward to offset future taxes. Track everything.

CategoryDescriptionAmount
Total Deductions (NOL Carryforward) $0.00

Recurring Expenses

Track monthly/annual subscriptions. These are projected into your annual total.

Starter Packs

One-click templates for common startup expense profiles. Adds typical items — edit amounts to match your receipts.

Stripe Atlas Founder

Atlas fee, domains, basic hosting

~$800

Indie Hacker

Atlas, domains, Vercel/Railway, GitHub, laptop

~$2,500

Hardware Builder

Atlas, domains, dev boards, sensors, tools

~$4,000

AI Startup

Atlas, GPU cloud, API credits, models, data

~$6,000

SaaS MVP

Atlas, domains, AWS/GCP, auth, analytics, email

~$3,500

Home Office

Desk, monitor, keyboard, internet (biz %)

~$2,000

Industry Packs

Typical expenses for specific industries. Edit amounts to match your actual receipts.

Real Estate

License, MLS, E&O insurance, lockbox, signs

~$5,000

Fintech

Compliance, licensing (MQP/EVEP), API costs

~$4,500

E-Commerce

Shopify, inventory, shipping, product photos

~$5,000

Healthcare / BioTech

HIPAA compliance, EHR, malpractice, lab

~$12,000

Food / Restaurant

Health permits, equipment, POS, ingredients

~$15,000

Construction / Trades

License, bonding, insurance, tools, vehicle

~$8,000

Creative Agency

Adobe CC, cameras, studio, portfolio site

~$4,000

Consulting

E&O insurance, CRM, travel, professional dev

~$3,500

Crypto / Web3

Node infrastructure, legal, audits, gas fees

~$8,000

Marketplace

Stripe Connect, trust & safety, support tools

~$5,000

Nonprofit

501(c)(3) filing, fundraising platform, grants

~$3,000

Education / EdTech

LMS, content creation, COPPA compliance

~$3,500

Generate Your Forms

RoadWork fills out your tax forms using the company info and expenses you entered. Review, print, and file.

Form 7004

Automatic 6-month extension for your Form 1120. Free to file. Takes 5 minutes. Buys you until October 15.

$0 to file

Form 1120 (Draft)

Federal corporate income tax return. For a zero-revenue first year, most lines are zero. Your expenses become your NOL carryforward.

$0 tax owed

Board Minutes

Annual board meeting minutes. Legally required even as a sole director. Ratifies all company actions for the year.

Required annually

Compliance Calendar

Every federal, state, and Delaware deadline for the next 2 years. Customized to your entity type and operating state.

Download as PDF
These are templates and drafts. For complex situations (multiple states, employees, significant revenue), consult a CPA. RoadWork handles the 90% case: first-year, zero-revenue, sole-founder C-Corps.

Your Compliance Timeline

Month-by-month view of what's due. Based on your incorporation date and operating state.

Tax Estimator

See how your expenses and future revenue affect your tax bill. Play with the numbers.

C-Corps pay a flat 21% federal tax rate on taxable income. NOL carryforwards from Year 1 can offset up to 80% of taxable income in future years. State taxes vary — typically 0-12% on top of federal.

State-Specific Guide

Auto-generated based on your incorporation state and operating state. Fill in your company info first.

Document Vault

Track your corporate documents. Check off what you have, note what's missing.

RoadWork doesn't store your actual documents — this is a checklist to help you track what you have and where it is. Keep originals in a secure location (Google Drive, Dropbox, or physical folder).

Runway Calculator

How long can you operate before you need revenue or funding? Based on your burn rate and cash on hand.

First 90 Days After Incorporation

Week-by-week guide for everything you need to do after incorporating. Based on real founder experience, not theory.

Cap Table

Track your company's equity. Standard Stripe Atlas setup: 10M shares authorized, founder gets 9M with 4-year vesting.

Standard Stripe Atlas setup: 10M authorized, 9M to founder at $0.00001/share ($90 total), 1M reserved for future (ESOP, advisors, investors). 83(b) election filed to avoid tax on vesting.

Founder Health Check

How well is your company set up? Based on your data in RoadWork.

Invoice Generator

Create professional invoices for your first clients. Print or save as PDF.

Line Items

Tax & Corporate Glossary

Every term you'll encounter as a first-time founder, explained in plain English.

Should You Be a C-Corp, S-Corp, or LLC?

Answer a few questions and we'll recommend the best structure for your situation.

Equity Dilution Simulator

See how fundraising rounds affect your ownership. Add rounds to visualize dilution over time.

Contract Templates

Common agreements you'll need. Click to generate a template pre-filled with your company info.

Mutual NDA

Non-Disclosure Agreement for conversations with potential partners, investors, or collaborators.

2 pages

Independent Contractor Agreement

Hire a freelancer or contractor. Covers scope, payment, IP assignment, and confidentiality.

3 pages

Advisor Agreement

Bring on an advisor with equity compensation. Standard 0.25-1% over 2 years.

2 pages

SaaS Terms of Service

Terms for your software product. Covers licensing, liability, data, and acceptable use.

4 pages

Privacy Policy

Required if you collect any user data. Covers data collection, usage, sharing, and rights.

3 pages

IP Assignment

Assign pre-existing IP (code, designs, concepts) from the founder to the company.

1 page
These are starting-point templates, not legal advice. For anything involving significant money, equity, or liability, have a lawyer review before signing. Services like Clerky, LegalZoom, or a startup-focused attorney can help.

Pitch Deck Data Sheet

When you're ready to fundraise, investors want specific numbers. RoadWork compiles your data into a pitch-ready sheet.

What Founders Wish They Knew

Real lessons from real founders who made the mistakes so you don't have to.

"I didn't file my Delaware franchise tax because I thought no revenue meant no tax. Got a $200 penalty and almost had my corp voided before my seed round."
Lesson: Delaware franchise tax is owed regardless of revenue. ~$500/year. Due March 1. Not filing can void your corporation, which kills any fundraise.
"My co-founder left at month 8. No vesting agreement. He owned 40% outright. Took 2 years and $50K in legal fees to resolve."
Lesson: Always use 4-year vesting with a 1-year cliff, even with co-founders you trust completely. Stripe Atlas does this automatically. Verify your RSPA is in place.
"I missed the 83(b) election window. When my shares vested 2 years later at a $5M valuation, I owed $180K in income tax on shares I couldn't sell."
Lesson: File 83(b) within 30 days of your stock grant. Atlas usually handles this, but VERIFY. The cost of missing it can be catastrophic.
"I spent $3K on a CPA for my first-year return. Revenue was literally zero. The return was 90% zeros. I could have done it myself in an hour."
Lesson: A zero-revenue C-Corp return is simple. Use RoadWork to generate the draft, then either file it yourself or hand it to a CPA for a quick review (~$300 max). Don't pay for full prep on a zero-revenue return.
"I incorporated in Delaware but operated from California. Didn't register as a foreign corp. 18 months later I couldn't enforce a contract in CA court because I wasn't authorized to do business there."
Lesson: Register as a foreign corporation in your operating state ASAP. It's $100-250 and takes a few days. Without it, you can't sue in that state's courts.
"I tracked zero expenses in year 1. Spent about $8K on hardware, hosting, and domains. That's $1,680 in future tax savings I'll never get back because I don't have receipts."
Lesson: Track EVERY expense from day 1. Every dollar creates NOL carryforward that offsets future taxes at 21%. Keep receipts. Use RoadWork's expense tracker.
"I held Series 7 and 65 licenses from my finance career. Let them expire because I thought I'd never need them. Two years later I started a fintech company and had to retake everything."
Lesson: Preserving professional licenses costs $170/year (MQP + EVEP). Retaking exams costs $500+ plus months of study. The preservation programs exist — use them.
"An investor asked for our board minutes during due diligence. We didn't have any. It wasn't a dealbreaker, but it added 3 weeks to the process and made us look disorganized."
Lesson: Keep annual board minutes even as a solo founder. It takes 30 minutes and RoadWork generates them for you. Investors WILL ask for them.

Business Milestones

Track your key business milestones. Check them off as you achieve them.

Market Sizing Calculator

Estimate your TAM, SAM, and SOM. Investors expect this in your pitch. Works top-down.

Monthly Bookkeeper

A monthly close checklist. Good bookkeeping habits from day 1 make tax time painless and fundraising smooth.

Founder Salary Calculator

When should you start paying yourself? How much? What are the tax implications?

Investor CRM

Track investor outreach, meetings, and follow-ups. All stored locally.

Tax Calendar Export

Download your compliance deadlines as calendar events. Import into Google Calendar, Apple Calendar, or Outlook.

The .ics file contains all your compliance deadlines as calendar events. Import it into any calendar app. Events include descriptions with action items and links.

Lean Canvas

Your one-page business model. Fill each box. This forces clarity on what you're building and why. Auto-saves.

Pricing Calculator

Figure out what to charge. Three methods: cost-plus, value-based, and competitive.

Unit Economics

CAC, LTV, margins — the numbers investors actually care about. Fill in what you know.

Cash Flow Forecast

Month-by-month cash flow projection. More detailed than the runway calculator — includes revenue growth, one-time costs, and seasonal variation.

KPI Tracker

Track your key metrics weekly. See trends over time.

Vendor Tracker

Track every service and tool you pay for. Know exactly where your money goes.

Deduction Finder

Are you missing tax deductions? Based on your industry and setup, here are deductions you might be eligible for but haven't tracked yet.

Tax Filing Wizard

Step-by-step guide through your first Form 1120 filing. Follow each step in order.

Monthly Budget Planner

Set monthly budget targets and track actual spending. Auto-populated from your recurring expenses.

Hiring Tracker

Track candidates for open roles. When you're ready to hire, keep your pipeline organized.

Before your first hire: Set up payroll (Gusto/Rippling), workers comp insurance, register for state unemployment tax (SUTA), and create an employee handbook. Issue offer letters with equity details (vesting, cliff, exercise window). File Form W-4 and I-9 for each new hire. Issue 1099-NEC for contractors paid $600+.

Job Search Tracker

Many founders work a day job while building their startup, or search for roles between ventures. Track your applications here.

Working while building: Check your employment agreement for non-compete and IP assignment clauses. Your employer may claim ownership of anything you build during employment. Consult a lawyer if your startup overlaps with your employer's business. Keep your startup work on personal devices and personal time.

Founder Wellness Check

72% of founders deal with mental health issues. This isn't weakness — it's the job. Track your wellbeing so you can see patterns before burnout hits.

5

Product-Market Fit Scorecard

42% of startups fail because there's no market need. Answer honestly — this scorecard tells you if you have PMF or if you're building in a vacuum.

Marketing Channel ROI

Stop guessing which channels work. Track spend and results per channel. Kill what doesn't work, double down on what does.

Scale Readiness Assessment

70% of startups scale too early. Premature scaling causes 74% of failures. This assessment tells you if you're actually ready.

Decision Journal

Log your big decisions. Review outcomes. Find patterns. Founders who journal decisions make better ones over time.

Churn & Retention Calculator

It costs 5-7x more to acquire a new customer than retain one. Understand your churn and what it's really costing you.

One-Page Strategy

Your strategic plan on one page. Vision, priorities, metrics, actions. Review monthly. Auto-saves.

Daily Founder Log

30 seconds. What did you do today? What will you do tomorrow? What's blocking you? Builds a record you'll be grateful for later.

3

OKRs (Objectives & Key Results)

Set 2-3 objectives per quarter. Each gets 3-5 measurable key results. Update progress weekly.

Customer Feedback Tracker

Log every piece of customer feedback. Find patterns. Build what people actually want.

Social Proof Collector

Collect testimonials, reviews, and case studies. Export them for your website, pitch deck, and marketing.

Competitor Tracker

Know your competition. Track their pricing, features, and positioning. Find your advantage.

Email Templates

Copy-paste templates for every email a founder sends. Pre-filled with your company info.

Launch Checklist

Launching on Product Hunt, Hacker News, Twitter, or Reddit? Don't miss anything.

Job Auto-Applier

Build your profile once. Generate tailored applications for every job. Track everything.

Your Profile

Target Jobs

Generate Application

Select a target job, and RoadWork generates a tailored cover letter, resume highlights, and follow-up email based on your profile.

Prism Console

ANALYTICS ENGINE | Pattern Recognition | Data Analysis

Pitch Builder

Build your elevator pitch, 1-liner, and investor narrative. Each version auto-saves.

One-Liner (Under 10 words)
Elevator Pitch (30 seconds)
Email Pitch (3 sentences)
Why Now? (Market timing)
Why You? (Founder-market fit)

Quick Notes

A scratch pad. Ideas, phone numbers, links, random thoughts. Auto-saves.

Meeting Notes

Structured meeting notes. Who, what was discussed, action items. Never lose context.

SWOT Analysis

Strengths, Weaknesses, Opportunities, Threats. Honest assessment = better decisions.

Strengths (Internal +)
Weaknesses (Internal -)
Opportunities (External +)
Threats (External -)

Customer Personas

Define who you're building for. Real personas = better product decisions.

Product Roadmap

What you're building and when. Keep it simple — 3 columns: Now, Next, Later.

Now (This Sprint)
Next (This Quarter)
Later (This Year)

Founder Habits

Daily habits that build the business. Track streaks. The compound effect is real.

P&L Statement

Simple profit & loss statement auto-generated from your tracked expenses and revenue.

Founder Resource Library

Curated tools, books, and resources. The stuff that actually helps.

Business Contacts

Your lightweight CRM. Investors, advisors, customers, partners — all in one place.

Changelog

What you shipped. Use this for investor updates, blog posts, and your own motivation.

Reading List

Articles, threads, videos to read later. Stop losing bookmarks.

How RoadWork Compares

Post-incorporation is where founders get lost. Here's how the options stack up.

Feature DIY / Google CPA ($500+/yr) Clerky ($500+) RoadWork (Free)
Compliance checklistYou figure it outThey tell you at tax timePost-incorp guidanceDynamic, personalized
Deadline trackingCalendar remindersThey remind youNoAuto-calculated, color-coded
Expense trackingSpreadsheetThey do itNoBuilt-in with categories
Form generationDownload from IRSThey file for youSome docs7004, 1120, Board Minutes
State-specific guidanceHours of researchThey knowNoAll 50 states, auto-generated
Tax educationBlog posts, RedditThey explain at billingHelp articles17 topics, 8 deep guides
Cap tableSpreadsheetNot their jobEquity managementBuilt-in tracker
Runway calculatorSpreadsheetNot their jobNoAuto from expenses
90-day planScattered adviceNot their jobChecklistPersonalized, week-by-week
Document vaultGoogle DriveNot their jobDocument storage16-doc checklist
Data privacyYour spreadsheetThey have your dataCloud-stored100% local, never leaves browser
Cost$0$500-2,000/yr$500+ one-time$0 forever
Professional license trackingNoNoNoFINRA, NASAA, any license
RoadWork doesn't replace a CPA for complex situations (multi-state, employees, significant revenue). It handles the 90% case: first-time founders with a zero-revenue C-Corp who need to know what to do and when to do it. When you outgrow RoadWork, you'll know exactly what to hand your CPA.

Ask RoadWork

Common founder tax questions answered instantly. Click a topic or type your question.

Welcome. I'm RoadWork's built-in knowledge base. I can answer common questions about C-Corp taxes, Delaware compliance, expense deductions, and first-year filing. Click a topic above or type a question below.

Startup Tax School

Everything a first-time founder needs to know about corporate taxes, explained plainly. Click to expand.

What is a C-Corp and why does it matter for taxes?

Basics

A C-Corporation is a separate legal entity from you. It files its own tax return (Form 1120), pays its own taxes, and has its own EIN. This is different from an LLC or S-Corp where income passes through to your personal return.

Key implications:

  • Double taxation — the corp pays tax on profits, then you pay tax again on dividends. This only matters when there ARE profits.
  • Separate return — even with $0 revenue, you must file Form 1120 every year.
  • Losses carry forward — every dollar you spend pre-revenue becomes a Net Operating Loss (NOL) that offsets future income.
  • Fiscal year — most C-Corps use calendar year (Jan 1 - Dec 31). Your first year is a "short year" from incorporation date to Dec 31.

The $0 revenue first year — what do I actually owe?

Critical

If your company had $0 revenue in its first year, here's exactly what you owe:

Federal (IRS): $0

No income = no tax. But you still must FILE Form 1120 (or get an extension with Form 7004). Filing is free. Not filing = penalties.

Delaware: ~$450-500

Delaware charges a franchise tax regardless of revenue. For a company with 10M authorized shares (standard Stripe Atlas setup), the minimum is ~$450 using the Authorized Shares method, plus a $50 annual report fee. Due March 1 every year. Late = $200 flat penalty + 1.5%/month interest.

Your operating state: Varies

If you incorporated in Delaware but operate from another state (most founders do), you need to register as a "foreign corporation" in your operating state. This costs $150-250 typically. Some states also require a state tax return even with $0 income.

Total first-year cost to stay compliant: ~$600-900

NOL Carryforward: Your most valuable first-year asset

Strategy

Every dollar you spend on the business before generating revenue creates a Net Operating Loss (NOL). This loss carries forward indefinitely and offsets up to 80% of future taxable income.

Example:

Year 1: Spend $5,000 (formation, domains, hardware, hosting). Revenue = $0. NOL = $5,000.

Year 2: Revenue = $50,000. Expenses = $20,000. Profit = $30,000. But you can deduct your $5,000 NOL from Year 1, so taxable income = $25,000. At 21% corporate tax rate, you save $1,050.

What counts as a deduction:

  • Formation fees (Stripe Atlas, legal)
  • Domain registrations
  • Cloud hosting (AWS, GCP, Cloudflare, DigitalOcean, Railway, Vercel)
  • Software subscriptions (GitHub, Figma, Notion, etc.)
  • Hardware (laptops, servers, Raspberry Pis, dev boards)
  • Home office ($5/sq ft simplified method, max $1,500)
  • Internet (business percentage)
  • Professional services (CPA, lawyer)

Keep receipts for everything.

Delaware Franchise Tax: The trap nobody warns you about

Warning

Every Delaware corporation must pay franchise tax every year, due March 1. Yes, even with $0 revenue. This catches first-time founders off guard.

Two calculation methods (use the cheaper one):

  • Authorized Shares method: Based on how many shares you authorized. 10M shares (standard Stripe Atlas) = ~$450. This is almost always cheaper.
  • Assumed Par Value Capital method: Based on gross assets and issued shares. Can be MUCH higher. Delaware defaults to this method on their website — always manually select Authorized Shares.

Late penalties:

  • $200 flat penalty (doesn't grow)
  • 1.5% monthly interest on the unpaid tax (~$6.75/month on $450)
  • After 1 full year delinquent: Delaware can void your corporation
  • Reinstating a voided corp costs hundreds more in back taxes + penalties

Pay online:

Go to corp.delaware.gov/paytaxes/, enter your file number, and pay with a card. Takes 5 minutes.

Form 7004: The free 6-month extension everyone should file

Tactic

Form 7004 gives you an automatic 6-month extension to file your Form 1120. It's free. It takes 5 minutes. There's no reason not to file it.

Key facts:

  • Due: April 15 (same as the original Form 1120 deadline)
  • Cost: $0
  • Extends deadline to: October 15
  • No explanation required — it's automatic
  • No payment required if you owe $0 in tax
  • File it even if you plan to file the 1120 on time — insurance against delays

How to file:

Download the PDF from irs.gov, fill it in (name, EIN, form code 12 for 1120, $0 tax), and mail it to the IRS. Or use RoadWork's Generate tab to create a filled version.

83(b) Election: What Stripe Atlas filed for you

Equity

If you used Stripe Atlas, they filed an 83(b) election within 30 days of your stock grant. This is extremely important.

What it does:

Without 83(b): You'd owe income tax on your shares as they vest, at their fair market value at vesting time. If your company becomes worth $10M by the time shares vest, you'd owe tax on millions in "income" you never received as cash.

With 83(b): You pay tax on the shares at grant time, when they're worth almost nothing ($0.00001/share = $90 total for 9M shares). Future appreciation is taxed as capital gains only when you sell.

Check that it was filed:

Look in your Stripe Atlas dashboard for the signed 83(b) election. You should also have mailed a copy to the IRS within 30 days of your stock grant. If you're past 30 days and didn't file, consult a tax attorney immediately — this cannot be undone.

Board Minutes: Why you need them (even alone)

Governance

Delaware law requires corporations to hold at least one board meeting per year. As a sole founder who is also the sole director, this feels silly — but it matters.

Why it matters:

  • Corporate veil: If someone sues your company and you haven't maintained proper corporate formalities (including minutes), a court can "pierce the corporate veil" and hold you personally liable.
  • Investor due diligence: When you raise money, investors will ask for your corporate records. Missing minutes = red flag.
  • IRS audits: Board minutes documenting your business purpose and expenditures support your tax deductions.

What to include:

Ratify all actions taken during the year: expenditures, officer elections, stock issuances, major business decisions, tax filing authorization, banking authorization. Use RoadWork's Generate tab to create proper minutes.

Annual cost to maintain a Delaware C-Corp

Planning
Delaware Franchise Tax~$450/yr
Delaware Annual Report Fee$50/yr
Registered Agent (DE)$100-200/yr
Federal Tax Return (DIY)$0/yr
Federal Tax Return (CPA)$300-500/yr
State Registration (year 1 only)$150-250
State Annual Renewal$0-25/yr
Total (DIY, after year 1)~$600/yr
Total (with CPA)~$1,100/yr

This is the bare minimum to keep your corporation alive and compliant. It doesn't include business expenses, insurance, or anything operational — just the cost of existing as a legal entity.

`); w.document.close(); setTimeout(() => { w.print(); }, 300); } function downloadInvoiceText() { const co = STATE.company || {}; const cur = document.getElementById('inv-currency').value; const subtotal = invItems.reduce((s, i) => s + i.qty * i.rate, 0); const text = `INVOICE #${document.getElementById('inv-num').value}\n${'═'.repeat(50)}\n\nFrom: ${co.name || 'Your Company'}\n${co.street || ''}, ${co.city || ''}, ${co.stateOp || ''} ${co.zip || ''}\nEIN: ${co.ein || 'N/A'}\n\nTo: ${document.getElementById('inv-client').value || 'Client'}\n${document.getElementById('inv-email').value || ''}\n\nDate: ${new Date().toLocaleDateString()}\nDue: ${document.getElementById('inv-due').value || 'On receipt'}\nTerms: ${document.getElementById('inv-terms').value}\n\n${'─'.repeat(50)}\n${invItems.map(i => `${i.desc.padEnd(30)} ${String(i.qty).padStart(3)} x ${cur}${i.rate.toFixed(2).padStart(8)} = ${cur}${(i.qty*i.rate).toFixed(2).padStart(10)}`).join('\n')}\n${'─'.repeat(50)}\n${'TOTAL:'.padEnd(46)}${cur}${subtotal.toFixed(2)}\n\n${document.getElementById('inv-notes').value || ''}`; downloadText(`Invoice-${document.getElementById('inv-num').value}.txt`, text); } // ════════════════════════════════════════════════ // GLOSSARY // ════════════════════════════════════════════════ const GLOSSARY = [ { term: '83(b) Election', def: 'IRS filing that lets you pay tax on restricted stock at grant (when worth little) instead of at vesting (when potentially worth millions). Must be filed within 30 days. Cannot be undone.' }, { term: 'Authorized Shares', def: 'The maximum number of shares a corporation can issue, set in the Certificate of Incorporation. Standard: 10,000,000. Can be increased by board/shareholder vote.' }, { term: 'Bylaws', def: 'Internal governance rules for the corporation. Define board structure, meeting requirements, officer roles. Not filed with the state — kept in corporate records.' }, { term: 'C Corporation', def: 'Standard corporate structure taxed at the entity level (21% federal). Subject to double taxation (corp tax + dividend tax). Preferred by investors.' }, { term: 'Cap Table', def: 'Capitalization table — a spreadsheet showing who owns what percentage of the company, including all share classes, options, and convertible instruments.' }, { term: 'Certificate of Authority', def: 'Registration document filed with a state to legally do business there as a foreign corporation (incorporated elsewhere).' }, { term: 'Certificate of Good Standing', def: 'Official document from the state of incorporation confirming the company exists, is current on taxes, and has authority to do business.' }, { term: 'Certificate of Incorporation', def: 'The founding document of a corporation, filed with the state. Contains: company name, authorized shares, registered agent, purpose.' }, { term: 'CIIAA', def: 'Confidential Information and Invention Assignment Agreement. Assigns all IP you create for the company to the company. Critical for fundraising.' }, { term: 'Cliff', def: 'The initial period before any stock vests. Standard: 1-year cliff on 4-year vesting. No shares vest until the cliff date, then 25% vest at once.' }, { term: 'Corporate Veil', def: 'Legal separation between the corporation and its owners. If "pierced," owners become personally liable. Maintain formalities (minutes, records) to protect it.' }, { term: 'CP 575', def: 'The IRS letter confirming your Employer Identification Number (EIN). Only sent once — keep it forever. Call 1-800-829-4933 if lost.' }, { term: 'D&O Insurance', def: 'Directors & Officers liability insurance. Protects company leaders from personal lawsuits arising from business decisions. ~$500-1,500/yr.' }, { term: 'Delaware Franchise Tax', def: 'Annual tax required by Delaware regardless of revenue. ~$450 via Authorized Shares method for 10M shares. Due March 1. Late = $200 penalty.' }, { term: 'Double Taxation', def: 'C-Corp income is taxed twice: once at corporate level (21%) and again when distributed as dividends. Only relevant when profitable.' }, { term: 'EIN', def: 'Employer Identification Number — your company\'s tax ID, like a Social Security Number for businesses. Format: XX-XXXXXXX. Used on all tax forms.' }, { term: 'Economic Nexus', def: 'Threshold that creates sales tax obligation in a state, typically $100K in sales or 200 transactions. Triggered by selling to customers there.' }, { term: 'ESOP', def: 'Employee Stock Option Pool — reserved shares for future employee grants. Standard: 10-20% of authorized shares. Investors expect this to be set up.' }, { term: 'Estimated Tax Payments', def: 'Quarterly tax payments required when expected annual tax exceeds $500. Due: Apr 15, Jun 15, Sep 15, Dec 15. Not required with $0 tax liability.' }, { term: 'EVEP', def: 'Exam Validity Extension Program (NASAA). Preserves Series 63/65 exam validity for up to 5 years after termination. $35/year per program.' }, { term: 'Fiscal Year', def: 'The 12-month period a company uses for accounting. Most C-Corps use calendar year (Jan 1 - Dec 31). First year is a "short year."' }, { term: 'Foreign Corporation', def: 'A company doing business in a state other than where it\'s incorporated. Must register for a Certificate of Authority.' }, { term: 'Form 1120', def: 'U.S. Corporation Income Tax Return. Annual federal tax return for C-Corps. Due April 15 (or October 15 with extension). Filed even with $0 revenue.' }, { term: 'Form 7004', def: 'Application for Automatic Extension of Time to File. Gives 6 extra months (to October 15). Free. No explanation needed. File by April 15.' }, { term: 'Franchise Tax', def: 'State tax for the privilege of being incorporated there. Not based on income — based on authorized shares or assets. Delaware\'s is the most famous.' }, { term: 'MQP', def: 'Maintaining Qualifications Program (FINRA). Preserves Series 7/SIE exam validity for up to 5 years after termination. $100/year total.' }, { term: 'NAICS Code', def: 'North American Industry Classification System code. 6-digit code identifying your industry. Software publishers: 511210. Required on Form 1120.' }, { term: 'Net Operating Loss (NOL)', def: 'When business expenses exceed income. Carries forward indefinitely to offset up to 80% of future taxable income. Your most valuable first-year asset.' }, { term: 'Par Value', def: 'Nominal value assigned to each share of stock. Standard: $0.00001. Has almost no practical significance for modern startups.' }, { term: 'Pass-Through Entity', def: 'Business structure (S-Corp, LLC, partnership) where income/losses pass to owners\' personal tax returns. Avoids corporate-level tax.' }, { term: 'Registered Agent', def: 'Person or company designated to receive legal documents on behalf of the corporation. Required in the state of incorporation. ~$100-200/yr.' }, { term: 'RSPA', def: 'Restricted Stock Purchase Agreement. Contract governing founder share issuance, vesting schedule, and repurchase rights.' }, { term: 'S Corporation', def: 'Corporation that elects pass-through taxation (Form 2553). Income/losses flow to personal returns. Max 100 shareholders, one class of stock.' }, { term: 'Section 179', def: 'IRS provision allowing immediate deduction of the full cost of qualifying business equipment (up to $1.16M) in the year of purchase.' }, { term: 'Short Year', def: 'A tax year shorter than 12 months. Your first year (from incorporation date to Dec 31) is a short year.' }, { term: 'Sole Incorporator', def: 'The person who signs and files the Certificate of Incorporation. Usually handled by your formation service (Stripe Atlas, Clerky).' }, { term: 'Stripe Atlas', def: 'Formation service ($500) that creates a Delaware C-Corp, files paperwork, opens a bank account, and provides legal docs. Does NOT handle ongoing compliance.' }, { term: 'U5 Form', def: 'Uniform Termination Notice. Filed when a registered representative leaves a broker-dealer. Starts the clock for MQP/EVEP election windows.' }, { term: 'Vesting', def: 'Process of earning ownership of stock over time. Standard: 4-year vesting with 1-year cliff. Protects the company if a founder leaves early.' }, { term: 'Written Consent', def: 'Board action taken without a formal meeting. Valid under Delaware law (Section 141(f)). Common for sole-director companies.' }, { term: '409A Valuation', def: 'Independent fair market value appraisal of your company\'s common stock. Required before issuing stock options. Typically $1,500-5,000. Valid for 12 months or until a material event.' }, { term: 'At-Will Employment', def: 'Employment that can be terminated by either party at any time, for any legal reason. Default in most US states. Offer letters should state this explicitly.' }, { term: 'Form I-9', def: 'Employment Eligibility Verification. Must be completed within 3 business days of hire for every new employee. Verifies identity and work authorization.' }, { term: 'Form W-4', def: 'Employee\'s Withholding Certificate. Each employee fills this out so you know how much federal income tax to withhold from their paycheck.' }, { term: 'FUTA', def: 'Federal Unemployment Tax Act. Employer-only tax at 6% on first $7,000 of each employee\'s wages (effectively 0.6% after state credit). Filed annually on Form 940.' }, { term: 'ISO', def: 'Incentive Stock Option. Stock option type available only to employees (not contractors). Better tax treatment — no income tax at exercise if held 2 years from grant + 1 year from exercise.' }, { term: 'NSO', def: 'Non-Qualified Stock Option. Stock option available to anyone (employees, contractors, advisors). Taxed as ordinary income at exercise on the spread between strike price and FMV.' }, { term: 'Non-Compete', def: 'Contract clause preventing you from working for competitors. Banned in CA, CO, MN, OK, ND, DC. Enforceability varies widely by state. FTC proposed a nationwide ban (status pending).' }, { term: 'SAFE', def: 'Simple Agreement for Future Equity. Y Combinator-created investment instrument. Not debt, not equity — converts to equity at next priced round. Standard for pre-seed/seed. No interest, no maturity date.' }, { term: 'SUTA', def: 'State Unemployment Tax Act. State-level unemployment insurance tax on employers. Rates vary by state and employer history (0.5-5.4% typical). Register when you hire your first employee.' }, { term: 'Workers Compensation', def: 'Insurance covering workplace injuries. Required by law in almost every state once you have employees. Cost varies by industry (0.5-3% of payroll for office work, higher for construction).' }, ].sort((a, b) => a.term.localeCompare(b.term)); function renderGlossary() { const search = (document.getElementById('glossary-search')?.value || '').toLowerCase(); const filtered = search ? GLOSSARY.filter(g => g.term.toLowerCase().includes(search) || g.def.toLowerCase().includes(search)) : GLOSSARY; document.getElementById('glossary-list').innerHTML = filtered.map(g => `
${g.term}
${g.def}
` ).join('') || '

No matching terms.

'; } // ════════════════════════════════════════════════ // ENTITY DECISION TREE // ════════════════════════════════════════════════ const DECIDE_QS = [ { id: 'raise', q: 'Do you plan to raise venture capital?', opts: [{v:'yes',l:'Yes, seeking VC/angels'},{v:'no',l:'No, bootstrapping'},{v:'maybe',l:'Maybe eventually'}] }, { id: 'profit', q: 'When do you expect to be profitable?', opts: [{v:'soon',l:'Within 1 year'},{v:'later',l:'1-3 years'},{v:'far',l:'3+ years or unknown'}] }, { id: 'founders', q: 'How many founders?', opts: [{v:'1',l:'Solo founder'},{v:'2-4',l:'2-4 co-founders'},{v:'5+',l:'5+ co-founders'}] }, { id: 'salary', q: 'Will you pay yourself a salary soon?', opts: [{v:'yes',l:'Yes, within 6 months'},{v:'no',l:'No, living on savings'},{v:'part',l:'Part-time / consulting'}] }, { id: 'employees', q: 'Will you hire employees soon?', opts: [{v:'yes',l:'Yes, within a year'},{v:'no',l:'No employees planned'},{v:'contractors',l:'Just contractors'}] }, ]; let decideAnswers = {}; function renderDecideQuestions() { const el = document.getElementById('decide-questions'); el.innerHTML = DECIDE_QS.map(q => `
${q.q}
${q.opts.map(o => `
${o.l}
`).join('')}
` ).join(''); if (Object.keys(decideAnswers).length === DECIDE_QS.length) renderDecideResult(); } function setDecide(id, val) { decideAnswers[id] = val; renderDecideQuestions(); } function renderDecideResult() { const a = decideAnswers; let rec = '', reason = '', pros = [], cons = []; if (a.raise === 'yes') { rec = 'C Corporation (Delaware)'; reason = 'VCs strongly prefer Delaware C-Corps. The double taxation concern is irrelevant while pre-profit. Convertible notes and SAFEs are designed for C-Corps.'; pros = ['Investors expect it', 'Clean equity structure', 'Unlimited shareholders', 'Multiple stock classes', 'NOL carryforward']; cons = ['Double taxation when profitable', '~$600/yr minimum compliance cost', 'More paperwork than LLC']; } else if (a.profit === 'soon' && a.salary === 'yes' && a.raise !== 'yes') { rec = 'S Corporation'; reason = 'If you\'re profitable soon and paying yourself a salary, S-Corp saves self-employment tax. Income above "reasonable salary" avoids FICA (15.3%).'; pros = ['No double taxation', 'Self-employment tax savings', 'Pass-through losses to personal return', 'Credibility with clients']; cons = ['Max 100 shareholders', 'One class of stock', 'Harder to raise VC later', 'Reasonable salary requirement']; } else if (a.raise === 'no' && a.founders === '1' && a.employees !== 'yes') { rec = 'Single-Member LLC'; reason = 'Simplest structure for a solo bootstrapped founder. Pass-through taxation, minimal paperwork. Can always convert to C-Corp or elect S-Corp status later.'; pros = ['Simplest setup', 'Pass-through taxation', 'No corporate formalities required', 'Can convert later', 'Low compliance cost']; cons = ['Self-employment tax on all profits', 'Less credible to some clients/partners', 'Cannot issue stock options', 'Some investors won\'t invest']; } else { rec = 'C Corporation (Delaware)'; reason = 'For most startups with growth ambitions, the C-Corp is the safest default. It\'s the standard. You can always discuss S-Corp election with a CPA later when profitable.'; pros = ['Industry standard', 'Clean for future fundraising', 'Unlimited growth potential', 'Employee stock options', 'NOL carryforward']; cons = ['Double taxation when profitable', 'Annual compliance cost', 'Board meeting requirements']; } document.getElementById('decide-result').innerHTML = `
Recommendation

${rec}

${reason}

${pros.map(p => `+ ${p}`).join('')} ${cons.map(c => `- ${c}`).join('')}
This is general guidance based on common patterns. Every situation is different. If you're unsure, a 30-minute CPA consultation ($100-200) can save you thousands in the wrong structure.
`; } // ════════════════════════════════════════════════ // CAP TABLE // ════════════════════════════════════════════════ function addShareholder() { const name = document.getElementById('cap-name').value; const shares = parseInt(document.getElementById('cap-shares').value); const cls = document.getElementById('cap-class').value; const vesting = document.getElementById('cap-vesting').value; if (!name || !shares) return; const holders = JSON.parse(localStorage.getItem('rw-captable') || '[]'); holders.push({ name, shares, class: cls, vesting }); localStorage.setItem('rw-captable', JSON.stringify(holders)); document.getElementById('cap-name').value = ''; document.getElementById('cap-shares').value = ''; renderCapTable(); showToast(`Added: ${name} (${shares.toLocaleString()} shares)`); } function deleteShareholder(i) { const holders = JSON.parse(localStorage.getItem('rw-captable') || '[]'); holders.splice(i, 1); localStorage.setItem('rw-captable', JSON.stringify(holders)); renderCapTable(); } function renderCapTable() { const holders = JSON.parse(localStorage.getItem('rw-captable') || '[]'); const auth = parseInt(document.getElementById('cap-auth')?.value) || 10000000; const issued = holders.reduce((s, h) => s + h.shares, 0); const el = document.getElementById('cap-table-view'); el.innerHTML = `
${auth.toLocaleString()}
Authorized
${issued.toLocaleString()}
Issued
${(auth - issued).toLocaleString()}
Reserved
${holders.length ? ` ${holders.map((h, i) => { const pct = auth > 0 ? (h.shares / auth * 100) : 0; return ``; }).join('')}
ShareholderSharesClass%Vesting
${h.name} ${h.shares.toLocaleString()} ${h.class} ${pct.toFixed(1)}% ${h.vesting === '4y1c' ? '4yr / 1yr cliff' : h.vesting === 'none' ? 'Fully vested' : 'Custom'}
Unissued (reserved) ${(auth - issued).toLocaleString()} ${((auth-issued)/auth*100).toFixed(1)}% ESOP / Advisors / Future
` : '

No shareholders added. Standard setup: 9M shares to founder, 1M reserved.

'} `; } // ════════════════════════════════════════════════ // HEALTH CHECK // ════════════════════════════════════════════════ function renderHealthCheck() { const co = STATE.company || {}; const vault = JSON.parse(localStorage.getItem('rw-vault') || '{}'); const holders = JSON.parse(localStorage.getItem('rw-captable') || '[]'); const recurring = JSON.parse(localStorage.getItem('rw-recurring') || '[]'); const licenses = JSON.parse(localStorage.getItem('rw-licenses') || '[]'); const items = getChecklist(); const now = new Date(); const checks = [ { title: 'Company info entered', pass: !!(co.name && co.ein && co.date), detail: co.name ? `${co.name} (EIN: ${co.ein})` : 'Go to Company tab and fill in your entity info' }, { title: 'Operating state set', pass: !!co.stateOp, detail: co.stateOp ? `Operating from ${co.stateOp}` : 'Important for state registration and tax obligations' }, { title: 'EIN documented', pass: !!vault['ein-letter'], detail: vault['ein-letter'] ? 'CP 575 letter tracked in vault' : 'Mark your EIN letter as collected in the Vault tab' }, { title: '83(b) election filed', pass: !!vault['83b'], detail: vault['83b'] ? 'Filed and tracked' : 'CRITICAL — must be filed within 30 days of stock grant' }, { title: 'Certificate of Incorporation', pass: !!vault['cert-inc'], detail: vault['cert-inc'] ? 'On file' : 'Mark as collected in Vault tab' }, { title: 'Bylaws adopted', pass: !!vault['bylaws'], detail: vault['bylaws'] ? 'On file' : 'Should be in your Atlas dashboard' }, { title: 'CIIAA signed', pass: !!vault['ciiaa'], detail: vault['ciiaa'] ? 'IP assignment complete' : 'Assigns your IP to the company — critical for fundraising' }, { title: 'Cap table documented', pass: holders.length > 0, detail: holders.length > 0 ? `${holders.length} shareholder(s), ${holders.reduce((s,h)=>s+h.shares,0).toLocaleString()} shares issued` : 'Go to Cap Table tab and add your founder shares' }, { title: 'Expenses tracked', pass: STATE.expenses.length > 0, detail: STATE.expenses.length > 0 ? `${STATE.expenses.length} expenses, $${STATE.expenses.reduce((s,e)=>s+e.amt,0).toFixed(0)} total` : 'Track expenses to build your NOL carryforward' }, { title: 'Recurring costs tracked', pass: recurring.length > 0, detail: recurring.length > 0 ? `${recurring.length} recurring, $${recurring.reduce((s,r)=>s+(r.freq==='monthly'?r.amt*12:r.amt),0).toFixed(0)}/yr` : 'Add monthly subscriptions in the Expenses tab' }, { title: 'No overdue obligations', pass: !items.some(i => { const d = Math.ceil((new Date(i.deadline)-now)/86400000); return d < 0 && !STATE.checked[i.id]; }), detail: items.filter(i => { const d = Math.ceil((new Date(i.deadline)-now)/86400000); return d < 0 && !STATE.checked[i.id]; }).length > 0 ? `${items.filter(i => { const d = Math.ceil((new Date(i.deadline)-now)/86400000); return d < 0 && !STATE.checked[i.id]; }).length} overdue items — check Compliance tab` : 'All deadlines current' }, { title: 'Board minutes on record', pass: !!STATE.checked['board-minutes'], detail: STATE.checked['board-minutes'] ? 'Annual meeting documented' : 'Generate board minutes from the Generate tab' }, { title: 'Federal extension filed', pass: !!STATE.checked['f7004'], detail: STATE.checked['f7004'] ? 'Form 7004 filed' : 'File by April 15 — free, takes 5 minutes' }, { title: 'Professional licenses tracked', pass: licenses.length > 0 || true, detail: licenses.length > 0 ? `${licenses.length} license(s) tracked` : 'N/A — no professional licenses to track', na: licenses.length === 0 }, ]; const score = checks.filter(c => c.pass && !c.na).length; const total = checks.filter(c => !c.na).length; const pct = Math.round(score / total * 100); const color = pct >= 80 ? 'var(--green)' : pct >= 50 ? 'var(--yellow)' : 'var(--red)'; const grade = pct >= 90 ? 'A' : pct >= 80 ? 'B' : pct >= 70 ? 'C' : pct >= 60 ? 'D' : 'F'; const el = document.getElementById('health-check-view'); el.innerHTML = `
${grade}
${score}/${total} checks passed (${pct}%)
${pct >= 80 ? 'Your corporate house is in good order.' : pct >= 50 ? 'Some gaps to address — check the items below.' : 'Several critical items need attention.'}
${checks.map(c => `
${c.na ? '—' : c.pass ? '+' : '!'}
${c.title}
${c.detail}
`).join('')}
`; } // ════════════════════════════════════════════════ // COMMAND PALETTE (Cmd+K) // ════════════════════════════════════════════════ const CMD_ITEMS = [ { title: 'Compliance Checklist', action: () => document.querySelector('[data-tab="checklist"]').click(), hint: '1' }, { title: 'Company Info', action: () => document.querySelector('[data-tab="company"]').click(), hint: '2' }, { title: 'Track Expenses', action: () => document.querySelector('[data-tab="expenses"]').click(), hint: '3' }, { title: 'Generate Forms', action: () => document.querySelector('[data-tab="generate"]').click(), hint: '4' }, { title: 'Startup Tax School', action: () => document.querySelector('[data-tab="learn"]').click(), hint: '5' }, { title: 'Timeline', action: () => document.querySelector('[data-tab="timeline"]').click(), hint: '6' }, { title: 'Tax Estimator', action: () => document.querySelector('[data-tab="estimator"]').click(), hint: '7' }, { title: 'State Guide', action: () => document.querySelector('[data-tab="stateguide"]').click(), hint: '8' }, { title: 'Document Vault', action: () => document.querySelector('[data-tab="vault"]').click(), hint: '9' }, { title: 'Ask a Question', action: () => { document.querySelector('[data-tab="ask"]').click(); setTimeout(()=>document.getElementById('ask-input').focus(),100); } }, { title: 'Runway Calculator', action: () => document.querySelector('[data-tab="runway"]').click() }, { title: 'Cap Table', action: () => document.querySelector('[data-tab="captable"]').click() }, { title: 'Health Check', action: () => document.querySelector('[data-tab="health"]').click() }, { title: 'Export CSV', action: () => exportCSV(), hint: 'E' }, { title: 'Backup All Data', action: () => exportAllData(), hint: 'B' }, { title: 'Download Full Report', action: () => generateFullReport() }, { title: 'Generate Form 7004', action: () => generateForm7004() }, { title: 'Generate Form 1120', action: () => generateForm1120() }, { title: 'Generate Board Minutes', action: () => generateBoardMinutes() }, { title: 'Print (Ctrl+P)', action: () => window.print() }, { title: 'Invoice Generator', action: () => document.querySelector('[data-tab="invoice"]').click() }, { title: 'Glossary', action: () => { document.querySelector('[data-tab="glossary"]').click(); setTimeout(()=>document.getElementById('glossary-search').focus(),100); } }, { title: 'C-Corp vs S-Corp vs LLC', action: () => document.querySelector('[data-tab="decide"]').click() }, { title: '90-Day Plan', action: () => document.querySelector('[data-tab="checklist90"]').click() }, { title: 'Compare Options', action: () => document.querySelector('[data-tab="compare"]').click() }, ]; function initCommandPalette() { const overlay = document.createElement('div'); overlay.className = 'cmd-overlay'; overlay.id = 'cmd-palette'; overlay.innerHTML = `
`; document.body.appendChild(overlay); overlay.addEventListener('click', (e) => { if (e.target === overlay) closeCmdPalette(); }); document.getElementById('cmd-input').addEventListener('input', (e) => { const q = e.target.value.toLowerCase(); const results = q ? CMD_ITEMS.filter(i => i.title.toLowerCase().includes(q)) : CMD_ITEMS; renderCmdResults(results); }); document.getElementById('cmd-input').addEventListener('keydown', (e) => { if (e.key === 'Escape') closeCmdPalette(); if (e.key === 'Enter') { const active = document.querySelector('.cmd-item.active') || document.querySelector('.cmd-item'); if (active) active.click(); } if (e.key === 'ArrowDown' || e.key === 'ArrowUp') { e.preventDefault(); const items = [...document.querySelectorAll('.cmd-item')]; const idx = items.findIndex(i => i.classList.contains('active')); items.forEach(i => i.classList.remove('active')); const next = e.key === 'ArrowDown' ? Math.min(idx + 1, items.length - 1) : Math.max(idx - 1, 0); items[next]?.classList.add('active'); items[next]?.scrollIntoView({ block: 'nearest' }); } }); } function renderCmdResults(items) { document.getElementById('cmd-results').innerHTML = items.map((item, i) => `
${item.title} ${item.hint ? `${item.hint}` : ''}
` ).join(''); } function runCmd(idx) { CMD_ITEMS[idx].action(); closeCmdPalette(); } function openCmdPalette() { document.getElementById('cmd-palette').classList.add('show'); const input = document.getElementById('cmd-input'); input.value = ''; input.focus(); renderCmdResults(CMD_ITEMS); } function closeCmdPalette() { document.getElementById('cmd-palette').classList.remove('show'); } initCommandPalette(); // ════════════════════════════════════════════════ // RUNWAY CALCULATOR // ════════════════════════════════════════════════ function updateRunway() { const cash = parseFloat(document.getElementById('run-cash').value) || 0; const rev = parseFloat(document.getElementById('run-rev').value) || 0; const growth = parseFloat(document.getElementById('run-growth').value) || 0; const recurring = JSON.parse(localStorage.getItem('rw-recurring') || '[]'); const autoburn = recurring.reduce((s, r) => s + (r.freq === 'monthly' ? r.amt : r.amt / 12), 0) + 55; const burn = parseFloat(document.getElementById('run-burn').value) || autoburn; let balance = cash; let monthlyRev = rev; let months = 0; const projections = []; for (let m = 0; m < 36; m++) { const net = monthlyRev - burn; balance += net; if (balance <= 0 && months === 0) months = m; projections.push({ month: m + 1, balance: Math.max(0, balance), rev: monthlyRev, burn }); monthlyRev *= (1 + growth / 100); } if (months === 0 && balance > 0) months = 36; const color = months <= 3 ? 'var(--red)' : months <= 6 ? 'var(--yellow)' : 'var(--green)'; const pct = Math.min(100, (months / 24) * 100); const el = document.getElementById('runway-display'); el.innerHTML = `
${months >= 36 ? '36+' : months}
Months Runway
$${burn.toLocaleString(undefined, {maximumFractionDigits: 0})}
Monthly Burn
$${cash.toLocaleString()}
Cash on Hand
Now6 mo12 mo18 mo24 mo

Monthly Projection

MonthBalanceNet
${projections.slice(0, 18).map(p => { const net = p.rev - p.burn; return `
${p.month}
$${p.balance.toLocaleString(undefined, {maximumFractionDigits: 0})}
${net >= 0 ? '+' : ''}$${net.toFixed(0)}
`; }).join('')} ${burn > 0 ? `
Burn breakdown: Your monthly burn of $${burn.toFixed(0)} includes $${autoburn.toFixed(0)} from tracked recurring expenses + $55 estimated baseline (compliance amortized). ${rev > 0 ? `At ${growth}% monthly revenue growth, you reach profitability in ~${Math.ceil(Math.log(burn / (rev || 1)) / Math.log(1 + growth/100))} months.` : 'Start generating revenue to extend your runway.'}
` : ''} `; } // ════════════════════════════════════════════════ // 90-DAY PLAN // ════════════════════════════════════════════════ function render90DayPlan() { const co = STATE.company || {}; const stateInc = co.stateInc || 'DE'; const stateOp = co.stateOp || 'your operating state'; const platform = co.platform || 'stripe'; const plan = [ { phase: 'Phase 1: Foundation (Week 1-2)', weeks: [ { week: 1, title: 'Incorporation & Identity', tasks: [ 'Verify Certificate of Incorporation is filed with ' + stateInc, 'Confirm EIN received (CP 575 letter) — keep this forever', 'Review and sign all formation documents in ' + (platform === 'stripe' ? 'Stripe Atlas' : 'your formation platform') + ' dashboard', 'File 83(b) election within 30 days of stock grant (Atlas may do this for you — VERIFY)', 'Open business bank account (Mercury, Relay, or traditional bank)', 'Activate Stripe payment processing', 'Set up business email (Google Workspace or similar)', ]}, { week: 2, title: 'Digital Infrastructure', tasks: [ 'Register primary domain(s)', 'Set up DNS (Cloudflare recommended — free tier is excellent)', 'Create GitHub organization for your company', 'Set up basic landing page (even a simple "coming soon")', 'Set up Google Analytics or PostHog for traffic tracking', {text: 'Register trademark (optional, ~$350/class via USPTO TEAS)', optional: true}, ]}, ]}, { phase: 'Phase 2: Compliance Setup (Week 3-4)', weeks: [ { week: 3, title: 'State & Federal Registration', tasks: [ stateOp !== stateInc ? `Register as foreign corporation in ${stateOp} ($150-250)` : 'No foreign registration needed (same state)', stateOp !== stateInc ? `Obtain Certificate of Good Standing from ${stateInc} first (~$50)` : 'Confirm good standing with ' + stateInc, 'Set up accounting system (Wave, QuickBooks, or spreadsheet)', 'Start tracking ALL expenses from day 1 — every dollar becomes NOL', 'Document your business purpose and market (helps with tax deductions)', {text: 'Register for state sales tax (only if selling to consumers immediately)', optional: true}, ]}, { week: 4, title: 'Corporate Governance', tasks: [ 'Draft initial board resolution (ratifies all formation actions)', 'Confirm officer elections in writing (CEO, Secretary at minimum)', 'Set up corporate records folder (Google Drive, Dropbox, or local)', 'Store all formation docs in one place: Certificate, Bylaws, EIN, 83(b), RSPA, Stock Cert, CIIAA', 'Calendar annual deadlines: ' + stateInc + ' franchise tax, Form 1120, board meeting', 'Consider D&O insurance (~$500-1,500/yr) — not required but smart', ]}, ]}, { phase: 'Phase 3: Build & Ship (Week 5-8)', weeks: [ { week: '5-6', title: 'Product Development', tasks: [ 'Build your MVP — the actual thing people will use', 'Set up CI/CD pipeline (GitHub Actions is free for public repos)', 'Deploy to production (Vercel, Railway, Cloudflare Workers — all have free tiers)', 'Set up error tracking (Sentry free tier)', 'Set up uptime monitoring', 'Write honest, accurate product descriptions (no inflated claims)', ]}, { week: '7-8', title: 'Go to Market', tasks: [ 'Create pricing page with Stripe payment links', 'Set up customer support channel (email, Discord, or chat)', 'Write launch blog post explaining what you built and why', 'Post on Hacker News, Product Hunt, relevant subreddits, X/Twitter', 'Reach out to 10 potential users personally', 'Set up basic SEO: title tags, meta descriptions, Schema.org markup', {text: 'Register for sales tax in your state if SaaS is taxable there', optional: true}, ]}, ]}, { phase: 'Phase 4: First Revenue & Tax Prep (Week 9-12)', weeks: [ { week: '9-10', title: 'Revenue & Metrics', tasks: [ 'Get your first paying customer — nothing else matters until this happens', 'Set up basic financial dashboard (revenue, expenses, runway)', 'Track MRR/ARR if subscription-based', 'Start monthly expense reconciliation', 'Respond to every customer inquiry within 24 hours', 'Collect product feedback and iterate', ]}, { week: '11-12', title: 'Quarter-End & Tax Prep', tasks: [ 'Reconcile all Q1 expenses with receipts', 'File Form 7004 (federal extension) by April 15 — free, 5 minutes', 'If ' + stateInc + ' franchise tax is due, pay it (March 1 for Delaware)', 'Review capitalization table — any changes to report?', 'Draft first quarterly board resolution', 'Assess whether quarterly estimated tax payments are needed (only if >$500 projected tax)', 'Start thinking about Form 1120 preparation (use RoadWork to generate draft)', {text: 'Evaluate S-Corp election if profitable (consult CPA)', optional: true}, ]}, ]}, ]; const el = document.getElementById('ninety-day-plan'); el.innerHTML = plan.map(phase => `
${phase.phase}
${phase.weeks.map(week => `

${week.title} Week ${week.week}

`).join('')} `).join(''); } // ════════════════════════════════════════════════ // RECURRING EXPENSES // ════════════════════════════════════════════════ function addRecurring() { const cat = document.getElementById('rec-cat').value; const desc = document.getElementById('rec-desc').value; const amt = parseFloat(document.getElementById('rec-amt').value); const freq = document.getElementById('rec-freq').value; if (!desc || !amt) return; const recurring = JSON.parse(localStorage.getItem('rw-recurring') || '[]'); recurring.push({ cat, desc, amt, freq }); localStorage.setItem('rw-recurring', JSON.stringify(recurring)); document.getElementById('rec-desc').value = ''; document.getElementById('rec-amt').value = ''; renderRecurring(); showToast(`Recurring: ${desc} ($${amt}/${freq === 'monthly' ? 'mo' : 'yr'})`); } function deleteRecurring(i) { const recurring = JSON.parse(localStorage.getItem('rw-recurring') || '[]'); recurring.splice(i, 1); localStorage.setItem('rw-recurring', JSON.stringify(recurring)); renderRecurring(); } function renderRecurring() { const recurring = JSON.parse(localStorage.getItem('rw-recurring') || '[]'); const el = document.getElementById('recurring-list'); if (!recurring.length) { el.innerHTML = ''; document.getElementById('recurring-total').innerHTML = ''; return; } el.innerHTML = recurring.map((r, i) => { const annual = r.freq === 'monthly' ? r.amt * 12 : r.amt; return `
${r.desc} ${r.freq === 'monthly' ? '$'+r.amt+'/mo' : '$'+r.amt+'/yr'}
$${annual.toFixed(0)}/yr
`; }).join(''); const totalAnnual = recurring.reduce((s, r) => s + (r.freq === 'monthly' ? r.amt * 12 : r.amt), 0); document.getElementById('recurring-total').innerHTML = `Projected annual recurring: $${totalAnnual.toLocaleString()}/yr ($${(totalAnnual/12).toFixed(0)}/mo)`; } // ════════════════════════════════════════════════ // LICENSES // ════════════════════════════════════════════════ function addLicense() { const name = document.getElementById('lic-name').value; const program = document.getElementById('lic-program').value; const cost = document.getElementById('lic-cost').value; const deadline = document.getElementById('lic-deadline').value; const notes = document.getElementById('lic-notes').value; if (!name) return; const licenses = JSON.parse(localStorage.getItem('rw-licenses') || '[]'); licenses.push({ name, program, cost, deadline, notes, how: `Renew via ${program || 'licensing authority'}` }); localStorage.setItem('rw-licenses', JSON.stringify(licenses)); document.getElementById('lic-name').value = ''; document.getElementById('lic-program').value = ''; document.getElementById('lic-cost').value = ''; document.getElementById('lic-deadline').value = ''; document.getElementById('lic-notes').value = ''; renderLicenses(); renderChecklist(); showToast(`License added: ${name}`); } function deleteLicense(i) { const licenses = JSON.parse(localStorage.getItem('rw-licenses') || '[]'); licenses.splice(i, 1); localStorage.setItem('rw-licenses', JSON.stringify(licenses)); renderLicenses(); renderChecklist(); showToast('License removed'); } function renderLicenses() { const licenses = JSON.parse(localStorage.getItem('rw-licenses') || '[]'); const el = document.getElementById('license-list'); if (!licenses.length) { el.innerHTML = '

No licenses tracked yet.

'; return; } el.innerHTML = licenses.map((lic, i) => `
${lic.name} via ${lic.program}
${lic.cost} | Due: ${lic.deadline || 'not set'} | ${lic.notes || ''}
`).join(''); } // ════════════════════════════════════════════════ // ASK (Knowledge Base) // ════════════════════════════════════════════════ const QA = [ { q: ['83b','83(b)','eighty three'], topic: '83(b) Election', a: 'The 83(b) election lets you pay tax on restricted stock at grant time (when it\'s worth almost nothing) instead of at vesting (when it could be worth millions). Stripe Atlas files this for you within 30 days of your stock grant. If you missed the 30-day window, consult a tax attorney immediately — it cannot be filed late. Check your Atlas dashboard for the signed copy.' }, { q: ['nol','net operating loss','carry forward','carryforward'], topic: 'NOL Carryforward', a: 'A Net Operating Loss (NOL) occurs when your deductions exceed your income. For C-Corps, NOLs carry forward indefinitely and can offset up to 80% of taxable income in future years. Every dollar you spend pre-revenue becomes future tax savings. At 21% corporate rate, $5,000 in Year 1 expenses saves you $1,050 when you become profitable.' }, { q: ['franchise','delaware tax','de tax'], topic: 'Delaware Franchise Tax', a: 'Every Delaware corp pays franchise tax by March 1 each year, regardless of revenue. Use the Authorized Shares method (not Assumed Par Value — that\'s much higher). For 10M authorized shares: ~$450 tax + $50 report fee = ~$500. Late penalty: flat $200 + 1.5%/month interest. Pay at corp.delaware.gov/paytaxes/ with your file number.' }, { q: ['7004','extension','extend'], topic: 'Form 7004 Extension', a: 'Form 7004 gives you an automatic 6-month extension to file Form 1120. It\'s free, takes 5 minutes, and there\'s no reason not to file it. Due April 15, extends your deadline to October 15. No explanation needed, no payment if you owe $0. Download from irs.gov/pub/irs-pdf/f7004.pdf, fill in your name/EIN/address, and mail it.' }, { q: ['1120','tax return','federal return'], topic: 'Form 1120', a: 'Form 1120 is the annual C-Corp income tax return. For a zero-revenue first year, most lines are 0. Your expenses go on Line 26 (Other deductions), creating a negative taxable income = your NOL. Tax owed = $0. You can DIY it, use tax software (~$200), or hire a CPA (~$300-500). The IRS mailing address depends on your state.' }, { q: ['s corp','s-corp','scorp','election','convert'], topic: 'S-Corp Election', a: 'An S-Corp election (Form 2553) makes income pass through to your personal return, avoiding double taxation. It makes sense when you\'re profitable and paying yourself a salary. For pre-revenue startups, C-Corp is usually better because: (1) investors prefer it, (2) you\'re not losing anything to double taxation yet, (3) C-Corp NOLs are simpler. You can always elect S-Corp status later.' }, { q: ['board','minutes','meeting','corporate records'], topic: 'Board Minutes', a: 'Delaware requires at least one board meeting per year. As sole director, a written consent works. Document: officer elections, expense ratification, tax filing authorization, banking authorization, and any major decisions. Missing minutes = risk of "piercing the corporate veil" (personal liability) and red flags in investor due diligence.' }, { q: ['foreign','register','operating state','certificate of authority'], topic: 'Foreign Corp Registration', a: 'If your company is incorporated in one state (usually DE) but operates from another, you must register as a foreign corporation in your operating state. This costs $100-750 depending on the state. You need a Certificate of Good Standing from your incorporation state first (~$50 from Delaware). Without registering, you can\'t sue in your state\'s courts.' }, { q: ['home office','office deduction','rent'], topic: 'Home Office Deduction', a: 'The simplified method: $5 per square foot, max 300 sq ft = max $1,500/year. The regular method: calculate the percentage of your home used exclusively for business and deduct that % of rent/mortgage, utilities, insurance, etc. The simplified method is easier and audit-proof. Either way, the space must be used regularly and exclusively for business.' }, { q: ['ein','employer identification','tax id'], topic: 'EIN', a: 'Your EIN (Employer Identification Number) is your company\'s tax ID. It\'s on the CP 575 letter the IRS sent after formation. Use it on ALL tax forms, bank accounts, and official documents. If you lost the letter, call 1-800-829-4933 (IRS) to verify — they only send the CP 575 once.' }, { q: ['stripe','atlas','payment'], topic: 'Stripe Atlas', a: 'Stripe Atlas handles incorporation ($500), but does not handle ongoing compliance. After formation, you\'re responsible for: Delaware franchise tax (annual), Form 1120 (annual), state registration, board minutes, registered agent renewal, and all tax filings. Atlas provides guidance docs and partner discounts, but doesn\'t file anything for you.' }, { q: ['depreciation','hardware','equipment','section 179'], topic: 'Hardware Deductions', a: 'Business hardware (laptops, servers, dev boards) can be deducted. Section 179 lets you deduct the full cost in year 1 (up to $1.16M). For small amounts, just put it on Line 26 as "Other deductions." Keep receipts. Only items purchased after incorporation count as direct deductions — pre-incorporation items can be contributed at fair market value.' }, { q: ['boi','beneficial ownership','fincen','transparency'], topic: 'FinCEN BOI Report', a: 'The Corporate Transparency Act requires small companies to report beneficial ownership to FinCEN. As of early 2026, enforcement is suspended due to court challenges. Monitor fincen.gov/boi for updates. When required: file at boiefiling.fincen.gov (free, 15 min). Report your name, DOB, address, and government ID.' }, { q: ['sales tax','saas','software tax'], topic: 'SaaS Sales Tax', a: 'SaaS taxability varies by state. Most states tax SaaS as tangible personal property or a taxable service. You must register for sales tax in each state where you have economic nexus (typically $100K in sales or 200 transactions). Don\'t worry about this until you have revenue. When you do, services like TaxJar or Avalara automate multi-state sales tax.' }, { q: ['estimated','quarterly','payment'], topic: 'Estimated Tax Payments', a: 'C-Corps that expect to owe $500+ in tax must make quarterly estimated payments (April 15, June 15, Sept 15, Dec 15). With $0 revenue and $0 tax liability, estimated payments are not required. Once you become profitable, you\'ll need to start making quarterly payments to avoid underpayment penalties.' }, { q: ['payroll','salary','w2','hire'], topic: 'Payroll & Hiring', a: 'With no employees, you have zero payroll obligations. The moment you hire someone (or put yourself on payroll), you must: register for federal/state payroll tax withholding, file Form 941 quarterly (payroll tax), Form 940 annually (FUTA), issue W-2s by January 31, and register with your state\'s unemployment insurance. Most founders don\'t take a salary until revenue supports it.' }, { q: ['license','finra','series','securities','broker'], topic: 'Professional Licenses', a: 'If you hold professional licenses (FINRA Series 7/63/65, real estate, CPA, etc.), you can usually preserve them without an active firm. FINRA\'s MQP program ($100/yr) preserves Series 7/SIE. NASAA\'s EVEP ($35/yr each) preserves Series 63 and 65. Total: ~$170/yr. Enroll via FinPro within 2 years of your last registration ending.' }, { q: ['cost','how much','annual','maintain'], topic: 'Annual Costs', a: 'Minimum annual cost to maintain a Delaware C-Corp: ~$600/yr DIY ($450 DE franchise tax + $50 report + $100-200 registered agent). With a CPA: ~$1,100/yr. Add state registration ($150-250 year 1) and renewal ($0-50/yr). Total first year: $800-1,200. Subsequent years: $600-1,100.' }, { q: ['hipaa','health','patient','phi','protected health'], topic: 'HIPAA Compliance', a: 'If your business handles Protected Health Information (PHI), HIPAA compliance is mandatory. This includes: annual risk assessments, employee training, BAA agreements with vendors, encrypted data storage, breach notification procedures. Penalties for violations: $100-$50,000 per violation, up to $1.5M/year per category. Use HIPAA-compliant hosting (AWS/GCP have HIPAA-eligible services) and get a compliance consultant for your first setup (~$3,000-5,000).' }, { q: ['real estate','mls','nar','broker','realtor','appraiser'], topic: 'Real Estate Business', a: 'Starting a real estate business requires: state RE license (exam + application $200-500), MLS subscription ($300-1,000/yr), E&O insurance ($300-1,200/yr), NAR/state/local association dues ($500-1,000/yr). Key tax benefits: vehicle mileage deduction, home office, marketing expenses, CE courses. If holding a broker license as a C-Corp, the corp may need its own broker license in some states.' }, { q: ['food','restaurant','health permit','commercial kitchen','food truck'], topic: 'Food Business', a: 'Food businesses need: health department permit ($100-500), food handler certifications ($15-80), business license, potentially a liquor license ($500-10,000+). Required insurance: general liability, workers comp (if employees), product liability. Commercial kitchen must pass health inspection. Cottage food laws in some states allow home-based food businesses with lower requirements.' }, { q: ['construction','contractor','bond','osha','general contractor'], topic: 'Construction Business', a: 'Contractors typically need: state contractor license ($200-800/yr), surety bond ($500-5,000/yr depending on license class), general liability insurance ($2,000+/yr), workers comp, commercial auto insurance. OSHA 10/30 training required for many projects. Some states require separate licenses for each trade (electrical, plumbing, HVAC).' }, { q: ['crypto','blockchain','web3','token','nft','defi'], topic: 'Crypto/Web3 Business', a: 'Crypto businesses face complex regulation: FinCEN MSB registration (free but mandatory for money transmission), state money transmitter licenses ($500-100K per state), NY BitLicense ($5K+). Tax reporting: IRS treats crypto as property. Smart contract audits ($5K-50K) recommended before launch. Consider Wyoming or offshore structures for certain token models. Consult a crypto-specialized attorney.' }, { q: ['nonprofit','501c3','tax exempt','donation','grant','charity'], topic: 'Nonprofit Formation', a: 'Nonprofits file Form 1023 ($600 filing fee) for 501(c)(3) status, not Form 1120. Key differences: no franchise tax in most states, tax-exempt income, donors get tax deductions, must file Form 990 annually (not 1120). State charitable solicitation registration required before fundraising ($25-250/state). Must have a board of directors (typically 3+ members, not just one person).' }, { q: ['marketplace','platform','connect','two-sided','gig'], topic: 'Marketplace Business', a: 'Marketplaces need Stripe Connect or similar for split payments. Key compliance: 1099-K reporting for sellers ($600+ threshold), Terms of Service with clear liability allocation, trust & safety policies, dispute resolution process. If workers are involved (gig economy), worker classification (1099 vs W-2) is the #1 legal risk.' }, { q: ['consulting','freelance','independent','1099','client'], topic: 'Consulting Business', a: 'Consulting firms often start as sole proprietorships or LLCs but C-Corp makes sense if you plan to grow or raise investment. Key deductions: travel, home office, professional development, client entertainment (50% deductible). E&O insurance recommended ($1,000/yr). Issue 1099-NEC to any subcontractors paid $600+. Consider S-Corp election when paying yourself $60K+ salary to save on self-employment tax.' }, { q: ['ecommerce','shopify','inventory','shipping','product'], topic: 'E-Commerce Business', a: 'E-commerce requires sales tax collection in states where you have nexus (typically $100K threshold). Use TaxJar or Avalara for multi-state compliance. Track inventory as COGS (Cost of Goods Sold) on Line 2 of Form 1120 — this is different from operating expenses. Shipping costs, packaging, and product photography are all deductible.' }, { q: ['creative','agency','design','photography','video','media'], topic: 'Creative Business', a: 'Creative agencies can deduct: equipment (Section 179), software subscriptions (Adobe CC, Figma), studio space, props/sets, stock media licenses, portfolio website. Copyright ownership must be clear in client contracts — use "work for hire" language or explicit assignment. Professional liability insurance recommended if giving strategic advice.' }, { q: ['appraiser','appraisal','valuation'], topic: 'Appraiser License', a: 'Real estate appraiser licenses are state-regulated. Typical requirements: education hours (75-300 hours depending on level), experience hours (1,000-3,000), national exam, background check. License levels: Trainee, Licensed, Certified Residential, Certified General. Annual CE required (14-28 hours). Renewal typically every 2 years. Check your state\'s Real Estate Appraiser Board for specific requirements.' }, { q: ['hire','hiring','employee','w2','offer letter','first hire'], topic: 'First Hire', a: 'Before your first hire: set up payroll (Gusto ~$40/mo + $6/employee, or Rippling), register for state unemployment tax (SUTA), get workers comp insurance, create an employee handbook. For each hire: Form W-4, Form I-9 (within 3 days), offer letter with equity details. File Form 941 quarterly (payroll tax), Form 940 annually (FUTA), issue W-2 by January 31. Budget 15-25% above salary for employer taxes and benefits.' }, { q: ['contractor','1099','freelance','outsource','upwork'], topic: 'Hiring Contractors', a: 'Contractors are simpler than employees: no payroll taxes, no benefits, no workers comp. But: you cannot control HOW they work (only WHAT), they use their own tools, set their own hours. Misclassification risk is real — the IRS and state agencies scrutinize this. Issue 1099-NEC for anyone paid $600+. Use a contractor agreement with clear IP assignment and confidentiality clauses.' }, { q: ['equity','option','stock option','iso','nso','esop','pool'], topic: 'Employee Equity', a: 'Standard startup equity: ESOP (Employee Stock Option Pool) of 10-20% reserved from authorized shares. ISOs (Incentive Stock Options) for employees — better tax treatment. NSOs (Non-Qualified) for contractors/advisors. Standard vesting: 4 years with 1-year cliff. Set strike price at current 409A fair market value. Get a 409A valuation before your first option grant (~$1,500-5,000).' }, { q: ['non-compete','non compete','ip assignment','moonlight','side project'], topic: 'Non-Compete & IP', a: 'If you\'re building a startup while employed: check your employment agreement for non-compete, non-solicitation, and IP assignment clauses. Many states (CA, CO, MN, OK, ND, DC) ban or limit non-competes. IP assignment clauses may be broader — your employer could claim ownership of anything you build, even on personal time. Keep startup work on personal devices, personal time, and document the separation. Consult a lawyer if there\'s any overlap.' }, { q: ['resume','job search','interview','application','cover letter'], topic: 'Job Searching as a Founder', a: 'Many founders work while building. Tips: frame your startup as professional experience — you ran a company, managed products, handled compliance, built systems. That\'s valuable. Be honest about the startup\'s status. Companies increasingly value founder experience. Use RoadWork\'s Job Search tab to track applications. Response rates average 5-15% — volume matters.' }, ]; function initAskTopics() { const topics = [...new Set(QA.map(q => q.topic))].slice(0, 12); document.getElementById('ask-topics').innerHTML = topics.map(t => `
${t}
` ).join(''); } function askTopic(topic) { const item = QA.find(q => q.topic === topic); if (item) { addAskMessage(topic, 'user'); addAskMessage(item.a, 'bot'); } } function askQuestion() { const input = document.getElementById('ask-input'); const q = input.value.trim(); if (!q) return; input.value = ''; addAskMessage(q, 'user'); const lower = q.toLowerCase(); const match = QA.find(item => item.q.some(keyword => lower.includes(keyword))); if (match) { addAskMessage(match.a, 'bot'); } else { addAskMessage('I don\'t have a specific answer for that yet. Try browsing the Learn tab for detailed guides, or click one of the topic buttons above. For complex questions, consult a CPA — for a zero-revenue C-Corp, a simple consultation is usually $100-200.', 'bot'); } } function addAskMessage(html, type) { const el = document.getElementById('ask-messages'); const div = document.createElement('div'); div.className = `ask-msg ${type}`; div.innerHTML = html; el.appendChild(div); el.scrollTop = el.scrollHeight; } initAskTopics(); // ════════════════════════════════════════════════ // KEYBOARD SHORTCUTS // ════════════════════════════════════════════════ document.addEventListener('keydown', (e) => { if (e.target.tagName === 'INPUT' || e.target.tagName === 'SELECT' || e.target.tagName === 'TEXTAREA') return; const tabs = ['dashboard','checklist','company','expenses','generate','learn','timeline','estimator','stateguide','vault','ask','runway','checklist90','captable','health','invoice','glossary','decide','dilution','contracts','pitchdata','stories','bookkeeper','salary','investors','ical','compare']; if (e.key >= '1' && e.key <= '9') { const idx = parseInt(e.key) - 1; if (idx < tabs.length) { document.querySelector(`[data-tab="${tabs[idx]}"]`).click(); e.preventDefault(); } } if (e.key === 'k' && (e.metaKey || e.ctrlKey)) { e.preventDefault(); openCmdPalette(); return; } if (e.key === 'z' && (e.metaKey || e.ctrlKey)) { e.preventDefault(); undo(); return; } if (e.key === 'Escape') { closeCmdPalette(); return; } if (e.key === '?' || (e.key === '/' && !e.shiftKey)) { showToast('Cmd+K: command palette | 1-9: tabs | E: export | B: backup'); e.preventDefault(); } if (e.key === 'e' || e.key === 'E') { exportCSV(); e.preventDefault(); } if (e.key === 'b' || e.key === 'B') { exportAllData(); e.preventDefault(); } }); // ════════════════════════════════════════════════ // ONBOARDING // ════════════════════════════════════════════════ function checkOnboarding() { if (!STATE.company) { document.getElementById('onboarding').style.display = 'block'; document.querySelector('[data-tab="company"]').click(); } } // ════════════════════════════════════════════════ // INIT // ════════════════════════════════════════════════ loadCompany(); renderChecklist(); renderExpenses(); renderRecurring(); renderLicenses(); renderTimeline(); renderStateGuide(); renderVault(); render90DayPlan(); renderCapTable(); renderHealthCheck(); renderGlossary(); renderDecideQuestions(); renderDilution(); renderDashboard(); renderBookkeeper(); renderInvestors(); renderICalPreview(); updateRunway(); updateSalary(); // Prefill estimator with actual expenses const expTotal = STATE.expenses.reduce((s,e) => s+e.amt, 0); if (expTotal > 0) document.getElementById('est-y1-exp').value = expTotal; document.getElementById('exp-date').value = new Date().toISOString().slice(0,10); updateEstimator(); renderMilestones(); renderHiring(); renderJobs(); renderWizard(); renderBudget(); renderCanvas(); renderKPIs(); renderVendors(); renderDeductionFinder(); renderWellness(); renderPMF(); renderChannels(); renderScale(); renderDecisions(); renderStrategy(); renderLogs(); renderOKRs(); renderFeedback(); renderTestimonials(); renderCompetitors(); renderEmails(); renderLaunch(); loadPitchFields(); loadApplierProfile(); renderApplierTargets(); renderPrism(); renderMorning(); renderReviews(); renderContacts(); renderChangelog(); renderReading(); renderNotes(); renderMeetings(); renderPersonas(); renderHabits(); renderPnL(); renderResources(); updateMarket(); updatePricing(); updateUnitEcon(); updateCashFlow(); // URL routing — deep link to any tab via #hash function handleHash() { const hash = window.location.hash.slice(1); if (hash) switchTab(hash); } window.addEventListener('hashchange', handleHash); if (window.location.hash) handleHash(); // Show onboarding or tutorial if (!STATE.company && !localStorage.getItem('rw-tutorial-done')) { showTutorial(); } else { checkOnboarding(); } checkNotifications(); // Refresh notifications every 60 seconds setInterval(checkNotifications, 60000); // ════════════════════════════════════════════════ // LIVE API CONNECTION (when deployed to work.blackroad.io) // ════════════════════════════════════════════════ const API_BASE = window.location.hostname.includes('blackroad') ? '' : null; async function fetchAPI(path) { if (!API_BASE && API_BASE !== '') return null; try { const res = await fetch(`${API_BASE}${path}`); if (!res.ok) return null; return await res.json(); } catch { return null; } } async function postAPI(path, data) { if (!API_BASE && API_BASE !== '') return null; try { const res = await fetch(`${API_BASE}${path}`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(data) }); return await res.json(); } catch { return null; } } // Try to connect to backend on load (async () => { const health = await fetchAPI('/api/health'); if (health?.status === 'ok') { console.log('RoadWork API connected:', health); // Load backend stats into dashboard const stats = await fetchAPI('/api/stats'); if (stats) { localStorage.setItem('rw-api-stats', JSON.stringify(stats)); localStorage.setItem('rw-api-connected', 'true'); } // Load crew const crew = await fetchAPI('/api/crew'); if (crew?.crew) { localStorage.setItem('rw-crew', JSON.stringify(crew.crew)); } } })();