SShortSingh.
Back to feed

Developer migrates live SaaS from Vercel and Supabase to a single Cloudflare Worker

0
·1 views

A developer running ReddTrends, a small SaaS platform with a few hundred users, migrated the entire application from Next.js on Vercel and Supabase to a single Cloudflare Worker without downtime. The stack swap replaced Supabase Postgres with Cloudflare D1 (SQLite), Supabase Auth with Better Auth, and GitHub Actions cron jobs with Cloudflare Cron Triggers and Workflows. One of the trickiest challenges was handling 938 existing bcrypt password hashes from GoTrue, which the developer resolved by writing a compatibility verification function that checks hash format at login rather than forcing a mass password reset. Migrating data to D1 required a four-step pipeline — export, transform, import, and verify — to handle SQLite's lack of native booleans, timestamps, and JSON types, while also working around D1's 100,000-byte SQL statement limit. The developer noted that rebuilding on a TanStack Start boilerplate targeting Workers natively avoided the need for an adapter layer, making the migration feasible for a small app.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer builds quiz-driven AI gift recommender that ranks Amazon products by recipient fit

A developer has launched GiftHive, a gift recommendation tool that uses a 30-second quiz to match products to recipients based on relationship, interests, occasion, and budget. Unlike conventional AI gift finders that rely on keyword search, GiftHive scores products using a weighted algorithm measuring tag overlap, budget fit, and occasion relevance — requiring no machine learning model. The app is built with Next.js, Tailwind CSS, and deployed on Cloudflare Pages, with revenue generated through Amazon Associates affiliate links. A three-step conversion funnel — landing page, quiz, and results — was carefully optimised, including a route-aware exit-intent modal that avoids interrupting users mid-quiz. The creator notes that fixing a misplaced modal trigger recovered roughly 15% of lost quiz completions, highlighting the importance of component-level routing logic in conversion design.

0
ProgrammingDEV Community ·

Why AI Agents Need Structured Workspaces, Not Just Longer Prompts

Developers building AI agents are increasingly finding that a well-structured runtime environment matters more than model sophistication alone. A production-ready agent workspace includes components such as task definitions, scoped file access, tool contracts, memory, permissions, cost budgets, and audit traces. Without this architecture, common failures arise — agents forgetting goals, leaking tenant data, making wrong API calls, or silently burning through token budgets. The article proposes five architectural layers, beginning with converting raw user prompts into structured task objects that carry success criteria, risk levels, and cost limits. This workspace-first approach positions the environment as the core control plane for reliable, auditable AI agent deployments.

0
ProgrammingDEV Community ·

Compilation vs Interpretation: How Programming Languages Execute Your Code

Every program written in a high-level language like Python, Java, or C must be translated into machine instructions before a CPU can execute it. Compilation translates source code into machine code before the program runs, producing an executable that can be used repeatedly without retranslation. Interpretation, by contrast, reads and processes source code line by line at runtime, translating instructions on the fly during execution. However, modern languages rarely fit neatly into either category — Python, for instance, compiles source code into bytecode before interpreting it. Understanding these execution strategies helps explain differences in startup speed, runtime performance, and the role of tools like the JVM and JIT compiler.

0
ProgrammingDEV Community ·

Developer releases offline keyword spotting engine supporting Chinese and English

A developer has built an open-source, portable keyword spotting engine called wakeword_engine.py, designed to enable offline voice commands in software projects. The single-file tool uses a causal TCN model on mel spectrograms and runs via ONNX Runtime, with a model size of roughly 135KB capable of detecting 2–10 keywords in under 5 milliseconds. Development began with Chinese — a tonal, single-syllable-heavy language — which made the architecture language-agnostic, allowing English support to follow with minimal additional work. The engine features a five-layer noise filtering system and currently supports Python, web, and Android platforms, with ESP32 support in progress. The project is available on GitHub under an MIT license and includes early integration support for Home Assistant via the Wyoming protocol.