I'd like to set up a Pi Zero as both a WiFi client and an access point using the built-in WiFi module. Most tutorials I see assume that the Pi has internet connectivity, but I want to set mine up to be offline. Specifically, when a WiFi connection is available, the Pi should connect to it. At the same time, it should act as an access point that I can connect to and SSH into the Pi, or view some content served by a web server on the Pi on the local LAN it creates, all offline.
How would I go about tuning wpa_supplicant, hostapd, and the network interfaces to achieve this?