sarmad-jalil/Streaky ? reverse-engineered prompt

Reverse engineered prompt

Build me a small TypeScript backend service that tracks user streaks and keeps the data in a database.

I want a clean API that can create a streak, update it when someone completes something, fetch the current streak status, and list all streaks for a user. Include basic validation, sensible error messages, and a simple way to configure the app with environment variables. Make sure the database schema is set up with migrations and that the project is ready to run locally without a lot of setup.

Please add a few tests for the main API behavior and the streak calculations, and keep the code easy to read so I can extend it later. If you need to check current library docs or best practices while implementing it, go ahead and look them up online.