Why Form Data Disappears Without a Database
When a form submits to an Express endpoint, the data arrives in the server's memory. If you do nothing with it -- store it, send it somewhere, forward it -- it is gone when the server restarts. On Replit, servers restart regularly. Without database storage, you lose every form submission that happens between restarts.
Storing submissions in a SQLite database means the data persists permanently -- it survives restarts, upgrades, and re-deployments.
The simplest implementation: tell Claude exactly what fields your form captures and ask it to create a SQLite table and an insert function. Claude writes the table creation SQL, the insert logic, and the error handling. You paste it in. Done.
What to Tell Claude
"Add SQLite storage to my form submission handler. My form captures: first_name (text), email (text), and message (text). Create a table called submissions with columns: id (auto-increment primary key), first_name, email, message, created_at (default current timestamp). When the form submits, insert all fields into the submissions table. Add an admin route at /admin/submissions that shows all stored submissions in a simple HTML table."
Exporting Your Data
For most people, an admin route is sufficient for reviewing submissions. When you are ready to export to a spreadsheet or email platform, ask Claude to add a CSV export endpoint at /admin/submissions/export that downloads all submissions as a CSV file.