LockMargin

All Guides

Product guides, tutorials, and engineering deep-dives from the LockMargin team.


How to Calculate Your Freelance Runway (And Why SaaS Tools Don't Do It)

Every freelancer knows the anxiety of checking their bank account. But here's the hard truth: your bank balance tells you how much money you have, not how long you'll survive.

That's where runway comes in. Runway is the number of months you can operate before your money runs out — assuming zero new income. SaaS tools like FreshBooks and QuickBooks track revenue, but they have no idea what your personal expenses are. Your rent, your groceries, your internet bill — those live outside their walled garden.

LockMargin is different. Because it's offline-first and privacy-first, it can safely compute your real runway using both business and personal data, without sending anything to a cloud server.

The Formula That Matters

The core calculation is brutally simple:

Runway = Current Balance รท Monthly Burn Rate

In LockMargin, the get_runway_with_personal function does exactly this. It takes your current balance (tracked automatically from invoices and expenses) and divides it by your monthly burn rate (which includes both business expenses and personal outflows you define once in Settings).

Runway Status Table

LockMargin color-codes your runway so you know at a glance whether you're in the green:

Status Runway What It Means
ัŸัž Green 6+ months Healthy runway. You have time to focus on growth, not survival.
๐ŸŸก Yellow 3โ€“6 months Caution zone. Start prioritizing high-likelihood invoices and cutting discretionary spend.
๐Ÿ”’า‘ Red Less than 3 months Critical. Activate your crisis plan — follow up on overdue invoices, pause non-essential projects.

Why SaaS Tools Fail at This

Cloud-based invoicing tools are designed for business accounting, not freelancer survival. Here's what they miss:

  • Personal expenses: Your SaaS tool doesn't know you spend $1,200/month on rent.
  • Offline gaps: If you're on a plane or in a dead zone, you can't even open your dashboard.
  • Data ownership: Your financial runway is your most sensitive data. Why store it on someone else's server?
  • Subscription cost: You're paying $20โ€“$50/month for a tool that still can't calculate your real runway.

How LockMargin Does It Better

LockMargin's Reactive Recurring Engine updates your runway calculation automatically every time you open the app. No cron jobs, no cloud sync, no manual refresh.

You define your personal burn rate once — under Settings โ†’' Financial Profile — and the engine handles the rest. It factors in:

  • โœ“ All unpaid invoices (expected income)
  • โœ“ All outstanding expenses
  • โœ“ Your personal monthly burn rate
  • โœ“ Recurring invoice schedules

The result? A single number that tells you the truth about your financial health. No cloud. No noise. Just your data, your rules.

Stop renting your business infrastructure.

Download LockMargin free. Calculate your real runway in seconds — no internet required.

Download LockMargin Free

Why Cron Jobs Fail for Freelancers: The Case for Reactive Recurring

If you've ever had a recurring invoice fail to send — or send twice — you've experienced the dirty secret of automated billing: cron jobs break.

Cron is the venerable Unix job scheduler that powers most recurring billing in SaaS tools. It works great on a server that never sleeps. But what happens when you're offline? What happens when your internet cuts out mid-sync? What if the server misses a tick?

LockMargin takes a fundamentally different approach: the Reactive Recurring Engine. It doesn't need a server, an internet connection, or a cron daemon. It runs when you run the app.

The Cron Problem

Cloud invoicing tools rely on server-side cron jobs to trigger recurring invoices. Here's why that's fragile for freelancers:

  • Internet dependency: If your internet is down when the cron fires, the job queues and may cause duplicates.
  • Timezone errors: Cron runs on server time, not your local timezone — causing missed or early triggers.
  • Server outages: When the SaaS platform is down, your invoices don't go out.
  • No offline fallback: You can't generate or send an invoice when you're disconnected from the cloud.

ะฒั™ย ๏ธ The worst-case scenario:

A freelancer flying from New York to London loses internet for 8 hours. During that window, their SaaS tool misses 3 recurring invoice deadlines. One client bills late — damaging trust. Another double-sends after reconnection — confusing the client.

How the Reactive Recurring Engine Works

LockMargin's Reactive Recurring Engine solves this at the architecture level. Instead of a server-side scheduler, the engine is embedded in the desktop application (built with Tauri for native performance).

Here's the logic flow:

  1. App launches โ†’' The Reactive Engine wakes up.
  2. Scan phase โ†’' It checks all recurring invoices against their next_due date.
  3. Delta calculation โ†’' For each invoice past its deadline, it calculates how many periods are due (e.g., 2 months missed = 2 invoices).
  4. Generation โ†’' New invoice drafts are created, stamped with the correct period and due date.
  5. Notification โ†’' You see a summary: "3 recurring invoices generated."

Zero Cron, Zero Cloud

Because the engine runs locally, you can:

  • โœˆ๏ธ Work on a plane — invoices are generated the next time you open the app.
  • ะโ€๏ธ Work from a cabin with no internet — all logic runs on your machine.
  • ๐Ÿ”’ั’ Never expose your billing schedule to a third-party server.

This isn't just a convenience feature. It's a fundamental architectural advantage of offline-first software. You don't rent computing time on someone else's server. You own the logic. It runs on your hardware, under your control.

Performance That Feels Native

LockMargin is built with Tauri, which means the Reactive Engine runs as a compiled Rust binary — not a JavaScript loop in a browser tab. The performance difference is dramatic:

Metric Cloud SaaS (Cron + JS) LockMargin (Tauri + Rust)
Scan 1,000+ recurring invoices 10โ€“30 seconds (API latency) <50 ms (local)
Works offline โŒ No โœ“ Yes
Server dependency Always online Zero
Privacy level Server-side 100% local

No more wondering if your invoices went through. No more double-billing clients. Just reactive, reliable, offline-first recurring logic that works whether you're connected or not.

Stop depending on server uptime.

Download LockMargin free. Recurring invoices that work on a plane, in a cabin, or on the moon.

Download LockMargin Free

Your Data Belongs on Your Hard Drive: Understanding AES-256-GCM

Every SaaS product tells you your data is "encrypted." But there's a massive difference between server-side encryption (where the cloud provider holds the keys) and local-first encryption (where only you control access to your data).

LockMargin was built from the ground up on the principle that your financial data should never leave your machine. Here's exactly how that works at the cryptographic level.

The Encryption Stack

LockMargin uses a three-layer security architecture:

Layer 1: Key Derivation

PBKDF2-HMAC-SHA256 with 100,000 iterations. Your master password is stretched into a 256-bit encryption key. The iteration count makes brute-force attacks computationally infeasible — even with dedicated hardware.

Layer 2: Data Encryption

AES-256-GCM — Advanced Encryption Standard with 256-bit keys in Galois/Counter Mode. This is the same standard used by governments and financial institutions worldwide. GCM mode provides both confidentiality and authenticated integrity verification (you'll know if data has been tampered with).

Layer 3: Key Storage

Encryption keys are stored in your system keyring (Windows Credential Manager, macOS Keychain, or Linux Secret Service). They are never written to the application database or sent over the network.

Why This Matters: Cloud vs. Local Encryption

Most cloud invoicing tools advertise "AES-256 encryption." But here's what they don't tell you:

Feature Cloud SaaS LockMargin
Who holds the encryption keys? The cloud provider Your OS keychain
Can the provider read your data? Yes (server-side decryption) No (impossible)
Data stored on Third-party servers Your local drive
Data mining / ad targeting Common (anonymized or not) Impossible by design
Works without internet โŒ No โœ“ Yes

"We Can't Even See Your Data"

This isn't a marketing slogan — it's a cryptographic guarantee. Because LockMargin stores your data locally and encrypts it with keys that never leave your keychain, there is literally no way for us — or anyone else — to access your financial information.

Compare this to cloud-based invoicing tools:

  • Server-side encryption: The cloud provider encrypts your data on their server, but they hold the decryption keys. They can — and sometimes do — mine data for product analytics, market research, or advertising.
  • End-to-end encryption (E2EE): Rare in invoicing tools. Most SaaS products don't offer it because it prevents them from running server-side features like automated reminders.
  • Local-first encryption: LockMargin's approach. Your data is encrypted before it ever touches a database — and that database is on your machine.

What This Means for Your Freelance Business

Your invoices contain sensitive information: client names, rates, payment terms, bank details, and project descriptions. In the wrong hands, this data could be used for:

  • ๐Ÿ”’๐Ÿ” Competitive analysis against your rates
  • ๐Ÿ”ด Targeted phishing attacks on your clients
  • โ€œะ‰ Aggregated industry profiling

With LockMargin's local-first architecture, none of this is possible. Your data stays encrypted on your hard drive, protected by your OS keychain, accessible only to you.

The Bottom Line

Encryption isn't just about technology — it's about trust. Cloud providers ask you to trust that they'll protect your data. LockMargin removes the need for trust entirely by ensuring your data never leaves your possession.

AES-256-GCM. PBKDF2 with 100,000 iterations. System keychain storage. No cloud. No data mining. No subscription.

That's not just privacy. That's ownership.

Your data belongs on your hard drive.

Download LockMargin free. Military-grade encryption, zero cloud dependency.

Download LockMargin Free