Question log (chaipat.cc)
The question log, api/log.js, is a small serverless function on Vercel that stores the questions visitors type, so questions the site answers badly can be found and fixed.
Each entry keeps the question's text, how it was understood, where the answer came from, whether anything was found and the top result, plus the device type, language and an answer id that votes on the answer refer to. No IP address is stored; the address is used only to rate-limit requests. The data goes to PostgreSQL on Neon, over its HTTP interface, with no database driver. He reads it in an admin that runs only on his own machine and is never deployed: the most-asked questions, the unanswered ones (and whether the site can answer them now), the answers voted down and the reasons given, and the messages from the Mail page. The browser tests never log.