The "backend" is everything behind the scenes — processing payments, checking logins, saving data. Edge functions let you handle all of it without a server or an engineering team.
When someone taps "Subscribe," a lot happens they never see. Verify login. Send payment to Stripe. Wait for confirmation. Update database. Grant access. All in about two seconds.
All of that invisible work is your backend. In a traditional company, a whole team builds this. As a solo builder, edge functions are how you handle it.
Everything that happens behind the scenes. Processing payments, checking passwords, reading/writing data. The kitchen where food gets made — as opposed to the dining room where customers eat.
A small piece of backend logic that runs in the cloud only when needed. Sleeps when nobody uses it. Wakes up, does its job, goes back to sleep. You pay for usage, not uptime.
A traditional server is a full-time salaried cook standing in the kitchen 24/7, whether there are orders or not. An edge function is a line cook who clocks in when there's an order, cooks the dish, clocks out. At 3am when nobody's ordering, you're not paying anyone.
Each function owns its domain completely. When one breaks, the others keep running.
Login, signup, token refresh, account management. Nothing else.
Eligibility, session management, conversation data. Nothing else.
User progress, statistics, subscription status. Nothing else.
Incoming events from Stripe, your AI provider, and other external services. Nothing else.
Simple to start. Works great for months. But at ~500 lines, it becomes a nightmare to debug. A bug in payments breaks authentication. Splitting mid-flight is painful.
More files, more deployments. Feels like overkill at 200 lines. But when one breaks, the others keep running. You never do a painful mid-flight renovation.
For every piece of important data, decide: which system is the boss? Payment status → Stripe is the boss. User profiles → your database is the boss. Voice or AI configs → your AI provider is the boss. When two systems disagree, the boss wins. Every other system follows.