mahenzon/fastapi-url-shortener — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small FastAPI URL shortener in Python.

I want an API where someone can send a long URL and get back a short link, then visiting that short link should redirect them to the original URL. It should also have a simple way to manage access tokens from the command line, since this project mentions a tokens CLI. Keep it clean and developer friendly, with tests for the main flows.

Please set it up so I can run it locally from the url shortener folder with the FastAPI dev server, install dependencies with uv, and run pytest. Use modern Python, formatting, linting, type checking, and pre commit the way this repo expects. Don’t overbuild it with a fancy frontend, just make the backend solid and easy to understand.

Want more depth? Deep Reverse