惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
N
News and Events Feed by Topic
S
Schneier on Security
G
GRAHAM CLULEY
Scott Helme
Scott Helme
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CERT Recently Published Vulnerability Notes
T
The Exploit Database - CXSecurity.com
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
Cisco Talos Blog
Cisco Talos Blog
P
Privacy & Cybersecurity Law Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
Blog — PlanetScale
Blog — PlanetScale
Project Zero
Project Zero
MyScale Blog
MyScale Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
The Last Watchdog
The Last Watchdog
Vercel News
Vercel News
The Cloudflare Blog
C
Check Point Blog
Help Net Security
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
AI
AI
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
Stack Overflow Blog
Stack Overflow Blog
腾讯CDC
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
S
SegmentFault 最新的问题
MongoDB | Blog
MongoDB | Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
AWS News Blog
AWS News Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
PCI Perspectives
PCI Perspectives
S
Securelist
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Vulnerabilities – Threatpost
S
Secure Thoughts

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
6 architectures I considered for a privacy-first personal SaaS — and why I built two of them
Deeshan Shar · 2026-05-13 · via DEV Community

Every architectural decision I made building OvertimeIQ came from the same four constraints. Not preferences — constraints. Things that were non-negotiable before I wrote a line of code.

  1. Work data cannot leave the user's control. Hours, rates, employer names, project names — this is sensitive professional information. It cannot live on my server, my cloud provider, or anyone else's database.
  2. Zero cost at zero subscribers. A solo project that costs $40/month before it earns a rupee is a liability, not a product.
  3. Works with Indian payment infrastructure. UPI AutoPay, ₹149/month price points, T+1 settlement. Stripe is the wrong answer for a domestic Indian product.
  4. Offline-first. The app must work fully on a flight, in a basement, with no signal. Work happens everywhere. Those four constraints didn't just influence the architecture — they eliminated five of the six options I seriously considered. Here's each one, what it looked like, and exactly where it failed.

Option 1: Traditional backend + Postgres

The standard playbook. A Node/Express backend, a Postgres database, REST API, JWT auth.

What it solves: Everything. This architecture has solved every web application problem for fifteen years.

Where it fails my constraints: Immediately, and on two counts.

First, cost. Even a hobby-tier server — a $5 DigitalOcean droplet, a free-tier Railway deployment — has a running cost before subscriber one. More importantly, it has an operational cost: migrations, uptime, backups, security patches. A solo product cannot carry that surface area.

Second, and more importantly: data custody. Every log entry, every hourly rate, every employer name would live in my Postgres database. That's the opposite of what this product promises. The privacy proposition isn't "we secure your data" — it's "your data is never ours to secure."

Eliminated.


Option 2: Supabase for everything

Supabase gives you a managed Postgres, auth, realtime, and storage on a generous free tier. It's genuinely excellent infrastructure. I use it in the final architecture — just not for work data.

The temptation: Free tier covers 500 MB database, 50k MAU. Auth is built in. Row-level security means each user can only see their own data. Storage is cheap. What's the problem?

The problem: Supabase for everything means my work logs, hourly rates, overtime sessions, and project names live in Supabase's database — on AWS, behind their security posture, subject to their future business decisions, subpoena-able by parties I have no control over.

Users of a privacy-focused overtime tracker are, almost by definition, people who don't want their work data on someone else's server. Using Supabase for work data would hollow out the core value proposition.

Supabase is excellent infrastructure. The constraint isn't Supabase — it's that work data can't live there. This observation became the seed of the final architecture.

Eliminated for work data. Reserved for identity.


Option 3: Pure IndexedDB

If the constraint is "data stays in the browser," why not use the browser's native database? IndexedDB is built into every modern browser, stores arbitrary structured data, and requires zero infrastructure.

What works: Zero cost. Data is local. No backend required. Runs offline trivially.

What fails:

  • No portability. IndexedDB data is browser-specific. Chrome on your laptop has different data than Chrome on your phone. There's no canonical copy.
  • No cross-device sync. Every device is an island.
  • No user control. Your data is in the browser's storage, not in a file you can see, back up, or migrate. The browser can evict it under storage pressure. There's no export path that doesn't require building one from scratch. A time tracking app that only works on one device, that can silently lose data when the browser decides to reclaim storage space, is not a serious tool.

Eliminated.


Option 4: Electron

Package the app as a desktop application. Store data in a local SQLite file. No browser storage limits. No sync problem.

The appeal: SQLite is genuinely the right database for this use case — a single-user, local-first, structured data store. Electron gets you there without browser sandboxing.

