Default [Q] Hotspot force redirect to Local Server

I got this crazy idea that I don't know is possible or not... what I want to do is set up my phone as wifi access point, then allow people to connect to it, but handle all incoming http traffic myself.

So:
Create a server (with KWS - Android web server)

client can connect to the phone

when client tries to open an http connection to any random server, this has to be intercepted by my app and handled by a local web server

Anyone knows any android app to do this ?