The reality: Distribution. Update mechanics. Platform-specific builds. An app that can't be installed from a URL without an OS-level prompt. No mobile. A 200MB download for something that should feel like opening a tab.

The web is the right distribution channel for a personal productivity tool. Electron is the right solution to a different problem.

Eliminated.


Option 5: Pure client-side SPA — v1

This is what I built first. React + Vite, sql.js (SQLite running as WASM in the browser), Google OAuth PKCE, Google Drive as the sync layer. No backend. No server. A static site deployed to Vercel that makes calls only to Google APIs.

What works, and works beautifully:

  • sql.js gives you a real SQLite database running entirely in the browser as a WASM binary. Schema migrations, indexes, complex queries — the full database.
  • The database is a single binary file, serialized to a Uint8Array, stored in localStorage, and mirrored to the user's Google Drive as overtimeiq.db. The user owns the file. It's on their Drive. It's portable.
  • Drive sync is elegant: on login, compare modifiedTime against the last sync timestamp. Download if Drive is newer, upload if local is newer. Debounce writes 10 seconds after the last operation to batch rapid edits.
  • Earnings calculations, midnight-crossing rate logic, holiday detection — all of it runs in the browser, all of it offline-capable. This architecture validated the core privacy premise. It works. Users genuinely own their data.

Where it hits a ceiling — first:

Invite control. I wanted invite-only access during beta — a waitlist, admin-managed invites, unique token links. There is no way to implement this without a server. An invite token that's validated entirely client-side isn't validation — it's decoration. Anyone who finds the URL can skip it.

Where it hits a ceiling — second, and more fundamentally:

A pro_flag = 1 column in a SQLite file that lives on the user's own Google Drive is not a feature gate. It's a suggestion. Any user can open their overtimeiq.db file with the DB Browser for SQLite, flip the flag, and reload the app. The "security" evaporates.

I spent some time convincing myself this was acceptable. It isn't — not for a product that charges ₹149/month for Pro features. A gate that can be bypassed by anyone with 10 minutes and a free SQLite browser is not a gate.

These two limitations forced a rebuild.


Option 6: The hybrid — v2 (what I actually shipped)

The insight that unlocked v2 was this: draw a hard line between data that is yours and data that is about access.

Work data — logs, hours, rates, jobs, earnings — is yours. It has strong privacy requirements. It should live on your own Google Drive and never touch my infrastructure.

Access data — identity, subscription status, invite records — is about the relationship between you and the product. It has strong security requirements. It needs a real server with real auth.

These are fundamentally different things. They need different architectures.

The v2 architecture:

  • SQLite on Google Drive — unchanged. All work data. Privacy preserved.
  • Supabase — identity, invites, waitlist, subscriptions only. No log data. No earnings. No work records.
  • Next.js API routes — invite validation (server-side, unforgeable), payment webhooks, pro token issuance.
  • ECDSA ES256 signed JWT — the pro token. Server holds the private key, mints a 3-day token on every online load. Public key is hardcoded in the JS bundle. Verified client-side via the WebCrypto API. Editing the SQLite file no longer does anything — gates read from the verified token payload, not the raw database column. What this fixed:

Invite control: /join/[token] validates the token server-side before showing any Google login. Unforgeable.

Feature gating: The SQLite file can be edited freely. It doesn't matter. The pro_plan value in memory comes from a cryptographically signed JWT that cannot be forged without the server's private key and cannot be extended without server re-issuance.

What it cost:

Three weeks of rework. The SPA became a Next.js app. A Supabase project was provisioned. The auth flow became more complex (Google OAuth PKCE → supabase.signInWithIdToken() — two independent lifecycles). The file structure doubled.

Was it worth it? Yes — because the alternative was shipping a product with a feature gate that a free GUI tool can bypass in 30 seconds.


The transferable pattern

The split this architecture enforces — work data on Drive, identity on Supabase — is a pattern that applies to any app with sensitive personal data and a subscription model.

The question to ask: "Could someone be harmed if this data were leaked or subpoenaed?" If yes, it belongs on infrastructure the user controls. If the data is about the user's relationship to the product (did they pay? are they invited?), it belongs on infrastructure you control with proper security.

Treating these as the same problem leads to either a privacy compromise (everything on Supabase) or a security hole (everything client-side). Treating them separately solves both.

The three weeks of rework to land on v2 was the most valuable time I spent on this project.


Series note

This article is part of the Privacy by Architecture series documenting the build of OvertimeIQ — a personal overtime tracker that stores work data on your own Google Drive. If any of the implementation details are interesting, there are deeper dives on sql.js + Drive sync, Google OAuth PKCE and upcoming next (ECDSA feature gating and the invite system).